Wirepas SDK
usart.h File Reference

Go to the source code of this file.

Functions

void Usart_init (uint32_t baudrate)
 Initialize all USART blocks Enables peripheral clocks and disables peripherals for the duration of the initialization procedure. Clears all internal variables: Callback handlers Transfer busy flags After the initialization procedure is complete, it enables all peripherals, but leaves peripheral clocks disabled. More...
 
uint32_t Usart_sendBuffer (const void *buf, uint32_t len)
 Send a buffer to USART. More...
 

Function Documentation

◆ Usart_init()

void Usart_init ( uint32_t  baudrate)

Initialize all USART blocks Enables peripheral clocks and disables peripherals for the duration of the initialization procedure. Clears all internal variables: Callback handlers Transfer busy flags After the initialization procedure is complete, it enables all peripherals, but leaves peripheral clocks disabled.

Parameters
baudrateBaudrate to be used
Returns
none

◆ Usart_sendBuffer()

uint32_t Usart_sendBuffer ( const void *  buf,
uint32_t  len 
)

Send a buffer to USART.

Parameters
bufBuffer to send
lenSize of buffer to send
Note
This method will either send the whole buffer or nothing at all
Returns
Number of bytes written (zero or len)