Skip to content

Rename ESP to ESP32 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
`Arduino_ESP_OTA`
`Arduino_ESP32_OTA`
====================

*Note: This library is currently in [beta](#board-support).*

[![Compile Examples](https://github.com/bcmi-labs/Arduino_ESP_OTA/workflows/Compile%20Examples/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP_OTA/actions?workflow=Compile+Examples)
[![Arduino Lint](https://github.com/bcmi-labs/Arduino_ESP_OTA/workflows/Arduino%20Lint/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP_OTA/actions?workflow=Arduino+Lint)
[![Spell Check](https://github.com/bcmi-labs/Arduino_ESP_OTA/workflows/Spell%20Check/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP_OTA/actions?workflow=Spell+Check)
[![Compile Examples](https://github.com/bcmi-labs/Arduino_ESP32_OTA/workflows/Compile%20Examples/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP32_OTA/actions?workflow=Compile+Examples)
[![Arduino Lint](https://github.com/bcmi-labs/Arduino_ESP32_OTA/workflows/Arduino%20Lint/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP32_OTA/actions?workflow=Arduino+Lint)
[![Spell Check](https://github.com/bcmi-labs/Arduino_ESP32_OTA/workflows/Spell%20Check/badge.svg)](https://github.com/bcmi-labs/Arduino_ESP32_OTA/actions?workflow=Spell+Check)

This library allows OTA (Over-The-Air) firmware updates for ESP32 boards. OTA binaries are downloaded via WiFi and stored in the OTA flash partition. After a reset the ESP32 bootloader update the reference to the new firmware.

Expand Down
4 changes: 2 additions & 2 deletions keywords.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#######################################
# Syntax Coloring Map For Arduino_ESP_OTA
# Syntax Coloring Map For Arduino_ESP32_OTA
#######################################

#######################################
# Class (KEYWORD1)
#######################################

Arduino_ESP_OTA KEYWORD1
Arduino_ESP32_OTA KEYWORD1
Error KEYWORD1

#######################################
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Arduino_ESP_OTA
name=Arduino_ESP32_OTA
version=0.0.1
author=Arduino
maintainer=Arduino <info@arduino.cc>
Expand All @@ -7,4 +7,4 @@ paragraph=This library allows performing a firmware update on ESP32.
category=Communication
url=
architectures=esp32
includes=Arduino_ESP_OTA.h
includes=Arduino_ESP32_OTA.h
6 changes: 3 additions & 3 deletions src/Arduino_ESP32_OTA.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This file is part of Arduino_ESP_OTA.
This file is part of Arduino_ESP32_OTA.

Copyright 2022 ARDUINO SA (http://www.arduino.cc/)

Expand Down Expand Up @@ -90,7 +90,7 @@ uint8_t Arduino_ESP32_OTA::read_byte_from_network()
bool is_http_data_timeout = false;
for(unsigned long const start = millis();;)
{
is_http_data_timeout = (millis() - start) > ARDUINO_ESP_OTA_BINARY_BYTE_RECEIVE_TIMEOUT_ms;
is_http_data_timeout = (millis() - start) > ARDUINO_ESP32_OTA_BINARY_BYTE_RECEIVE_TIMEOUT_ms;
if (is_http_data_timeout) {
DEBUG_ERROR("%s: timeout waiting data", __FUNCTION__);
return -1;
Expand Down Expand Up @@ -142,7 +142,7 @@ int Arduino_ESP32_OTA::download(const char * ota_url)
is_http_header_timeout = false;
for (unsigned long const start = millis(); !is_header_complete;)
{
is_http_header_timeout = (millis() - start) > ARDUINO_ESP_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms;
is_http_header_timeout = (millis() - start) > ARDUINO_ESP32_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms;
if (is_http_header_timeout) break;

if (_client->available())
Expand Down
10 changes: 5 additions & 5 deletions src/Arduino_ESP32_OTA.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This file is part of Arduino_ESP_OTA.
This file is part of Arduino_ESP32_OTA.

Copyright 2020 ARDUINO SA (http://www.arduino.cc/)

Expand Down Expand Up @@ -30,15 +30,15 @@
CONSTANTS
******************************************************************************/

static uint32_t const ARDUINO_ESP_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms = 10000;
static uint32_t const ARDUINO_ESP_OTA_BINARY_BYTE_RECEIVE_TIMEOUT_ms = 2000;
static uint32_t const ARDUINO_ESP32_OTA_HTTP_HEADER_RECEIVE_TIMEOUT_ms = 10000;
static uint32_t const ARDUINO_ESP32_OTA_BINARY_BYTE_RECEIVE_TIMEOUT_ms = 2000;

/******************************************************************************
* TYPEDEF
******************************************************************************/

typedef uint8_t(*ArduinoEspOtaReadByteFuncPointer)(void);
typedef void(*ArduinoEspOtaWriteByteFuncPointer)(uint8_t);
typedef uint8_t(*ArduinoEsp32OtaReadByteFuncPointer)(void);
typedef void(*ArduinoEsp32OtaWriteByteFuncPointer)(uint8_t);

/******************************************************************************
* CLASS DECLARATION
Expand Down
23 changes: 0 additions & 23 deletions src/Arduino_ESP_OTA.h

This file was deleted.

6 changes: 3 additions & 3 deletions src/decompress/lzss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
**************************************************************************************/

static size_t LZSS_FILE_SIZE = 0;
static ArduinoEspOtaReadByteFuncPointer read_byte_fptr = 0;
static ArduinoEspOtaWriteByteFuncPointer write_byte_fptr = 0;
static ArduinoEsp32OtaReadByteFuncPointer read_byte_fptr = 0;
static ArduinoEsp32OtaWriteByteFuncPointer write_byte_fptr = 0;

int bit_buffer = 0, bit_mask = 128;
unsigned char buffer[N * 2];
Expand Down Expand Up @@ -158,7 +158,7 @@ void lzss_decode(void)
PUBLIC FUNCTIONS
**************************************************************************************/

int lzss_download(ArduinoEspOtaReadByteFuncPointer read_byte, ArduinoEspOtaWriteByteFuncPointer write_byte, size_t const lzss_file_size)
int lzss_download(ArduinoEsp32OtaReadByteFuncPointer read_byte, ArduinoEsp32OtaWriteByteFuncPointer write_byte, size_t const lzss_file_size)
{
read_byte_fptr = read_byte;
write_byte_fptr = write_byte;
Expand Down
2 changes: 1 addition & 1 deletion src/decompress/lzss.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
FUNCTION DEFINITION
**************************************************************************************/

int lzss_download(ArduinoEspOtaReadByteFuncPointer read_byte, ArduinoEspOtaWriteByteFuncPointer write_byte, size_t const lzss_file_size);
int lzss_download(ArduinoEsp32OtaReadByteFuncPointer read_byte, ArduinoEsp32OtaWriteByteFuncPointer write_byte, size_t const lzss_file_size);

#endif /* SSU_LZSS_H_ */
6 changes: 3 additions & 3 deletions src/tls/amazon_root_ca.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Certificates from https://www.amazontrust.com/repository/ */

#ifndef ESP_OTA_AMAZON_ROOT_CA_H_
#define ESP_OTA_AMAZON_ROOT_CA_H_
#ifndef ESP32_OTA_AMAZON_ROOT_CA_H_
#define ESP32_OTA_AMAZON_ROOT_CA_H_

const char* amazon_root_ca = \
/* Amazon Root CA 1 */
Expand Down Expand Up @@ -73,4 +73,4 @@ const char* amazon_root_ca = \
"AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==\n" \
"-----END CERTIFICATE-----\n";

#endif /* ESP_OTA_AMAZON_ROOT_CA_H_ */
#endif /* ESP32_OTA_AMAZON_ROOT_CA_H_ */