File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ size_t uart_debug_write(uint8_t *data, uint32_t size)
633
633
*/
634
634
uint8_t serial_rx_active (serial_t * obj )
635
635
{
636
- return ((obj == NULL ) ? 1 : ( HAL_UART_GetState (uart_handlers [obj -> index ]) == HAL_UART_STATE_BUSY_RX ) );
636
+ return ((HAL_UART_GetState (uart_handlers [obj -> index ]) & HAL_UART_STATE_BUSY_RX ) == HAL_UART_STATE_BUSY_RX );
637
637
}
638
638
639
639
/**
@@ -644,7 +644,7 @@ uint8_t serial_rx_active(serial_t *obj)
644
644
*/
645
645
uint8_t serial_tx_active (serial_t * obj )
646
646
{
647
- return ((obj == NULL ) ? 1 : ( HAL_UART_GetState (uart_handlers [obj -> index ]) == HAL_UART_STATE_BUSY_TX ) );
647
+ return ((HAL_UART_GetState (uart_handlers [obj -> index ]) & HAL_UART_STATE_BUSY_TX ) == HAL_UART_STATE_BUSY_TX );
648
648
}
649
649
650
650
/**
You can’t perform that action at this time.
0 commit comments