Serial#

Common bootloader serial definitions.

See bootloader-serial.h for source code.

Functions#

void
serInit(void)

Initialize serial port.

void

Flush the transmiter.

void
serPutChar(uint8_t ch)

Transmit a character.

void
serPutStr(const char *str)

Transmit a string.

void
serPutBuf(const uint8_t buf[], uint8_t size)

Transmit a buffer.

void
serPutDecimal(uint16_t val)

Transmit a 16bit value in decimal.

void
serPutHex(uint8_t byte)

Transmit a byte as hex.

void
serPutHexInt(uint16_t word)

Transmit a 16bit integer as hex.

bool

Determine if a character is available.

uint8_t
serGetChar(uint8_t *ch)

Get a character if available, otherwise return an error.

void

Flush the receiver.

Function Documentation#

serInit#

void serInit (void )

Initialize serial port.

Parameters
N/A

Definition at line 32 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutFlush#

void serPutFlush (void )

Flush the transmiter.

Parameters
N/A

Definition at line 36 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutChar#

void serPutChar (uint8_t ch)

Transmit a character.

Parameters
N/Ach

A character.


Definition at line 41 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutStr#

void serPutStr (const char * str)

Transmit a string.

Parameters
N/Astr

A string.


Definition at line 46 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutBuf#

void serPutBuf (const uint8_t buf, uint8_t size)

Transmit a buffer.

Parameters
N/Abuf

A buffer.

N/Asize

Length of buffer.


Definition at line 52 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutDecimal#

void serPutDecimal (uint16_t val)

Transmit a 16bit value in decimal.

Parameters
N/Aval

The data to print.


Definition at line 57 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutHex#

void serPutHex (uint8_t byte)

Transmit a byte as hex.

Parameters
N/Abyte

A byte.


Definition at line 62 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serPutHexInt#

void serPutHexInt (uint16_t word)

Transmit a 16bit integer as hex.

Parameters
N/Aword

A 16bit integer.


Definition at line 67 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serCharAvailable#

bool serCharAvailable (void )

Determine if a character is available.

Parameters
N/A

Returns

  • true if a character is available, false otherwise.


Definition at line 72 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serGetChar#

uint8_t serGetChar (uint8_t * ch)

Get a character if available, otherwise return an error.

Parameters
N/Ach

Pointer to a location where the received byte will be placed.

Returns


Definition at line 78 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h

serGetFlush#

void serGetFlush (void )

Flush the receiver.

Parameters
N/A

Definition at line 82 of file /Users/vihuszar/Git/EmbeddedSoftware/super/platform/base/hal/micro/cortexm3/common/bootloader-serial.h