RTEMS: bsps/arm/atsam/contrib/libraries/libboard/include/dbg_console.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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.
void | DBG_PutChar (uint8_t uc)
| Outputs a character on the UART line.
uint32_t | DBG_GetChar (void)
| Input a character from the UART line.
uint32_t | DBG_IsRxReady (void)
| Check if there is Input from UART line.
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

  baudrate | Baudrate at which the USART should operate (in Hz).
  masterClock | Frequency 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

  pucFrame | Pointer to the frame to dump.
  dwSize | Buffer 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

  pucBuffer | Pointer to the buffer to dump.
  dwSize | Buffer size in bytes.
  dwAddress | Start 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

  pdwValue | Pointer to the uint32_t variable to contain the input value.

## ◆ DBG_GetInteger()

uint32_t DBG_GetInteger | ( | int32_t * | pdwValue | ) |

Reads an integer

Parameters

  pdwValue | Pointer 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

  pdwValue | Pointer to a integer variable to contain the input value.
  dwMin | Minimum value
  dwMax | Maximum 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

  c | Character to send.