Changeset 389


Ignore:
Timestamp:
05/03/08 16:07:24 (5 years ago)
Author:
fingalo
Message:
 
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/camera.h

    r388 r389  
    158158 
    159159    #undef  CAM_USE_ZOOM_FOR_MF 
    160     #undef  CAM_REMOTE 
    161160    #define CAM_MULTIPART               1 
    162161    #undef  CAM_HAS_ERASE_BUTTON 
  • trunk/platform/a560/kbd.c

    r281 r389  
    11#include "lolevel.h" 
    22#include "platform.h" 
     3#include "conf.h" 
    34#include "core.h" 
    45#include "keyboard.h" 
     
    1718static long last_kbd_key = 0; 
    1819static int usb_power=0; 
     20static int remote_key, remote_count; 
     21#define USB_MASK (0x40000)  
     22#define USB_REG 2 
    1923 
    2024 
     
    122126    } 
    123127 
    124  
    125  
    126128    _kbd_read_keys_r2(physw_status); 
     129 
     130        if (conf.remote_enable) { 
     131                remote_key = (physw_status[2] & USB_MASK)==USB_MASK; 
     132                if (remote_key)  
     133                        remote_count += 1; 
     134                else if (remote_count) { 
     135                        usb_power = remote_count; 
     136                        remote_count = 0; 
     137                } 
     138                physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK); 
     139        } 
     140        else 
    127141    physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 
    128142 
     143 
    129144    _kbd_pwr_off(); 
    130145 
    131146} 
    132147 
     148int get_usb_power(int edge) 
     149{ 
     150        int x; 
     151 
     152        if (edge) return remote_key; 
     153        x = usb_power; 
     154        usb_power = 0; 
     155        return x; 
     156} 
    133157 
    134158/* void kbd_set_alt_mode_key_mask(long key) 
     
    310334}; 
    311335 
    312 int get_usb_power(int edge) {return usb_power;} 
    313336 
    314337 
Note: See TracChangeset for help on using the changeset viewer.