software_APIs  1.0.0
Functions
uart_api.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void UART_enableTX (bool is_enable)
 
void UART_enableRX (bool is_enable)
 
char UART_readChar ()
 
void UART_popChar ()
 
char * UART_readLine ()
 
void print (const char *p)
 
void UART_sendChar (char c)
 
void UART_sendInt (int data)
 

Function Documentation

◆ print()

void print ( const char *  p)

Send ASCII symbol or symbols through UART

TX mode have to be enabled

◆ UART_enableRX()

void UART_enableRX ( bool  is_enable)

Enable or disable RX of UART

Parameters
is_enablewhen 1(true) UART RX enable, 0 (false) UART RX disable
Note
Some caravel CPU enable and disable UART TX and RX together

◆ UART_enableTX()

void UART_enableTX ( bool  is_enable)

Enable or disable TX of UART

Parameters
is_enablewhen 1(true) UART TX enable, 0 (false) UART TX disable
Note
Some caravel CPU enable and disable UART TX and RX together

◆ UART_popChar()

void UART_popChar ( )

Pop the first ASCII symbol of the UART received queue

UART_readChar() function would keeping reading the same symbol unless this function is called

◆ UART_readChar()

char UART_readChar ( )

Wait receiving ASCII symbol and return it.

Return the first ASCII symbol of the UART received queue

RX mode have to be enabled

◆ UART_readLine()

char* UART_readLine ( )

read full line msg and return it

◆ UART_sendChar()

void UART_sendChar ( char  c)

Send ASCII char through UART

Parameters
cASCII char to send

TX mode have to be enabled

◆ UART_sendInt()

void UART_sendInt ( int  data)

Send int through UART the int would be sent as 8 hex characters

Parameters
cint to send

TX mode have to be enabled