adapts to updated uart register layout
This commit is contained in:
@ -5,19 +5,19 @@
|
||||
#include "gen/uart.h"
|
||||
|
||||
static inline uint32_t uart_get_tx_free(volatile uart_t* reg){
|
||||
return get_uart_rx_tx_reg_tx_free(reg);
|
||||
return get_uart_status_reg_tx_free(reg);
|
||||
}
|
||||
|
||||
static inline uint32_t uart_get_tx_empty(volatile uart_t* reg){
|
||||
return get_uart_rx_tx_reg_tx_empty(reg);
|
||||
return get_uart_status_reg_tx_empty(reg);
|
||||
}
|
||||
|
||||
static inline uint32_t uart_get_rx_avail(volatile uart_t* reg){
|
||||
return get_uart_rx_tx_reg_rx_avail(reg);
|
||||
return get_uart_status_reg_rx_avail(reg);
|
||||
}
|
||||
|
||||
static inline void uart_write(volatile uart_t* reg, uint8_t data){
|
||||
while(get_uart_rx_tx_reg_tx_free(reg) == 0);
|
||||
while(get_uart_status_reg_tx_free(reg) == 0);
|
||||
set_uart_rx_tx_reg_data(reg, data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user