19 pinMode(ledPin, OUTPUT);
26 pinMode(ledPin, OUTPUT);
27 log_i(
"LED pin set to %d", ledPin);
44void Ymodem::finalizeSession()
54 unsigned int session_done = 0, errors = 0;
56 while (!session_done) {
#define YMODEM_LED_ACT_ON
int handleFileSession(fs::File &ffd, unsigned int maxsize, char *getname, unsigned int *session_done, unsigned int *errors)
Handles a file session for receiving data.
int sendInitialPacket(char *sendFileName, unsigned int sizeFile)
Sends the initial packet for a file transfer using the Ymodem protocol.
int sendFileBlocks(unsigned int sizeFile, fs::File &ffd)
Sends file blocks over a communication channel.
int waitForReceiverResponse()
Waits for a response from the receiver.
int sendEOT()
Sends the End Of Transmission (EOT) signal.
int sendLastPacket()
Sends the last packet in the Ymodem transmission.
int getLedPin()
Retrieves the pin number associated with the LED.
Ymodem()
Constructor for the Ymodem class.
int receive(fs::File &ffd, unsigned int maxsize, char *getname)
Receives data and writes it to the provided file.
void setLedPin(int pin)
Sets the pin number for the LED.
int transmit(char *sendFileName, unsigned int sizeFile, fs::File &ffd)
Transmits a file using the Ymodem protocol.