Declaration of parser of the srec format interface.
Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.
#include "parts.h"
Macros | |
#define | ACK 0xb49a5a4d |
#define | CHECKSUM_AREA_SIZE 1 |
#define | HANDSHAKE_CONF 0x26d2d369 |
#define | HANDSHAKE_REQ 0x4b65a5b2 |
#define | NACK 0xb25a592d |
#define | S_SYMBOL 0x53 |
#define | SRECORD_SIZE 128 |
Enumerations | |
enum | SrecordType_t { S0 = 0x5330, S1 = 0x5331, S2 = 0x5332, S3 = 0x5333, S5 = 0x5335, S7 = 0x5337, S19 = 0x5338, S9 = 0x5339 } |
Functions | |
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... | |
void | srecHandshake (void) |
Handshake procedure. More... | |
void | srecProtocol (void) |
Communication support between host and mcu. More... | |
#define ACK 0xb49a5a4d |
#define CHECKSUM_AREA_SIZE 1 |
Referenced by srecParser().
#define HANDSHAKE_CONF 0x26d2d369 |
#define HANDSHAKE_REQ 0x4b65a5b2 |
Referenced by bootScanInterfaces().
#define NACK 0xb25a592d |
#define S_SYMBOL 0x53 |
Referenced by convertStreamToNumbers(), and srecWaitForType().
#define SRECORD_SIZE 128 |
enum SrecordType_t |
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 | ) |
void srecHandshake | ( | void | ) |
Handshake procedure.
References bootScanInterfaces(), bootSetChar(), bootUnInitSerializer(), flag, handshakeConf, lowLevelUnInit(), RESET_FLAG, and system_reset().
Referenced by Boot_main().
void srecProtocol | ( | void | ) |
Communication support between host and mcu.
References BootBuffer_t::address, bootSetChar(), bootUnInitSerializer(), BootBuffer_t::dataSize, eepromFlushPage(), eepromPacketToPage(), flag, flashFlushPage(), flashPacketToPage(), i, lowLevelUnInit(), nvm_erase_row(), previousAddress, BootBuffer_t::recordType, RESET_FLAG, S0, S19, S5, S7, S9, srecACK, srecNACK, srecParser(), and system_reset().
Referenced by Boot_main().