small improvements
This commit is contained in:
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user