small improvements

This commit is contained in:
Conor Patrick
2019-01-02 20:59:37 -05:00
parent 8e8d74c5ad
commit b8a27eadca
6 changed files with 88 additions and 30 deletions

View File

@@ -124,6 +124,22 @@ void usb_init(void);
void usbhid_init()
{
usb_init();
#if DEBUG_LEVEL>1
wait_for_usb_tether();
#endif
}
void wait_for_usb_tether()
{
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
;
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
;
delay(10);
while (USBD_OK != CDC_Transmit_FS("tethered\r\n", 10) )
;
}
int usbhid_recv(uint8_t * msg)

View File

@@ -210,7 +210,6 @@ void usb_init()
USBD_Composite_Set_Classes(&USBD_HID, &USBD_CDC);
// USBD_Composite_Set_Classes(&USBD_CDC, &USBD_CDC);
in_endpoint_to_class[HID_EPIN_ADDR & 0x7F] = 0;
out_endpoint_to_class[HID_EPOUT_ADDR & 0x7F] = 0;