61 for(
int i = 7; i >= 0; i--){
62 int hex = (value >> i*4) & 0xF;
63 uart_write(inst, hex > 9 ?
'A' + hex - 10 :
'0' + hex);
void uart_writeStr(uart_instance_t *inst, const char *str)
Write string to UART.
void uart_write(uart_instance_t *inst, char data)
Writes a single character to the UART data register.
void uart_status_write(uart_instance_t *inst, u32 data)
Writes a value to the UART status register.
void uart_writeHex(uart_instance_t *inst, int value)
Write integer as decimal to UART.
u32 uart_status_read(uart_instance_t *inst)
Write 32-bit UART data.
void uart_RX_NotemptyInterruptEna(uart_instance_t *inst, char Ena)
Enable or Disable UART RX Not Empty Interrupt.
u32 uart_writeAvailability(uart_instance_t *inst)
Checks the availability of the UART buffer for writing data.
void uart_TX_emptyInterruptEna(uart_instance_t *inst, char Ena)
Enable or Disable UART TX Empty Interrupt.
u32 uart_readOccupancy(uart_instance_t *inst)
Checks the occupancy of the UART buffer for reading data.
u32 uart_read(uart_instance_t *inst)
Read 32-bit UART data.
void uart_applyConfig(uart_instance_t *inst)
Apply stored UART configuration to hardware.
u32 CLOCK_DIVIDER
Address Offset: 0x08 - Clock Divider Register */.
u32 DATA
Address Offset: 0x00 - Data Register */.
u32 FRAME_CONFIG
Address Offset: 0x0C - Frame Configuration Register */.
u32 STATUS
Address Offset: 0x04 - Status Register */.
UART instance. Holds the software registers and hardware pointer.
cfg_dataParity_t parity
Parity Configuration */.
cfg_dataLength_t dataLength
Data Length Configuration */.
uart_hwreg_t * hwreg
Pointer to Hardware Register Map */.
u32 clockDivider
Clock Divider Value */.
cfg_stopBits_t stop
Stop Bits Configuration */.
UART driver API definitions.