|
@@ -245,7 +245,7 @@ typedef enum
|
|
/** @brief packet structure that holds several information about its content */
|
|
/** @brief packet structure that holds several information about its content */
|
|
typedef struct
|
|
typedef struct
|
|
{
|
|
{
|
|
- uint16_t size; /**< site of the packet (128 or 1024) */
|
|
|
|
|
|
+ uint16_t size; /**< size of the packet (128 or 1024) */
|
|
uint8_t packetNumber; /**< packet number in this packet */
|
|
uint8_t packetNumber; /**< packet number in this packet */
|
|
uint8_t* packetData; /**< pointer to the data of this packet */
|
|
uint8_t* packetData; /**< pointer to the data of this packet */
|
|
uint16_t crc; /**< crc checksum in this packet */
|
|
uint16_t crc; /**< crc checksum in this packet */
|
|
@@ -256,13 +256,13 @@ typedef struct
|
|
*/
|
|
*/
|
|
typedef struct
|
|
typedef struct
|
|
{
|
|
{
|
|
- shellmatta_ymodem_state_t state; /**< current stat of the ymodem module */
|
|
|
|
|
|
+ shellmatta_ymodem_state_t state; /**< current state of the ymodem module */
|
|
uint32_t byteCounter; /**< internal counter for processing input data */
|
|
uint32_t byteCounter; /**< internal counter for processing input data */
|
|
- uint32_t packetCounter; /**< counter of the totally received packets */
|
|
|
|
- uint32_t totalBytesReceived; /**< counter of the totally received bytes */
|
|
|
|
|
|
+ uint32_t packetCounter; /**< counter of received packets */
|
|
|
|
+ uint32_t totalBytesReceived; /**< counter of received bytes */
|
|
uint32_t fileSize; /**< size of the file received in packet 0 */
|
|
uint32_t fileSize; /**< size of the file received in packet 0 */
|
|
bool pauseRequested; /**< pause requested from the application */
|
|
bool pauseRequested; /**< pause requested from the application */
|
|
- uint32_t pollCyclesLeft; /**< number of poll cycles left before ending */
|
|
|
|
|
|
+ uint32_t pollCyclesLeft; /**< number of poll cycles left before finish */
|
|
uint32_t cancelCounter; /**< counter to count the amount of cancels */
|
|
uint32_t cancelCounter; /**< counter to count the amount of cancels */
|
|
shellmatta_ymodem_packet_t packet; /**< currently processed packet */
|
|
shellmatta_ymodem_packet_t packet; /**< currently processed packet */
|
|
shellmatta_ymodem_cancel_t cancelCallback; /**< callback to pass cancel events */
|
|
shellmatta_ymodem_cancel_t cancelCallback; /**< callback to pass cancel events */
|