Skip to content

Class UartHAL

ClassList > UartHAL

Handles usart 1 for the SPIN board. More...

  • #include <UartHAL.h>

Public Functions

Type Name
void usart1Init ()
Library initialization function for the usart communication. This function is declared on the private section of the .c file.
char usart1ReadChar ()
This function sends back a single character waiting to be treated from the usart1.
void usart1SwapRxTx ()
This function swaps the usart RX and TX pins. It should be called in conjunction with a board version setup.
void usart1WriteChar (char data)
This function transmits a single character through the usart 1.

Detailed Description

Note:

Use this element to initialize and send messages via usart 1

Public Functions Documentation

function usart1Init

void UartHAL::usart1Init () 

function usart1ReadChar

This function sends back a single character waiting to be treated from the usart1.

char UartHAL::usart1ReadChar () 

Returns:

This function returns a single char which is waiting to be treated if no char is waiting it returns an 'x' which should be treated as an error


function usart1SwapRxTx

void UartHAL::usart1SwapRxTx () 

function usart1WriteChar

This function transmits a single character through the usart 1.

void UartHAL::usart1WriteChar (
    char data
) 

Parameters:

  • data single char to be sent out


The documentation for this class was generated from the following file docs/core/zephyr/modules/owntech_spin_api/zephyr/src/UartHAL.h