qspi msc flash seems to work

This commit is contained in:
hathach
2018-09-08 00:15:34 +07:00
parent a0ae452987
commit 8572947da5
9 changed files with 207 additions and 369 deletions

View File

@@ -84,6 +84,7 @@ int main(void)
//--------------------------------------------------------------------+
void virtual_com_task(void)
{
#if CFG_TUD_CDC
// connected and there are data available
if ( tud_mounted() && tud_cdc_available() )
{
@@ -95,6 +96,7 @@ void virtual_com_task(void)
tud_cdc_write(buf, count);
tud_cdc_write_flush();
}
#endif
}
//--------------------------------------------------------------------+
@@ -102,6 +104,7 @@ void virtual_com_task(void)
//--------------------------------------------------------------------+
void usb_hid_task(void)
{
#if CFG_TUD_HID
// Poll every 10ms
static tu_timeout_t tm = { .start = 0, .interval = 10 };
@@ -141,8 +144,10 @@ void usb_hid_task(void)
if ( btn & 0x04 ) tud_hid_mouse_move( 0 , -DELTA); // up
if ( btn & 0x08 ) tud_hid_mouse_move( 0 , DELTA); // down
}
#endif
}
#if CFG_TUD_HID
uint16_t tud_hid_generic_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen)
{
// TODO not Implemented
@@ -153,6 +158,7 @@ void tud_hid_generic_set_report_cb(uint8_t report_id, hid_report_type_t report_t
{
// TODO not Implemented
}
#endif
//--------------------------------------------------------------------+
// tinyusb callbacks