mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
Merge pull request #1641 from openmv/new_usbdbg_commands
ports/all: Add placeholders for new USBDBG commands.
This commit is contained in:
commit
4455c030c3
@ -300,6 +300,32 @@ void usbdbg_data_out(void *buffer, int length)
|
||||
break;
|
||||
}
|
||||
|
||||
case USBDBG_SET_TIME: {
|
||||
// TODO implement
|
||||
#if 0
|
||||
uint32_t *timebuf = (uint32_t*)buffer;
|
||||
timebuf[0]; // Year
|
||||
timebuf[1]; // Month
|
||||
timebuf[2]; // Day
|
||||
timebuf[3]; // Day of the week
|
||||
timebuf[4]; // Hour
|
||||
timebuf[5]; // Minute
|
||||
timebuf[6]; // Second
|
||||
timebuf[7]; // Milliseconds
|
||||
#endif
|
||||
cmd = USBDBG_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
case USBDBG_TX_INPUT: {
|
||||
// TODO implement
|
||||
#if 0
|
||||
uint32_t key= *((uint32_t*)buffer);
|
||||
#endif
|
||||
cmd = USBDBG_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
default: /* error */
|
||||
break;
|
||||
}
|
||||
@ -409,6 +435,16 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
|
||||
xfer_length = length;
|
||||
break;
|
||||
|
||||
case USBDBG_SET_TIME:
|
||||
xfer_bytes = 0;
|
||||
xfer_length =length;
|
||||
break;
|
||||
|
||||
case USBDBG_TX_INPUT:
|
||||
xfer_bytes = 0;
|
||||
xfer_length =length;
|
||||
break;
|
||||
|
||||
default: /* error */
|
||||
cmd = USBDBG_NONE;
|
||||
break;
|
||||
|
@ -46,7 +46,9 @@ enum usbdbg_cmd {
|
||||
USBDBG_FB_ENABLE =0x0D,
|
||||
USBDBG_TX_BUF_LEN =0x8E,
|
||||
USBDBG_TX_BUF =0x8F,
|
||||
USBDBG_SENSOR_ID =0x90
|
||||
USBDBG_SENSOR_ID =0x90,
|
||||
USBDBG_TX_INPUT =0x11,
|
||||
USBDBG_SET_TIME =0x12,
|
||||
};
|
||||
|
||||
void usbdbg_init();
|
||||
|
Loading…
Reference in New Issue
Block a user