diff options
Diffstat (limited to 'testhal/STM32F1xx/RTC_FATTIME')
-rw-r--r-- | testhal/STM32F1xx/RTC_FATTIME/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/testhal/STM32F1xx/RTC_FATTIME/main.c b/testhal/STM32F1xx/RTC_FATTIME/main.c index 31a276310..c229830d0 100644 --- a/testhal/STM32F1xx/RTC_FATTIME/main.c +++ b/testhal/STM32F1xx/RTC_FATTIME/main.c @@ -32,6 +32,13 @@ /*===========================================================================*/
/*
+ * Endpoints to be used for USBD1.
+ */
+#define USBD1_DATA_REQUEST_EP 1
+#define USBD1_DATA_AVAILABLE_EP 1
+#define USBD1_INTERRUPT_REQUEST_EP 2
+
+/*
* Serial over USB Driver structure.
*/
static SerialUSBDriver SDU1;
@@ -290,7 +297,7 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { usbInitEndpointI(usbp, USB_CDC_INTERRUPT_REQUEST_EP, &ep2config);
/* Resetting the state of the CDC subsystem.*/
- sduConfigureHookI(usbp);
+ sduConfigureHookI(&SDU1);
chSysUnlockFromIsr();
return;
@@ -318,7 +325,10 @@ static const USBConfig usbcfg = { * Serial over USB driver configuration.
*/
static const SerialUSBConfig serusbcfg = {
- &USBD1
+ &USBD1,
+ USBD1_DATA_REQUEST_EP,
+ USBD1_DATA_AVAILABLE_EP,
+ USBD1_INTERRUPT_REQUEST_EP
};
/**
|