A1100 IS Porting thread - page 16 - DryOS Development - CHDK Forum

A1100 IS Porting thread

  • 647 Replies
  • 245775 Views
Re: A1100 IS Porting thread
« Reply #150 on: 27 / April / 2010, 10:21:26 »
Advertisements
As a matter of interest, connect the camera to the PC using the USB cable.
When USB line connect to the camera,The physw_status have no change.no programe on pc startup.

Re: A1100 IS Porting thread
« Reply #151 on: 27 / April / 2010, 10:28:28 »
I meant when you connect to the PC while in shoot mode, what happens ?
Anyway, try changing if (kbd_process() == 0){
to
// if (kbd_process() == 0){
if(1){
I have try that.It is the same as before.

Re: A1100 IS Porting thread
« Reply #152 on: 27 / April / 2010, 10:35:47 »
I do not understand what you are saying.
You are saying there are no changes, keys are disabled but you are also saying the left/right keys produce a change in the bit pattern.

What do the up/down keys do ?

Re: A1100 IS Porting thread
« Reply #153 on: 27 / April / 2010, 10:36:06 »
Can I get keyMap through this:    
physw_status[1]                  --->screen display  

2       c21ffeb(when I press the left key,It change to c21f7eb, press right key change to c21fbeb)

can get this?
{1,KEY_LEFT,0x00000700}  {1,KEY_RIGHT,0x00000b00}

Re: A1100 IS Porting thread
« Reply #154 on: 27 / April / 2010, 10:45:39 »
What do the up/down keys do ?

I bet they give bit patterns c21feeb  and c21fdeb

Re: A1100 IS Porting thread
« Reply #155 on: 27 / April / 2010, 10:45:52 »
Now every key is works except the function set key.
Now the code in kbd.c
Code: [Select]
void kbd_fetch_data(long *dst)
{
    volatile long *mmio0 = (void*)0xc0220200;
    volatile long *mmio1 = (void*)0xc0220204;
    volatile long *mmio2 = (void*)0xc0220208;

    dst[0] = *mmio0;
    dst[1] = *mmio1;
    dst[2] = *mmio2 & 0xffff;
//  dst[2] = *mmio2;
}

void my_kbd_read_keys()
{
kbd_prev_state[0] = kbd_new_state[0];
kbd_prev_state[1] = kbd_new_state[1];
kbd_prev_state[2] = kbd_new_state[2];

    _kbd_pwr_on();

    kbd_fetch_data(kbd_new_state);

if (kbd_process() == 0){
// if(1){
// leave it alone...
physw_status[0] = kbd_new_state[0];
physw_status[1] = kbd_new_state[1];
physw_status[2] = kbd_new_state[2];
   //  if(imgbuf)physw_status[2]  = physw_status[2] | menu_key_mask ;  ----->no imgbuf
} else {
// override keys
physw_status[0] = (kbd_new_state[0] & (~KEYS_MASK0)) |
 (kbd_mod_state[0] & KEYS_MASK0);

physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) |
 (kbd_mod_state[1] & KEYS_MASK1);

physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) |
 (kbd_mod_state[2] & KEYS_MASK2);
}

    _kbd_read_keys_r2(physw_status);

remote_key = (physw_status[2] & USB_MASK)==USB_MASK;
      if (remote_key)  remote_count += 1;
else if (remote_count) {
usb_power = remote_count;
remote_count = 0;
}

if (conf.remote_enable) {
physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK);
}
    else physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG;

    _kbd_pwr_off();
I copy these keymap from a2000,only change the index in keymap,
So how can I get the funciton key work?

Re: A1100 IS Porting thread
« Reply #156 on: 27 / April / 2010, 10:46:56 »
I also can take picture now.

Re: A1100 IS Porting thread
« Reply #157 on: 27 / April / 2010, 10:48:47 »
What is the bit pattern when the SET key is pressed ?


Re: A1100 IS Porting thread
« Reply #158 on: 27 / April / 2010, 11:02:33 »
I do not know how the keymap
I display the physw_status[1],physw_status[2],physw_status[3] on screen,They like that:
1 30x000xc  (x meaning changed all the time,no mater I press the key)   ( physw_status[0])
2 c21ffeb    (physw_status[1])
3 90ff        (physw_status[2] )

When I press the these key with values changed like this ,most are the physw_status[1] changed.
KEY_DISPLAY                 c21bfeb   
KEY_SHOOT_FULL            90ff------>                   90ef(physw_status[2])
KEY_SHOOT_HALF           90ff------>                   90cf(physw_status[2])
KEY_UP                   c21feeb   
KEY_DOWN           c21fdeb   
KEY_LEFT                   c21f7eb   
KEY_RIGHT           c21fbeb   
KEY_SET                   c21efeb   
KEY_ZOOM_IN                   90ff------>                   90bf(physw_status[2])
KEY_ZOOM_OUT               90ff------>                   907f(physw_status[2])
KEY_MENU                   c21dfeb   
KEY_PRINT            c217feb   

Re: A1100 IS Porting thread
« Reply #159 on: 27 / April / 2010, 11:14:49 »
So how is the keymap can genere from the result?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal