migrate
This commit is contained in:
28
fw/stm8s/common/inc/uart.h
Normal file
28
fw/stm8s/common/inc/uart.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef UART_H
|
||||
#define UART_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef BAUDRATE
|
||||
#define BAUDRATE 115200
|
||||
#endif
|
||||
|
||||
#ifndef F_CPU
|
||||
#warning "F_CPU not defined, using 2MHz by default"
|
||||
#define F_CPU 2000000UL
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialize UART1.
|
||||
* Mode: 8-N-1, flow-control: none.
|
||||
*
|
||||
* PD5 -> TX
|
||||
* PD6 -> RX
|
||||
*/
|
||||
void uart_init();
|
||||
|
||||
void uart_write(uint8_t data);
|
||||
|
||||
uint8_t uart_read();
|
||||
|
||||
#endif /* UART_H */
|
||||
Reference in New Issue
Block a user