13#include "stm32f439xx.h"
19#define UART_PARITY_DISABLE 0x400
20#define UART_SYNC_DISABLE 0xE00
21#define UART_FLOW_DISABLE 0x300
22#define UART_ENABLE 0x2000
23#define UART_RX_ENABLE 0x0004
24#define UART_TX_ENABLE 0x0008
31#define CARRIAGE_RETURN 0x0D
54 USART_TypeDef *interface;
59 void (*setBaud)(
struct UART *, uint32_t);
68void UART_setBaud(
UART *, uint32_t);
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 *, uint8_t data)
Sends a single byte of data over the UART interface.
void UART_print(UART *, char *data)
Sends a string of characters over the UART interface.
void _UART_setup(UART *, UART_Pins)
Configures the UART interface for communication.
DeviceHandle_t UART_init(UART *, char[DEVICE_NAME_LENGTH], USART_TypeDef *, GPIO_TypeDef *, UART_Pins, uint32_t, OversampleMode)
Initialiser for a UART device interface.
void UART_sendBytes(UART *, uint8_t *data, int length)
Sends an array of bytes over the UART interface.
uint8_t UART_receive(UART *)
Receives a single byte of data from the UART interface.
Struct definition for UART interface.