Common bootloader serial definitions.
Functions |
|
| void | serInit (void) |
|
Initialize serial port.
|
|
| void | serPutFlush (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 | serCharAvailable (void) |
|
Determine if a character is available.
|
|
| uint8_t | serGetChar (uint8_t *ch) |
|
Get a character if available, otherwise return an error.
|
|
| void | serGetFlush (void) |
|
Flush the receiver.
|
|
Detailed Description
See
bootloader-serial.h
for source code.
Function Documentation
| bool serCharAvailable | ( | void |
|
) |
- Returns
- true if a character is available, false otherwise.
| uint8_t serGetChar | ( | uint8_t * |
ch
|
) |
- Parameters
-
chPointer to a location where the received byte will be placed.
- Returns
- BL_SUCCESS if a character was obtained, BL_ERR otherwise.
| void serGetFlush | ( | void |
|
) |
| void serInit | ( | void |
|
) |
| void serPutBuf | ( | const uint8_t |
buf[],
|
| uint8_t |
size
|
||
| ) |
- Parameters
-
bufA buffer. sizeLength of buffer.
| void serPutChar | ( | uint8_t |
ch
|
) |
- Parameters
-
chA character.
| void serPutDecimal | ( | uint16_t |
val
|
) |
- Parameters
-
valThe data to print.
| void serPutFlush | ( | void |
|
) |
| void serPutHex | ( | uint8_t |
byte
|
) |
- Parameters
-
byteA byte.
| void serPutHexInt | ( | uint16_t |
word
|
) |
- Parameters
-
wordA 16bit integer.
| void serPutStr | ( | const char * |
str
|
) |
- Parameters
-
strA string.