Implementation of converting byte stream to string for common
bootloader part.
Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | ASCII_0 0x30 |
#define | ASCII_8 0x38 |
#define | ASCII_9 0x39 |
#define | ASCII_A 0x41 |
#define | DIFF_ASCII 0x37 |
#define | SIZE_PREBUFFER 64 |
Functions | |
static uint8_t | asciiToDig (uint8_t symbol) |
Convert ascii to digital. More... | |
void | convertStreamToNumbers (uint8_t *stream, uint8_t size) |
Waiting for a field of the type from the internal address. More... | |
bool | readFromPreBuffer (uint8_t *data) |
Read data byte from preparser buffer. More... | |
Variables | |
static uint8_t | placed |
static uint8_t | poR |
static uint8_t | preBuffer [SIZE_PREBUFFER] |
bool | srecFinished = false |
#define ASCII_0 0x30 |
Referenced by asciiToDig(), and convertStreamToNumbers().
#define ASCII_8 0x38 |
Referenced by convertStreamToNumbers().
#define ASCII_9 0x39 |
Referenced by asciiToDig().
#define ASCII_A 0x41 |
Referenced by asciiToDig().
#define DIFF_ASCII 0x37 |
Referenced by asciiToDig().
#define SIZE_PREBUFFER 64 |
|
static |
Convert ascii to digital.
[in] | symbol | - ascii code; |
References ASCII_0, ASCII_9, ASCII_A, and DIFF_ASCII.
Referenced by convertStreamToNumbers().
void convertStreamToNumbers | ( | uint8_t * | stream, |
uint8_t | size | ||
) |
Waiting for a field of the type from the internal address.
[in] | stream | - byte stream from usb; |
[in] | size | - size of the converted stream; |
References ASCII_0, ASCII_8, asciiToDig(), placed, preBuffer, S_SYMBOL, and srecFinished.
bool readFromPreBuffer | ( | uint8_t * | data | ) |
|
static |
Referenced by convertStreamToNumbers(), and readFromPreBuffer().
|
static |
Referenced by readFromPreBuffer().
|
static |
Referenced by convertStreamToNumbers(), and readFromPreBuffer().
Referenced by convertStreamToNumbers().