XMODEM ParserComponents > Communication > Utils

Description

Parser for XMODEM packets.

XMODEM packet parser supporting XMODEM-CRC.

Modules

Commands
 

Data Structures

struct  XmodemPacket_t
 XMODEM packet.
 

Macros

#define XMODEM_DATA_SIZE   128
 Size of an XMODEM packet.
 

Functions

void xmodem_reset (void)
 
int32_t xmodem_parsePacket (XmodemPacket_t *packet, uint8_t *response)
 
uint8_t xmodem_getLastPacketNumber (void)
 

Function Documentation

void xmodem_reset ( void  )

Reset the XMODEM parser to start a new transfer

int32_t xmodem_parsePacket ( XmodemPacket_t packet,
uint8_t *  response 
)

Parse an XMODEM packet.

Parameters
[in]packetThe XMODEM packet to parse.
[out]responseThe XMODEM response to the parsed frame
Returns
BOOTLOADER_OK on success, else error code
uint8_t xmodem_getLastPacketNumber ( void  )

Return the packet number of the last packet that was successfully parsed.

Returns
Last packet number received. Defaults to 0 if nothing has been received yet.