feat(ex01): done
This commit is contained in:
parent
24e2e0f76f
commit
b7580c043c
23 changed files with 1453 additions and 0 deletions
29
ex01/include/uart.h
Normal file
29
ex01/include/uart.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef UART_H
|
||||
#define UART_H
|
||||
|
||||
#include "mystd.h"
|
||||
|
||||
void uart_init(void);
|
||||
|
||||
void uart_tx(char data);
|
||||
void uart_sendstring(const char* str);
|
||||
|
||||
void uart_send_u8(uint8_t val);
|
||||
void uart_send_u16(uint16_t val);
|
||||
void uart_send_u32(uint32_t val);
|
||||
|
||||
|
||||
void uart_send_i16(int16_t val);
|
||||
|
||||
void uart_send_u8_hex(uint8_t val);
|
||||
void uart_send_u16_hex(uint16_t val);
|
||||
|
||||
|
||||
static inline void print_hex_value(char c)
|
||||
{
|
||||
uart_send_u8_hex(c);
|
||||
}
|
||||
|
||||
char uart_rx(void);
|
||||
|
||||
#endif /* UART_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue