Ymodem ESP32 1.0.0
|
Example code to receive a file using Ymodem protocol. More...
#include "YmodemCore.h"
#include <Arduino.h>
#include <HardwareSerial.h>
#include <SPIFFS.h>
#include <Update.h>
Go to the source code of this file.
Macros | |
#define | CONFIG_SPIFFS_SIZE (2 * 1024 * 1024) |
#define | MAX_FILE_SIZE (CONFIG_SPIFFS_SIZE - 0x2000) |
#define | FIRMWARE_UPDATE |
Functions | |
void | setup () |
Setup function to initialize Serial, SPIFFS, and UART for YModem file reception. | |
void | loop () |
Main loop function for receiving and updating firmware via YModem protocol. | |
Variables | |
Ymodem | ymodem |
Example code to receive a file using Ymodem protocol.
This code is an example of how to use the Ymodem library to receive a file using the Ymodem protocol. The file is received through the Serial1 port and saved to the SPIFFS filesystem.
Definition in file ReceiveExample.cpp.
#define CONFIG_SPIFFS_SIZE (2 * 1024 * 1024) |
SPIFFS size in bytes
Definition at line 19 of file ReceiveExample.cpp.
#define FIRMWARE_UPDATE |
Uncomment this line to enable firmware update
Definition at line 21 of file ReceiveExample.cpp.
#define MAX_FILE_SIZE (CONFIG_SPIFFS_SIZE - 0x2000) |
Maximum file size
Definition at line 20 of file ReceiveExample.cpp.
void loop | ( | ) |
Main loop function for receiving and updating firmware via YModem protocol.
This function performs the following steps:
Definition at line 79 of file ReceiveExample.cpp.
void setup | ( | ) |
Setup function to initialize Serial, SPIFFS, and UART for YModem file reception.
This function performs the following tasks:
Definition at line 36 of file ReceiveExample.cpp.
Ymodem ymodem |
Ymodem instance
Definition at line 23 of file ReceiveExample.cpp.