18#define UART_PARITY_DISABLE 0x400
19#define UART_SYNC_DISABLE 0xE00
20#define UART_FLOW_DISABLE 0x300
21#define UART_ENABLE 0x2000
22#define UART_RX_ENABLE 0x0004
23#define UART_TX_ENABLE 0x0008
30#define CARRIAGE_RETURN 0x0D
58 void (*setBaud)(
struct UART *, uint32_t);
59 void (*
send)(
struct UART *, uint8_t);
61 void (*
print)(
struct UART *,
char *);
67void UART_setBaud(
UART_t *, uint32_t);
Universal Synchronous Asynchronous Receiver Transmitter.
void(* print)(struct UART *, char *)
UART print string method.
void(* sendBytes)(struct UART *, uint8_t *, int)
UART send multiple bytes method.
void(* send)(struct UART *, uint8_t)
UART send method.
uint8_t(* receive)(struct UART *)
UART receive method.
void UART_send(UART_t *, uint8_t data)
Sends a single byte of data over the UART interface.
void UART_sendBytes(UART_t *, uint8_t *data, int length)
Sends an array of bytes over the UART interface.
void _UART_setup(UART_t *, UART_Pins)
Configures the UART interface for communication.
uint8_t UART_receive(UART_t *)
Receives a single byte of data from the UART interface.
UART_t UART_init(UART_t *, USART_TypeDef *, GPIO_TypeDef *, UART_Pins, uint32_t, OversampleMode)
Initialiser for a UART device interface.
void UART_print(UART_t *, char *data)
Sends a string of characters over the UART interface.
Struct definition for UART interface.
CMSIS STM32F439xx Device Peripheral Access Layer Header File.