Ymodem ESP32 1.0.0
|
#include <YmodemCore.h>
Public Member Functions | |
Ymodem () | |
Constructor for the Ymodem class. | |
~Ymodem () | |
Destructor for the Ymodem class. | |
int | receive (fs::File &ffd, unsigned int maxsize, char *getname) |
Receives data and writes it to the provided file. | |
int | transmit (char *sendFileName, unsigned int sizeFile, fs::File &ffd) |
Transmits a file using the Ymodem protocol. | |
void | setLedPin (int pin) |
Sets the pin number for the LED. | |
int | getLedPin () |
Retrieves the pin number associated with the LED. | |
Ymodem class.
This class provides high-level functions for sending and receiving files using the Ymodem protocol. It encapsulates the low-level packet processing and communication functions to simplify the file transfer process.
Definition at line 29 of file YmodemCore.h.
Ymodem::Ymodem | ( | ) |
Constructor for the Ymodem class.
Initializes a new instance of the Ymodem class.
Definition at line 17 of file YmodemCore.cpp.
|
inline |
Destructor for the Ymodem class.
This destructor is responsible for cleaning up any resources that the Ymodem class may have allocated during its lifetime. Currently, it does not perform any specific actions.
Definition at line 46 of file YmodemCore.h.
int Ymodem::getLedPin | ( | ) |
Retrieves the pin number associated with the LED.
Definition at line 30 of file YmodemCore.cpp.
int Ymodem::receive | ( | fs::File & | ffd, |
unsigned int | maxsize, | ||
char * | getname ) |
Receives data and writes it to the provided file.
ffd | Reference to the file where the received data will be written. |
maxsize | Maximum size of the data to be received. |
getname | Pointer to a character array where the name of the received file will be stored. |
Definition at line 51 of file YmodemCore.cpp.
void Ymodem::setLedPin | ( | int | pin | ) |
Sets the pin number for the LED.
This function configures the specified pin to be used for controlling an LED.
pin | The pin number to be set for the LED. |
Definition at line 22 of file YmodemCore.cpp.
int Ymodem::transmit | ( | char * | sendFileName, |
unsigned int | sizeFile, | ||
fs::File & | ffd ) |
Transmits a file using the Ymodem protocol.
sendFileName | The name of the file to be transmitted. |
sizeFile | The size of the file to be transmitted. |
ffd | A reference to the file object to be transmitted. |
Definition at line 69 of file YmodemCore.cpp.