Microchip® Advanced Software Framework

srecParser.h File Reference

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 EEPROM_AREA_SIZE   0x1000
 
#define EEPROM_END_ADDRESS   0x3FFFF
 
#define EEPROM_START_ADDRESS   0x00400000
 
#define FLASH_END_ADDRESS   (0x3FFFF)
 
#define FLASH_START_ADDRESS   0x000000
 
#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 EEPROM_AREA_SIZE   0x1000
#define EEPROM_END_ADDRESS   0x3FFFF

Referenced by srecProtocol().

#define EEPROM_START_ADDRESS   0x00400000

Referenced by srecProtocol().

#define FLASH_END_ADDRESS   (0x3FFFF)
#define FLASH_START_ADDRESS   0x000000
#define HANDSHAKE_CONF   0x26d2d369
#define HANDSHAKE_REQ   0x4b65a5b2

Referenced by bootScanInterfaces().

#define NACK   0xb25a592d
#define S_SYMBOL   0x53
#define SRECORD_SIZE   128

Enumerator
S0 
S1 
S2 
S3 
S5 
S7 
S19 
S9 

void convertStreamToNumbers ( uint8_t *  stream,
uint8_t  size 
)

Waiting for a field of the type from the internal address.

Parameters
[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)

Read data byte from preparser buffer.

Parameters
[in]data- pointer to memory for data byte;
Returns
true - there is data byte; false - preparser buffer is empty

References placed, poR, and preBuffer.

void srecHandshake ( void  )