Changeset 389
- Timestamp:
- 05/03/08 16:07:24 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/camera.h (modified) (1 diff)
-
platform/a560/kbd.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/camera.h
r388 r389 158 158 159 159 #undef CAM_USE_ZOOM_FOR_MF 160 #undef CAM_REMOTE161 160 #define CAM_MULTIPART 1 162 161 #undef CAM_HAS_ERASE_BUTTON -
trunk/platform/a560/kbd.c
r281 r389 1 1 #include "lolevel.h" 2 2 #include "platform.h" 3 #include "conf.h" 3 4 #include "core.h" 4 5 #include "keyboard.h" … … 17 18 static long last_kbd_key = 0; 18 19 static int usb_power=0; 20 static int remote_key, remote_count; 21 #define USB_MASK (0x40000) 22 #define USB_REG 2 19 23 20 24 … … 122 126 } 123 127 124 125 126 128 _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 127 141 physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG; 128 142 143 129 144 _kbd_pwr_off(); 130 145 131 146 } 132 147 148 int 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 } 133 157 134 158 /* void kbd_set_alt_mode_key_mask(long key) … … 310 334 }; 311 335 312 int get_usb_power(int edge) {return usb_power;}313 336 314 337
Note: See TracChangeset
for help on using the changeset viewer.