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

Commit

Permalink
v1.3.0 to fix multiple-definitions linker error
Browse files Browse the repository at this point in the history
### Releases v1.3.0

1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
2. Fix reattachInterrupt() bug. Check [bugfix: reattachInterrupt() pass wrong frequency value to setFrequency() #19](khoih-prog/ESP8266TimerInterrupt#19)
3. Update `Packages_Patches`
  • Loading branch information
khoih-prog committed Jan 20, 2022
1 parent fa540a0 commit e8b8e89
Show file tree
Hide file tree
Showing 22 changed files with 377 additions and 506 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Expand Up @@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.15) or Platform.io version
* `STM32` Core Version (e.g. STM32 core v2.0.0)
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
* `STM32` Core Version (e.g. STM32 core v2.2.0)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -26,10 +26,10 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.15
STM32 Core Version 2.0.0
Arduino IDE version: 1.8.19
STM32 Core Version 2.2.0
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered a crash while trying to use the Timer Interrupt.
Expand Down
200 changes: 54 additions & 146 deletions README.md

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions changelog.md
@@ -0,0 +1,58 @@
# STM32_TimerInterrupt Library

[![arduino-library-badge](https://www.ardu-badge.com/badge/STM32_TimerInterrupt.svg?)](https://www.ardu-badge.com/STM32_TimerInterrupt)
[![GitHub release](https://img.shields.io/github/release/khoih-prog/STM32_TimerInterrupt.svg)](https://github.com/khoih-prog/STM32_TimerInterrupt/releases)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/STM32_TimerInterrupt/blob/master/LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/STM32_TimerInterrupt.svg)](http://github.com/khoih-prog/STM32_TimerInterrupt/issues)

---
---


* [Changelog](#changelog)
* [Releases v1.3.0](#releases-v130)
* [Releases v1.2.1](#releases-v121)
* [Releases v1.2.0](#releases-v120)
* [Releases v1.1.1](#releases-v111)
* [Releases v1.0.1](#releases-v101)
* [Releases v1.0.0](#releases-v100)

---
---


## Changelog

### Releases v1.3.0

1. Fix `multiple-definitions` linker error. Drop `src_cpp` and `src_h` directories
2. Fix reattachInterrupt() bug. Check [bugfix: reattachInterrupt() pass wrong frequency value to setFrequency() #19](https://github.com/khoih-prog/ESP8266TimerInterrupt/pull/19)
3. Update `Packages_Patches`

### Releases v1.2.1

1. Add support to **STM32L5 (NUCLEO_L552ZE_Q)**
2. Verify OK with **STM32H7 (NUCLEO_H743ZI2)**

### Releases v1.2.0

1. Add better debug feature.
2. Optimize code and examples to reduce RAM usage
3. Add Table of Contents

### Releases v1.1.1

1. Add example [**Change_Interval**](examples/Change_Interval) and [**ISR_16_Timers_Array_Complex**](examples/ISR_16_Timers_Array_Complex)
2. Bump up version to sync with other TimerInterrupt Libraries. Modify Version String.


### Releases v1.0.1

1. Add complicated example [ISR_16_Timers_Array](examples/ISR_16_Timers_Array) utilizing and demonstrating the full usage of 16 independent ISR Timers.

### Releases v1.0.0

1. Permit up to 16 super-long-time, super-accurate ISR-based timers to avoid being blocked
2. Using cpp code besides Impl.h code to use if Multiple-Definition linker error.

19 changes: 1 addition & 18 deletions examples/Argument_None/Argument_None.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/

/*
Expand All @@ -53,7 +36,7 @@
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
#define TIMER_INTERRUPT_DEBUG 0
#define _TIMERINTERRUPT_LOGLEVEL_ 0
#define _TIMERINTERRUPT_LOGLEVEL_ 3

#include "STM32TimerInterrupt.h"

Expand Down
19 changes: 1 addition & 18 deletions examples/Change_Interval/Change_Interval.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/

/*
Expand All @@ -53,7 +36,7 @@
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
#define TIMER_INTERRUPT_DEBUG 0
#define _TIMERINTERRUPT_LOGLEVEL_ 0
#define _TIMERINTERRUPT_LOGLEVEL_ 3

#include "STM32TimerInterrupt.h"

Expand Down
21 changes: 3 additions & 18 deletions examples/ISR_16_Timers_Array/ISR_16_Timers_Array.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down Expand Up @@ -72,9 +55,11 @@
#define _TIMERINTERRUPT_LOGLEVEL_ 0

#include "STM32TimerInterrupt.h"

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "STM32_ISR_Timer.h"

#include <SimpleTimer.h> // https://github.com/schinken/SimpleTimer
#include <SimpleTimer.h> // https://github.com/jfturcot/SimpleTimer

#ifndef LED_BUILTIN
#define LED_BUILTIN 13
Expand Down
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down Expand Up @@ -60,12 +43,14 @@
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
#define TIMER_INTERRUPT_DEBUG 0
#define _TIMERINTERRUPT_LOGLEVEL_ 0
#define _TIMERINTERRUPT_LOGLEVEL_ 3

#include "STM32TimerInterrupt.h"

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "STM32_ISR_Timer.h"

#include <SimpleTimer.h> // https://github.com/schinken/SimpleTimer
#include <SimpleTimer.h> // https://github.com/jfturcot/SimpleTimer

#ifndef LED_BUILTIN
#define LED_BUILTIN 13
Expand Down
17 changes: 0 additions & 17 deletions examples/ISR_RPM_Measure/ISR_RPM_Measure.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down
21 changes: 3 additions & 18 deletions examples/ISR_Timer_Complex/ISR_Timer_Complex.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down Expand Up @@ -120,9 +103,11 @@
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
#define TIMER_INTERRUPT_DEBUG 0
#define _TIMERINTERRUPT_LOGLEVEL_ 0
#define _TIMERINTERRUPT_LOGLEVEL_ 3

#include "STM32TimerInterrupt.h"

// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "STM32_ISR_Timer.h"

#define HW_TIMER_INTERVAL_US 100L
Expand Down
17 changes: 0 additions & 17 deletions examples/RPM_Measure/RPM_Measure.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down
17 changes: 0 additions & 17 deletions examples/SwitchDebounce/SwitchDebounce.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand Down
17 changes: 0 additions & 17 deletions examples/TimerInterruptLEDDemo/TimerInterruptLEDDemo.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/

/*
Expand Down
19 changes: 1 addition & 18 deletions examples/TimerInterruptTest/TimerInterruptTest.ino
Expand Up @@ -11,23 +11,6 @@
The accuracy is nearly perfect compared to software timers. The most important feature is they're ISR-based timers
Therefore, their executions are not blocked by bad-behaving functions / tasks.
This important feature is absolutely necessary for mission-critical tasks.
Based on SimpleTimer - A timer library for Arduino.
Author: mromani@ottotecnica.com
Copyright (c) 2010 OTTOTECNICA Italy
Based on BlynkTimer.h
Author: Volodymyr Shymanskyy
Version: 1.2.1
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 30/10/2020 Initial coding
1.0.1 K Hoang 06/11/2020 Add complicated example ISR_16_Timers_Array using all 16 independent ISR Timers.
1.1.1 K.Hoang 06/12/2020 Add complex examples. Bump up version to sync with other TimerInterrupt Libraries
1.2.0 K.Hoang 08/01/2021 Add better debug feature. Optimize code and examples to reduce RAM usage
1.2.1 K.Hoang 20/08/2021 Add support to STM32L5 (NUCLEO_L552ZE_Q). Verify OK with STM32H7 (NUCLEO_H743ZI2)
*****************************************************************************************************************************/
/*
Notes:
Expand All @@ -52,7 +35,7 @@
// Don't define _TIMERINTERRUPT_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
// Don't define TIMER_INTERRUPT_DEBUG > 2. Only for special ISR debugging only. Can hang the system.
#define TIMER_INTERRUPT_DEBUG 0
#define _TIMERINTERRUPT_LOGLEVEL_ 0
#define _TIMERINTERRUPT_LOGLEVEL_ 3

#include "STM32TimerInterrupt.h"

Expand Down

0 comments on commit e8b8e89

Please sign in to comment.