couldn't get g4 usb clock and pin setup just yet. Leave it as it is for now

This commit is contained in:
hathach
2021-11-04 17:52:55 +07:00
parent f90f5ea369
commit 310f287f44
2 changed files with 52 additions and 4 deletions
+17 -4
View File
@@ -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();
}