Initial commit of Arduino libraries
This commit is contained in:
13
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.cpp
Normal file
13
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
/****************************************************************************************************************************
|
||||
multiFileProject.cpp
|
||||
For ESP32
|
||||
|
||||
AsyncTCP_SSL is a library for the ESP32
|
||||
|
||||
Built by Khoi Hoang https://github.com/khoih-prog/AsyncTCP_SSL
|
||||
Licensed under MIT license
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
// To demo how to include files in multi-file Projects
|
||||
|
||||
#include "multiFileProject.h"
|
||||
22
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.h
Normal file
22
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/****************************************************************************************************************************
|
||||
multiFileProject.h
|
||||
For ESP32
|
||||
|
||||
AsyncTCP_SSL is a library for the ESP32
|
||||
|
||||
Built by Khoi Hoang https://github.com/khoih-prog/AsyncTCP_SSL
|
||||
Licensed under MIT license
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
// To demo how to include files in multi-file Projects
|
||||
|
||||
#pragma once
|
||||
|
||||
// Use larger queue size if necessary for large data transfer. Default is 512 bytes if not defined here
|
||||
#define ASYNC_QUEUE_LENGTH 512
|
||||
|
||||
// Use larger priority if necessary. Default is 10 if not defined here. Must be > 4 or adjusted to 4
|
||||
#define CONFIG_ASYNC_TCP_PRIORITY (12)
|
||||
|
||||
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
|
||||
#include "AsyncTCP_SSL.hpp"
|
||||
49
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.ino
Normal file
49
AsyncTCP_SSL/examples/multiFileProject/multiFileProject.ino
Normal file
@@ -0,0 +1,49 @@
|
||||
/****************************************************************************************************************************
|
||||
multiFileProject.ino
|
||||
For ESP32
|
||||
|
||||
AsyncTCP_SSL is a library for the ESP32
|
||||
|
||||
Built by Khoi Hoang https://github.com/khoih-prog/AsyncTCP_SSL
|
||||
Licensed under MIT license
|
||||
*****************************************************************************************************************************/
|
||||
|
||||
// To demo how to include files in multi-file Projects
|
||||
|
||||
#if !( defined(ESP32) )
|
||||
#error This code is intended to run on the ESP32 platform! Please check your Tools->Board setting.
|
||||
#endif
|
||||
|
||||
#define ASYNC_TCP_SSL_VERSION_MIN_TARGET "AsyncTCP_SSL v1.3.1"
|
||||
#define ASYNC_TCP_SSL_VERSION_MIN 1003001
|
||||
|
||||
#include "multiFileProject.h"
|
||||
|
||||
#include <WiFi.h>
|
||||
|
||||
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
|
||||
#include "AsyncTCP_SSL.h"
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
while (!Serial && millis() < 5000);
|
||||
|
||||
Serial.println("\nStart multiFileProject on "); Serial.println(ARDUINO_BOARD);
|
||||
Serial.println(ASYNC_TCP_SSL_VERSION);
|
||||
|
||||
#if defined(ASYNC_TCP_SSL_VERSION_MIN)
|
||||
if (ASYNC_TCP_SSL_VERSION_INT < ASYNC_TCP_SSL_VERSION_MIN)
|
||||
{
|
||||
Serial.print("Warning. Must use this example on Version equal or later than : ");
|
||||
Serial.println(ASYNC_TCP_SSL_VERSION_MIN_TARGET);
|
||||
}
|
||||
#endif
|
||||
|
||||
Serial.print("You're OK now");
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// put your main code here, to run repeatedly:
|
||||
}
|
||||
Reference in New Issue
Block a user