Update for ESP8266 architecture

"ESP8266" is no longer defined in board package
This commit is contained in:
Bodmer
2022-10-20 00:07:46 +01:00
parent b764d104fc
commit 3cf526708f
10 changed files with 13 additions and 13 deletions

View File

@ -18,7 +18,7 @@
#include "LittleFS.h"
// Include WiFi and http client
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFiMulti.h>

View File

@ -15,7 +15,7 @@ bool getFile(String url, String filename) {
Serial.print("[HTTP] begin...\n");
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure);
client -> setInsecure();
HTTPClient http;

View File

@ -2,7 +2,7 @@
** Function name: listSPIFFS
** Description: Listing SPIFFS files
***************************************************************************************/
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
void listSPIFFS(void) {
Serial.println(F("\r\nListing SPIFFS files:"));

View File

@ -18,7 +18,7 @@
#include <FS.h>
// Include WiFi and http client
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFiMulti.h>

View File

@ -15,7 +15,7 @@ bool getFile(String url, String filename) {
Serial.print("[HTTP] begin...\n");
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
std::unique_ptr<BearSSL::WiFiClientSecure>client(new BearSSL::WiFiClientSecure);
client -> setInsecure();
HTTPClient http;

View File

@ -1,6 +1,6 @@
{
"name": "TJpg_Decoder",
"version": "1.0.8",
"version": "1.0.9",
"keywords": "jpeg, jpg, tft, display, RP2040, STM32, ESP8266, ESP32",
"description": "A JPEG decoder library based on Tiny JPEG Decompressor",
"repository":

View File

@ -1,5 +1,5 @@
name=TJpg_Decoder
version=1.0.8
version=1.0.9
author=Bodmer
maintainer=Bodmer
sentence=A JPEG decoder based on tjpgd

View File

@ -165,7 +165,7 @@ int TJpg_Decoder::jd_output(JDEC* jdec, void* bitmap, JRECT* jrect)
// Generic file call for SD or SPIFFS, uses leading / to distinguish SPIFFS files
JRESULT TJpg_Decoder::drawJpg(int32_t x, int32_t y, const char *pFilename){
#if defined (ESP8266) || defined (ESP32)
#if defined (ARDUINO_ARCH_ESP8266) || defined (ESP32)
#if defined (TJPGD_LOAD_SD_LIBRARY)
if (*pFilename == '/')
#endif
@ -186,7 +186,7 @@ JRESULT TJpg_Decoder::drawJpg(int32_t x, int32_t y, const char *pFilename){
// Generic file call for SD or SPIFFS, uses leading / to distinguish SPIFFS files
JRESULT TJpg_Decoder::drawJpg(int32_t x, int32_t y, const String& pFilename){
#if defined (ESP8266) || defined (ESP32)
#if defined (ARDUINO_ARCH_ESP8266) || defined (ESP32)
#if defined (TJPGD_LOAD_SD_LIBRARY)
if (pFilename.charAt(0) == '/')
#endif
@ -207,7 +207,7 @@ JRESULT TJpg_Decoder::drawJpg(int32_t x, int32_t y, const String& pFilename){
// Generic file call for SD or SPIFFS, uses leading / to distinguish SPIFFS files
JRESULT TJpg_Decoder::getJpgSize(uint16_t *w, uint16_t *h, const char *pFilename){
#if defined (ESP8266) || defined (ESP32)
#if defined (ARDUINO_ARCH_ESP8266) || defined (ESP32)
#if defined (TJPGD_LOAD_SD_LIBRARY)
if (*pFilename == '/')
#endif
@ -228,7 +228,7 @@ JRESULT TJpg_Decoder::getJpgSize(uint16_t *w, uint16_t *h, const char *pFilename
// Generic file call for SD or SPIFFS, uses leading / to distinguish SPIFFS files
JRESULT TJpg_Decoder::getJpgSize(uint16_t *w, uint16_t *h, const String& pFilename){
#if defined (ESP8266) || defined (ESP32)
#if defined (ARDUINO_ARCH_ESP8266) || defined (ESP32)
#if defined (TJPGD_LOAD_SD_LIBRARY)
if (pFilename.charAt(0) == '/')
#endif

View File

@ -17,7 +17,7 @@ https://github.com/Bodmer/TJpg_Decoder
#include "Arduino.h"
#include "tjpgd.h"
#if defined (ESP8266) || defined (ESP32)
#if defined (ARDUINO_ARCH_ESP8266) || defined (ESP32)
#include <pgmspace.h>
#include <FS.h>
#include <LittleFS.h>

View File

@ -1,4 +1,4 @@
#if defined (ESP32) || defined (ESP8266) || (ARDUINO_ARCH_RP2040) || defined (ARDUINO_ARCH_MBED)
#if defined (ESP32) || defined (ARDUINO_ARCH_ESP8266) || defined (ARDUINO_ARCH_RP2040) || defined (ARDUINO_ARCH_MBED)
#define TJPGD_LOAD_FFS
#endif