Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.7.0 to add support to more ESP32_S2 boards
Browse files Browse the repository at this point in the history
### Releases v1.7.0

1. Add support to 
  - ESP32_S2 : ESP32S2 Native USB, UM FeatherS2 Neo, UM TinyS2, UM RMP, microS2, LOLIN_S2_MINI, LOLIN_S2_PICO, ADAFRUIT_FEATHER_ESP32S2, ADAFRUIT_FEATHER_ESP32S2_TFT, ATMegaZero ESP32-S2, Deneyap Mini, FRANZININHO_WIFI, FRANZININHO_WIFI_MSC
  • Loading branch information
khoih-prog authored Aug 12, 2022
1 parent 264495c commit 4f7e5fa
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 32 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The catch is **your function is now part of an ISR (Interrupt Service Routine),

### Currently supported Boards

1. ESP32S2-based boards, such as `ESP32S2_DEV`, `ESP32_S2 Saola`, Adafruit `QTPY_ESP32S2`, etc.
1. ESP32_S2-based boards, such as `ESP32S2_DEV`, `ESP32_S2 Saola`, Adafruit QTPY_ESP32S2, ESP32S2 Native USB, UM FeatherS2 Neo, UM TinyS2, UM RMP, microS2, etc.

---

Expand Down Expand Up @@ -318,7 +318,7 @@ The following is the sample terminal output when running example [TimerInterrupt

```
Starting TimerInterruptTest on ESP32S2_DEV
ESP32_S2_TimerInterrupt v1.6.0
ESP32_S2_TimerInterrupt v1.7.0
CPU Frequency = 240 MHz
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 0, TIM_CLOCK_FREQ = 1000000.00
[TISR] TIMER_BASE_CLK = 80000000, TIMER_DIVIDER = 80
Expand Down Expand Up @@ -351,7 +351,7 @@ The following is the sample terminal output when running example [Change_Interva

```
Starting Change_Interval on ESP32S2_DEV
ESP32_S2_TimerInterrupt v1.6.0
ESP32_S2_TimerInterrupt v1.7.0
CPU Frequency = 240 MHz
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 0, TIM_CLOCK_FREQ = 1000000.00
[TISR] TIMER_BASE_CLK = 80000000, TIMER_DIVIDER = 80
Expand Down Expand Up @@ -389,7 +389,7 @@ The following is the sample terminal output when running example [Argument_None]

```
Starting Argument_None on ESP32S2_DEV
ESP32_S2_TimerInterrupt v1.6.0
ESP32_S2_TimerInterrupt v1.7.0
CPU Frequency = 240 MHz
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 0, TIM_CLOCK_FREQ = 1000000.00
[TISR] TIMER_BASE_CLK = 80000000, TIMER_DIVIDER = 80
Expand All @@ -413,7 +413,7 @@ The following is the sample terminal output when running example [ISR_16_Timers_

```
Starting ISR_16_Timers_Array_Complex on ESP32S2_DEV
ESP32_S2_TimerInterrupt v1.6.0
ESP32_S2_TimerInterrupt v1.7.0
CPU Frequency = 240 MHz
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 1, TIM_CLOCK_FREQ = 1000000.00
[TISR] TIMER_BASE_CLK = 80000000, TIMER_DIVIDER = 80
Expand Down Expand Up @@ -568,7 +568,7 @@ The following is the sample terminal output when running example [ISR_16_Timers_

```
Starting ISR_16_Timers_Array on ESP32S2_DEV
ESP32_S2_TimerInterrupt v1.6.0
ESP32_S2_TimerInterrupt v1.7.0
CPU Frequency = 240 MHz
[TISR] ESP32_S2_TimerInterrupt: _timerNo = 1, TIM_CLOCK_FREQ = 1000000.00
[TISR] TIMER_BASE_CLK = 80000000, TIMER_DIVIDER = 80
Expand Down Expand Up @@ -624,16 +624,17 @@ Submit issues to: [ESP32_S2_TimerInterrupt issues](https://github.com/khoih-prog

## DONE

1. Basic hardware timers for ESP32-S2.
2. More hardware-initiated software-enabled timers
3. Longer time interval
4. Similar features for remaining Arduino boards such as SAMD21, SAMD51, SAM-DUE, nRF52, ESP8266, STM32, etc.
5. Fix compiler errors due to conflict to some libraries.
6. Add complex examples.
7. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
8. Avoid deprecated functions.
9. Optimize library code by using `reference-passing` instead of `value-passing`

1. Basic hardware timers for ESP32-S2.
2. More hardware-initiated software-enabled timers
3. Longer time interval
4. Similar features for remaining Arduino boards such as SAMD21, SAMD51, SAM-DUE, nRF52, ESP8266, STM32, etc.
5. Fix compiler errors due to conflict to some libraries.
6. Add complex examples.
7. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
8. Avoid deprecated functions.
9. Optimize library code by using `reference-passing` instead of `value-passing`
10. Add support to many more boards, such as
- ESP32_S2 : ESP32S2 Native USB, UM FeatherS2 Neo, UM TinyS2, UM RMP, microS2, LOLIN_S2_MINI, LOLIN_S2_PICO, ADAFRUIT_FEATHER_ESP32S2, ADAFRUIT_FEATHER_ESP32S2_TFT, ATMegaZero ESP32-S2, Deneyap Mini, FRANZININHO_WIFI, FRANZININHO_WIFI_MSC

---
---
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.7.0](#releases-v170)
* [Releases v1.6.0](#releases-v160)
* [Releases v1.5.1](#releases-v151)
* [Releases v1.5.0](#releases-v150)
Expand All @@ -23,6 +24,12 @@

## Changelog

### Releases v1.7.0

1. Add support to
- ESP32_S2 : ESP32S2 Native USB, UM FeatherS2 Neo, UM TinyS2, UM RMP, microS2, LOLIN_S2_MINI, LOLIN_S2_PICO, ADAFRUIT_FEATHER_ESP32S2, ADAFRUIT_FEATHER_ESP32S2_TFT, ATMegaZero ESP32-S2, Deneyap Mini, FRANZININHO_WIFI, FRANZININHO_WIFI_MSC


### Releases v1.6.0

1. Suppress errors and warnings for new ESP32 core v2.0.4+
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP32_S2_TimerInterrupt",
"version": "1.6.0",
"version": "1.7.0",
"keywords": "timing, device, control, timer, interrupt, hardware, isr, isr-based, hardware-timer, isr-timer, isr-based-timer, mission-critical, accuracy, precise, non-blocking, esp32, esp32-s2, esp32-c3",
"description": "This library enables you to use Interrupt from Hardware Timers on an ESP32-S2-based board. It now supports 16 ISR-based timers, while consuming only 1 Hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks. These hardware timers, using interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's necessary if you need to measure some data requiring better accuracy.",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP32_S2_TimerInterrupt
version=1.6.0
version=1.7.0
author=Khoi Hoang <[email protected]>
maintainer=Khoi Hoang <[email protected]>
sentence=This library enables you to use Interrupt from Hardware Timers on an ESP32-S2-based board
Expand Down
12 changes: 11 additions & 1 deletion platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ build_flags =
; comment the folowing line to enable WiFi debugging
-D NDEBUG


; ============================================================
; ============================================================

[env:ESP32]
platform = espressif32
framework = arduino
Expand Down Expand Up @@ -84,6 +88,8 @@ board = esp32doit-devkit-v1
;board = iotbusproteus
;board = nina_w10

; ============================================================

[env:esp32s2]
platform = espressif32
framework = arduino
Expand Down Expand Up @@ -112,6 +118,7 @@ build_flags =
-DARDUINO_ESP32S2_DEV
-DARDUINO_VARIANT="esp32s2"

; ============================================================

[env:esp32s3]
platform = espressif32
Expand All @@ -131,8 +138,9 @@ build_flags =
-DARDUINO_ESP32S3_DEV
-DARDUINO_VARIANT="esp32s3"

; ============================================================

[env:esp32sc3]
[env:esp32c3]
platform = espressif32
framework = arduino

Expand All @@ -149,3 +157,5 @@ build_unflags =
build_flags =
-DARDUINO_ESP32S3_DEV
-DARDUINO_VARIANT="esp32c3"

; ============================================================
3 changes: 2 additions & 1 deletion src/ESP32_S2_ISR_Timer-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.6.0
Version: 1.7.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -33,6 +33,7 @@
1.5.0 K.Hoang 23/01/2022 Avoid deprecated functions. Fix `multiple-definitions` linker error
1.5.1 K Hoang 16/06/2022 Add support to new Adafruit board QTPY_ESP32S2
1.6.0 K Hoang 10/08/2022 Suppress errors and warnings for new ESP32 core
1.7.0 K Hoang 11/08/2022 Suppress warnings and add support for more ESP32_S2 boards
*****************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/ESP32_S2_ISR_Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.6.0
Version: 1.7.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -33,6 +33,7 @@
1.5.0 K.Hoang 23/01/2022 Avoid deprecated functions. Fix `multiple-definitions` linker error
1.5.1 K Hoang 16/06/2022 Add support to new Adafruit board QTPY_ESP32S2
1.6.0 K Hoang 10/08/2022 Suppress errors and warnings for new ESP32 core
1.7.0 K Hoang 11/08/2022 Suppress warnings and add support for more ESP32_S2 boards
*****************************************************************************************************************************/

#pragma once
Expand Down
14 changes: 9 additions & 5 deletions src/ESP32_S2_ISR_Timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.6.0
Version: 1.7.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -33,6 +33,7 @@
1.5.0 K.Hoang 23/01/2022 Avoid deprecated functions. Fix `multiple-definitions` linker error
1.5.1 K Hoang 16/06/2022 Add support to new Adafruit board QTPY_ESP32S2
1.6.0 K Hoang 10/08/2022 Suppress errors and warnings for new ESP32 core
1.7.0 K Hoang 11/08/2022 Suppress warnings and add support for more ESP32_S2 boards
*****************************************************************************************************************************/

#pragma once
Expand All @@ -42,18 +43,21 @@

#if !( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2)
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2 || ARDUINO_ESP32S2_USB || \
ARDUINO_FEATHERS2NEO || ARDUINO_TINYS2 || ARDUINO_RMP || ARDUINO_LOLIN_S2_MINI || ARDUINO_LOLIN_S2_PICO || \
ARDUINO_ADAFRUIT_FEATHER_ESP32S2 || ARDUINO_ADAFRUIT_FEATHER_ESP32S2_TFT || ARDUINO_atmegazero_esp32s2 || \
ARDUINO_DYM || ARDUINO_FRANZININHO_WIFI || ARDUINO_FRANZININHO_WIFI_MSC )
#error This code is intended to run on the ESP32-S2 platform! Please check your Tools->Board setting.
#endif

#ifndef ESP32_S2_TIMER_INTERRUPT_VERSION
#define ESP32_S2_TIMER_INTERRUPT_VERSION "ESP32_S2_TimerInterrupt v1.6.0"
#define ESP32_S2_TIMER_INTERRUPT_VERSION "ESP32_S2_TimerInterrupt v1.7.0"

#define ESP32_S2_TIMER_INTERRUPT_VERSION_MAJOR 1
#define ESP32_S2_TIMER_INTERRUPT_VERSION_MINOR 6
#define ESP32_S2_TIMER_INTERRUPT_VERSION_MINOR 7
#define ESP32_S2_TIMER_INTERRUPT_VERSION_PATCH 0

#define ESP32_S2_TIMER_INTERRUPT_VERSION_INT 1006000
#define ESP32_S2_TIMER_INTERRUPT_VERSION_INT 1007000
#endif

#include "TimerInterrupt_Generic_Debug.h"
Expand Down
14 changes: 9 additions & 5 deletions src/ESP32_S2_TimerInterrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.6.0
Version: 1.7.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -34,6 +34,7 @@
1.5.0 K.Hoang 23/01/2022 Avoid deprecated functions. Fix `multiple-definitions` linker error
1.5.1 K Hoang 16/06/2022 Add support to new Adafruit board QTPY_ESP32S2
1.6.0 K Hoang 10/08/2022 Suppress errors and warnings for new ESP32 core
1.7.0 K Hoang 11/08/2022 Suppress warnings and add support for more ESP32_S2 boards
*****************************************************************************************************************************/

#pragma once
Expand All @@ -43,20 +44,23 @@

#if !( ARDUINO_ESP32S2_DEV || ARDUINO_FEATHERS2 || ARDUINO_ESP32S2_THING_PLUS || ARDUINO_MICROS2 || \
ARDUINO_METRO_ESP32S2 || ARDUINO_MAGTAG29_ESP32S2 || ARDUINO_FUNHOUSE_ESP32S2 || \
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2)
ARDUINO_ADAFRUIT_FEATHER_ESP32S2_NOPSRAM || ARDUINO_ADAFRUIT_QTPY_ESP32S2 || ARDUINO_ESP32S2_USB || \
ARDUINO_FEATHERS2NEO || ARDUINO_TINYS2 || ARDUINO_RMP || ARDUINO_LOLIN_S2_MINI || ARDUINO_LOLIN_S2_PICO || \
ARDUINO_ADAFRUIT_FEATHER_ESP32S2 || ARDUINO_ADAFRUIT_FEATHER_ESP32S2_TFT || ARDUINO_atmegazero_esp32s2 || \
ARDUINO_DYM || ARDUINO_FRANZININHO_WIFI || ARDUINO_FRANZININHO_WIFI_MSC )
#error This code is intended to run on the ESP32-S2 platform! Please check your Tools->Board setting.
#else
#define USING_ESP32_S2_TIMER_INTERRUPT true
#endif

#ifndef ESP32_S2_TIMER_INTERRUPT_VERSION
#define ESP32_S2_TIMER_INTERRUPT_VERSION "ESP32_S2_TimerInterrupt v1.6.0"
#define ESP32_S2_TIMER_INTERRUPT_VERSION "ESP32_S2_TimerInterrupt v1.7.0"

#define ESP32_S2_TIMER_INTERRUPT_VERSION_MAJOR 1
#define ESP32_S2_TIMER_INTERRUPT_VERSION_MINOR 6
#define ESP32_S2_TIMER_INTERRUPT_VERSION_MINOR 7
#define ESP32_S2_TIMER_INTERRUPT_VERSION_PATCH 0

#define ESP32_S2_TIMER_INTERRUPT_VERSION_INT 1006000
#define ESP32_S2_TIMER_INTERRUPT_VERSION_INT 1007000
#endif

#ifndef TIMER_INTERRUPT_DEBUG
Expand Down
3 changes: 2 additions & 1 deletion src/TimerInterrupt_Generic_Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.6.0
Version: 1.7.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -33,6 +33,7 @@
1.5.0 K.Hoang 23/01/2022 Avoid deprecated functions. Fix `multiple-definitions` linker error
1.5.1 K Hoang 16/06/2022 Add support to new Adafruit board QTPY_ESP32S2
1.6.0 K Hoang 10/08/2022 Suppress errors and warnings for new ESP32 core
1.7.0 K Hoang 11/08/2022 Suppress warnings and add support for more ESP32_S2 boards
*****************************************************************************************************************************/

#pragma once
Expand Down

0 comments on commit 4f7e5fa

Please sign in to comment.