Add example USART driver
This commit is contained in:
12
os/driver/usart.h
Normal file
12
os/driver/usart.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <stdint.h>
|
||||
#define TIMEOUT 1000
|
||||
|
||||
enum UartErrorCode {
|
||||
USART_TX_ERROR,
|
||||
USART_TX_BUSY,
|
||||
USART_TX_COMPLETE
|
||||
};
|
||||
|
||||
static uint32_t usart_tx_ready(void);
|
||||
uint32_t usart_tx_write(const uint8_t *data_bytes, uint32_t n_bytes);
|
||||
uint32_t usart_tx_write_string(const uint8_t *data_bytes);
|
||||
Reference in New Issue
Block a user