stm32: Update components to work with new H7xx HAL.

This commit is contained in:
Damien George
2019-07-03 23:40:49 +10:00
parent 9083166c4f
commit 73e8b7e0e4
7 changed files with 13 additions and 7 deletions

View File

@@ -88,6 +88,8 @@ void uart_tx_strn(pyb_uart_obj_t *uart_obj, const char *str, uint len);
static inline bool uart_tx_avail(pyb_uart_obj_t *self) {
#if defined(STM32F4)
return self->uartx->SR & USART_SR_TXE;
#elif defined(STM32H7)
return self->uartx->ISR & USART_ISR_TXE_TXFNF;
#else
return self->uartx->ISR & USART_ISR_TXE;
#endif