Microchip® Advanced Software Framework

uartSerializer.h File Reference

Declaration of uart serialize interface.

Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.

#include <types.h>
#include <board.h>
#include <fcpu.h>

Macros

#define BAUD_RATE   38400ul
 
#define INFINITE   true
 
#define USE_USART0   1
 
#define USE_USART1   0
 

Functions

bool getByteUsart (uint8_t *p)
 Receive byte on uart. More...
 
void hwInitUsart0 (void)
 Startup initialization of the usart0. More...
 
void hwUnInitUsart0 (void)
 Clear startup initialization parameters to start user application. More...
 
void setByteUsart (uint16_t len, uint8_t *p)
 Transmit byte to uart. More...
 
void usart_disable0 (void)
 

#define BAUD_RATE   38400ul
#define INFINITE   true
#define USE_USART0   1
#define USE_USART1   0

bool getByteUsart ( uint8_t *  p)

Receive byte on uart.

Parameters
[out]p- pointer to byte memory;
Returns
true - there is received byte;
false - there is not received byte;

References host_uart_module, STATUS_OK, and usart_read_wait().

void hwUnInitUsart0 ( void  )

Clear startup initialization parameters to start user application.

References host_uart_module, hwUnInit(), usart_disable_transceiver(), usart_reset(), USART_TRANSCEIVER_RX, and USART_TRANSCEIVER_TX.

Referenced by usart_disable0().

void setByteUsart ( uint16_t  length,
uint8_t *  data 
)

Transmit byte to uart.

Parameters
[in]len- number of bytes to transmit;
[in]p- pointer to byte memory;

References host_uart_module, STATUS_OK, and usart_write_wait().