Fix F4 BSP without UART_DEV.

This commit is contained in:
HiFiPhile
2024-11-10 12:32:22 +01:00
committed by hathach
parent f918c4a978
commit 9f626fe179

View File

@@ -53,6 +53,7 @@ void OTG_HS_IRQHandler(void) {
//--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM
//--------------------------------------------------------------------+
#ifdef UART_DEV
UART_HandleTypeDef UartHandle = {
.Instance = UART_DEV,
.Init = {
@@ -65,6 +66,7 @@ UART_HandleTypeDef UartHandle = {
.OverSampling = UART_OVERSAMPLING_16
}
};
#endif
void board_init(void) {
board_clock_init();
@@ -233,7 +235,7 @@ int board_uart_write(void const *buf, int len) {
HAL_UART_Transmit(&UartHandle, (uint8_t *) (uintptr_t) buf, len, 0xffff);
return len;
#else
(void) buf; (void) len; (void) UartHandle;
(void) buf; (void) len;
return 0;
#endif
}