RTEMS  5.1
Functions
dbg_console.h File Reference
#include <stdint.h>

Go to the source code of this file.

Functions

void DBG_Configure (uint32_t dwBaudrate, uint32_t dwMasterClock)
 Configures an USART peripheral with the specified parameters. More...
 
void DBG_PutChar (uint8_t uc)
 Outputs a character on the UART line. More...
 
uint32_t DBG_GetChar (void)
 Input a character from the UART line. More...
 
uint32_t DBG_IsRxReady (void)
 Check if there is Input from UART line. More...
 
void DBG_DumpFrame (uint8_t *pucFrame, uint32_t dwSize)
 
void DBG_DumpMemory (uint8_t *pucBuffer, uint32_t dwSize, uint32_t dwAddress)
 
uint32_t DBG_GetInteger (int32_t *pdwValue)
 
uint32_t DBG_GetIntegerMinMax (int32_t *pdwValue, int32_t dwMin, int32_t dwMax)
 
uint32_t DBG_GetHexa32 (uint32_t *pdwValue)
 

Detailed Description

Include function prototype for the UART console.

Function Documentation

◆ DBG_Configure()

void DBG_Configure ( uint32_t  baudrate,
uint32_t  masterClock 
)

Configures an USART peripheral with the specified parameters.

Parameters
baudrateBaudrate at which the USART should operate (in Hz).
masterClockFrequency of the system master clock (in Hz).

◆ DBG_DumpFrame()

void DBG_DumpFrame ( uint8_t *  pucFrame,
uint32_t  dwSize 
)

Displays the content of the given frame on the UART0.

Parameters
pucFramePointer to the frame to dump.
dwSizeBuffer size in bytes.

◆ DBG_DumpMemory()

void DBG_DumpMemory ( uint8_t *  pucBuffer,
uint32_t  dwSize,
uint32_t  dwAddress 
)

Displays the content of the given buffer on the UART0.

Parameters
pucBufferPointer to the buffer to dump.
dwSizeBuffer size in bytes.
dwAddressStart address to display

◆ DBG_GetChar()

uint32_t DBG_GetChar ( void  )

Input a character from the UART line.

Note
This function is synchronous
Returns
character received.

◆ DBG_GetHexa32()

uint32_t DBG_GetHexa32 ( uint32_t *  pdwValue)

Reads an hexadecimal number

Parameters
pdwValuePointer to the uint32_t variable to contain the input value.

◆ DBG_GetInteger()

uint32_t DBG_GetInteger ( int32_t *  pdwValue)

Reads an integer

Parameters
pdwValuePointer to a integer variable to contain the input value.
Returns
success(1) or failure(0)

◆ DBG_GetIntegerMinMax()

uint32_t DBG_GetIntegerMinMax ( int32_t *  pdwValue,
int32_t  dwMin,
int32_t  dwMax 
)

Reads an integer and check the value

Parameters
pdwValuePointer to a integer variable to contain the input value.
dwMinMinimum value
dwMaxMaximum value
Returns
success(1) or failure(0)

◆ DBG_IsRxReady()

uint32_t DBG_IsRxReady ( void  )

Check if there is Input from UART line.

Returns
true if there is Input.

◆ DBG_PutChar()

void DBG_PutChar ( uint8_t  c)

Outputs a character on the UART line.

Note
This function is synchronous (i.e. uses polling).
Parameters
cCharacter to send.