couldn't get g4 usb clock and pin setup just yet. Leave it as it is for now
This commit is contained in:
+17
-4
@@ -31,14 +31,19 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||
//--------------------------------------------------------------------+
|
||||
void OTG_FS_IRQHandler(void)
|
||||
void USB_HP_IRQHandler(void)
|
||||
{
|
||||
tud_int_handler(0);
|
||||
}
|
||||
|
||||
void OTG_HS_IRQHandler(void)
|
||||
void USB_LP_IRQHandler(void)
|
||||
{
|
||||
tud_int_handler(1);
|
||||
tud_int_handler(0);
|
||||
}
|
||||
|
||||
void USBWakeUp_IRQHandler(void)
|
||||
{
|
||||
tud_int_handler(0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -111,7 +116,15 @@ void board_init(void)
|
||||
HAL_UART_Init(&UartHandle);
|
||||
#endif
|
||||
|
||||
// TODO Configure USB GPIOs
|
||||
// USB Pins TODO double check USB clock and pin setup
|
||||
// Configure USB DM and DP pins. This is optional, and maintained only for user guidance.
|
||||
// GPIO_InitStruct.Pin = (GPIO_PIN_11 | GPIO_PIN_12);
|
||||
// GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
// GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
// GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
// HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
//
|
||||
// __HAL_RCC_USB_CLK_ENABLE();
|
||||
|
||||
board_vbus_sense_init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user