Index: platform/ixusw_sd430/kbd.c
===================================================================
--- platform/ixusw_sd430/kbd.c (revision 550)
+++ platform/ixusw_sd430/kbd.c (working copy)
@@ -7,7 +7,7 @@
#define KEY_MASK 0x2FFE
#define NEW_SS (0x2000)
-#define SD_READONLY_FLAG (0x40000000)
+#define SD_READONLY_FLAG (0x80000000)
typedef struct {
@@ -27,15 +27,15 @@
static char kbd_stack[NEW_SS];
#endif
-#define USB_MASK 0x8000000 //TODO
-#define USB_IDX 1 //TODO
+#define USB_MASK 0x400000
+#define USB_IDX 0
//TO DO
extern void usb_remote_key( void ) ;
int get_usb_bit()
{
register long usb_physw;
- usb_physw = *(long*)0xc0220204; //can be read directly (the usb bit doesn't need kbd_power_on or so)
+ usb_physw = *(long*)0xc0220200; //can be read directly (the usb bit doesn't need kbd_power_on or so)
return(( usb_physw & USB_MASK)==USB_MASK);
}
@@ -137,7 +137,7 @@
}
// Drop SD readonly status
- physw_status[1] = physw_status[1] | SD_READONLY_FLAG;
+ physw_status[1] = physw_status[1] & ~SD_READONLY_FLAG;
}
void kbd_key_press(long key)
Updated diff, only apply the new changes of course. There is a certain chance that the USB bit is (also) elsewhere on the 0xc0220200 IO port.
Now, if you enable USB remote, the camera should no longer notice the USB connection when you plug it into the PC. If the bit's port is really 0xc0220200, and the bit's location is the same, you'll even be able to use the USB remote.