working on migrate hci from uart to usb

This commit is contained in:
hathach
2018-04-09 18:52:46 +07:00
parent bee4488811
commit a9267cd9ff
4 changed files with 42 additions and 35 deletions

View File

@ -360,26 +360,6 @@ int main(void)
// Init usb stack
tusb_init();
// TODO temporarily code to test usb cdc
while( true )
{
sd_app_evt_wait();
app_sched_execute();
tusb_task();
// connected and there are data available -> echo back
if ( tud_mounted() && tud_cdc_available() )
{
uint8_t buf[64];
// read and echo back
uint32_t count = tud_cdc_read(buf, sizeof(buf));
tud_cdc_write(buf, count);
}
}
/*------------- Determine DFU mode (Serial, OTA, FRESET or normal) -------------*/
/* For metro52 LED_BLUE is muxed with FRESET. We only init FRESET BUTTON
@ -544,12 +524,6 @@ void tud_umount_cb(uint8_t port)
{
}
void tud_cdc_rx_cb(uint8_t port)
{
}
uint32_t tusb_hal_millis(void)
{
return ( ( ((uint64_t)app_timer_cnt_get())*1000*(APP_TIMER_CONFIG_RTC_FREQUENCY+1)) / APP_TIMER_CLOCK_FREQ );