Ymodem ESP32 1.0.0
Loading...
Searching...
No Matches
YmodemDef.h File Reference

Ymodem protocol definitions and configuration. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EX_UART_NUM   UART_NUM_0
 
#define BUF_SIZE   (1080)
 
#define YMODEM_LED_ACT   0
 
#define YMODEM_LED_ACT_ON   1
 
#define PACKET_SEQNO_INDEX   (1)
 
#define PACKET_SEQNO_COMP_INDEX   (2)
 
#define PACKET_HEADER   (3)
 
#define PACKET_TRAILER   (2)
 
#define PACKET_OVERHEAD   (PACKET_HEADER + PACKET_TRAILER)
 
#define PACKET_SIZE   (128)
 
#define PACKET_1K_SIZE   (1024)
 
#define FILE_SIZE_LENGTH   (16)
 
#define SOH   (0x01)
 
#define STX   (0x02)
 
#define EOT   (0x04)
 
#define ACK   (0x06)
 
#define NAK   (0x15)
 
#define CA   (0x18)
 
#define CRC16   (0x43)
 
#define ABORT1   (0x41)
 
#define ABORT2   (0x61)
 
#define NAK_TIMEOUT   (1000)
 
#define MAX_ERRORS   (100)
 
#define YM_MAX_FILESIZE   (10 * 1024 * 1024)
 

Detailed Description

Ymodem protocol definitions and configuration.

Author
Miguel Ferrer (mferr.nosp@m.er@i.nosp@m.nbiot.nosp@m..es)
Version
0.1
Date
2025-01-24

This file contains the definitions and configuration parameters for the Ymodem protocol. These parameters include packet sizes, control characters, timeouts, and other settings used in the Ymodem protocol implementation.

Definition in file YmodemDef.h.

Macro Definition Documentation

◆ ABORT1

#define ABORT1   (0x41)

'A' == 0x41, abort by sender

Definition at line 44 of file YmodemDef.h.

◆ ABORT2

#define ABORT2   (0x61)

'a' == 0x61, abort by receiver

Definition at line 45 of file YmodemDef.h.

◆ ACK

#define ACK   (0x06)

acknowledge

Definition at line 39 of file YmodemDef.h.

◆ BUF_SIZE

#define BUF_SIZE   (1080)

UART buffer size

Definition at line 19 of file YmodemDef.h.

◆ CA

#define CA   (0x18)

two of these in succession aborts transfer

Definition at line 41 of file YmodemDef.h.

◆ CRC16

#define CRC16   (0x43)

'C' == 0x43, request 16-bit CRC

Definition at line 42 of file YmodemDef.h.

◆ EOT

#define EOT   (0x04)

end of transmission

Definition at line 38 of file YmodemDef.h.

◆ EX_UART_NUM

#define EX_UART_NUM   UART_NUM_0

UART port number

Definition at line 18 of file YmodemDef.h.

◆ FILE_SIZE_LENGTH

#define FILE_SIZE_LENGTH   (16)

File size length

Definition at line 34 of file YmodemDef.h.

◆ MAX_ERRORS

#define MAX_ERRORS   (100)

Maximum number of errors allowed

Definition at line 48 of file YmodemDef.h.

◆ NAK

#define NAK   (0x15)

negative acknowledge

Definition at line 40 of file YmodemDef.h.

◆ NAK_TIMEOUT

#define NAK_TIMEOUT   (1000)

Timeout for NAK response

Definition at line 47 of file YmodemDef.h.

◆ PACKET_1K_SIZE

#define PACKET_1K_SIZE   (1024)

Packet 1K data size

Definition at line 33 of file YmodemDef.h.

◆ PACKET_HEADER

#define PACKET_HEADER   (3)

Packet header size

Definition at line 29 of file YmodemDef.h.

◆ PACKET_OVERHEAD

#define PACKET_OVERHEAD   (PACKET_HEADER + PACKET_TRAILER)

Packet overhead size

Definition at line 31 of file YmodemDef.h.

◆ PACKET_SEQNO_COMP_INDEX

#define PACKET_SEQNO_COMP_INDEX   (2)

Packet sequence number complement index

Definition at line 28 of file YmodemDef.h.

◆ PACKET_SEQNO_INDEX

#define PACKET_SEQNO_INDEX   (1)

Packet sequence number index

Definition at line 27 of file YmodemDef.h.

◆ PACKET_SIZE

#define PACKET_SIZE   (128)

Packet data size

Definition at line 32 of file YmodemDef.h.

◆ PACKET_TRAILER

#define PACKET_TRAILER   (2)

Packet trailer size

Definition at line 30 of file YmodemDef.h.

◆ SOH

#define SOH   (0x01)

start of 128-byte data packet

Definition at line 36 of file YmodemDef.h.

◆ STX

#define STX   (0x02)

start of 1024-byte data packet

Definition at line 37 of file YmodemDef.h.

◆ YM_MAX_FILESIZE

#define YM_MAX_FILESIZE   (10 * 1024 * 1024)

Maximum file size allowed

Definition at line 50 of file YmodemDef.h.

◆ YMODEM_LED_ACT

#define YMODEM_LED_ACT   0

GPIO pin number for activity LED, set to 0 if you dont have LED

Definition at line 23 of file YmodemDef.h.

◆ YMODEM_LED_ACT_ON

#define YMODEM_LED_ACT_ON   1

LED ON state, 1 for active high, 0 for active low

Definition at line 24 of file YmodemDef.h.