TLx493D 3D Hall Sensor Generic Library  0.2
Generic library for the TLx493D 3D Hall sensor family
uart.h
Go to the documentation of this file.
1 /*
2  * uart.h
3  *
4  * Created on: Sep 3, 2018
5  * Author: nicolaem
6  */
7 
11 #ifndef SRC_PERIPHERALS_UART_UART_H_
12 #define SRC_PERIPHERALS_UART_UART_H_
13 
14 #include <stdint.h>
15 #include <stdbool.h>
16 
17 
18 
20 void UART_init(void);
21 
23 uint8_t UART_available(void);
24 
27 void UART_read(uint8_t *data, uint32_t count);
28 
30 uint8_t UART_read_byte(void);
31 
33 void UART_clear_rx_fifo(void);
34 
36 void UART_write(void *data, uint32_t count);
37 
38 #endif /* SRC_PERIPHERALS_UART_UART_H_ */
void UART_write(void *data, uint32_t count)
Write count bytes from the data array to UART.
Definition: uart.c:76
void UART_init(void)
Initialize the UART peripheral.
Definition: uart.c:17
uint8_t UART_read_byte(void)
Read last received data byte. Not blocking.
Definition: uart.c:64
void UART_clear_rx_fifo(void)
Discard all data from the receive FIFO buffer.
Definition: uart.c:94
void UART_read(uint8_t *data, uint32_t count)
Read count bytes to the data array. If not enough bytes available, will block until available...
Definition: uart.c:48
uint8_t UART_available(void)
Return number of bytes available for reading.
Definition: uart.c:70