Skip to content

Commit

Permalink
STM32 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Naguissa committed Jul 24, 2020
1 parent b975e5f commit 4fa8c4e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=uTimerLib
version=1.6.2
version=1.6.3
author=Naguissa <naguissa@foroelectro.net>
maintainer=Naguissa <naguissa@foroelectro.net>
sentence=Tiny and cross-device compatible timer library
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.ATTINY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/

#if (defined(ARDUINO_ARCH_AVR) && (defined(ARDUINO_attiny) || defined(ARDUINO_AVR_ATTINYX4) || defined(ARDUINO_AVR_ATTINYX5) || defined(ARDUINO_AVR_ATTINYX7) || defined(ARDUINO_AVR_ATTINYX8) || defined(ARDUINO_AVR_ATTINYX61) || defined(ARDUINO_AVR_ATTINY43) || defined(ARDUINO_AVR_ATTINY828) || defined(ARDUINO_AVR_ATTINY1634) || defined(ARDUINO_AVR_ATTINYX313))) && defined(UTIMERLIB_HW_COMPILE)
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.AVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/

#if (defined(__AVR_ATmega32U4__) || defined(ARDUINO_ARCH_AVR)) && !defined(ARDUINO_attiny) && defined(UTIMERLIB_HW_COMPILE)
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.ESP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if (defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)) && defined(UTIMERLIB_HW_COMPILE)
#if !defined(_uTimerLib_IMP_) && defined(_uTimerLib_cpp_)
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.SAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if defined(ARDUINO_ARCH_SAM) && defined(UTIMERLIB_HW_COMPILE)
#if !defined(_uTimerLib_IMP_) && defined(_uTimerLib_cpp_)
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.SAMD21.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if defined(_SAMD21_) && defined(UTIMERLIB_HW_COMPILE)
#ifndef _uTimerLib_IMP_
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.SAMD51.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if defined(__SAMD51__) && defined(UTIMERLIB_HW_COMPILE)
#if !defined(_uTimerLib_IMP_) && defined(_uTimerLib_cpp_)
Expand Down
5 changes: 3 additions & 2 deletions src/hardware/uTimerLib.STM32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if (defined(_VARIANT_ARDUINO_STM32_) || defined(ARDUINO_ARCH_STM32)) && defined(UTIMERLIB_HW_COMPILE)
#ifndef _uTimerLib_IMP_
Expand Down Expand Up @@ -54,7 +54,7 @@
Timer3->setCaptureCompare(1, us - 1, MICROSEC_COMPARE_FORMAT);
if (_toInit) {
_toInit = false;
Timer3->attachInterrupt((uint32_t) 1, uTimerLib::interrupt);
Timer3->attachInterrupt(1, uTimerLib::interrupt);
}
Timer3->resume();

Expand Down Expand Up @@ -172,6 +172,7 @@
#ifdef BOARD_NAME
callback_function_t uTimerLib::interrupt() {
_instance->_interrupt();
return (callback_function_t) 0;
}

// Roger Clark Arduino STM32, https://github.com/rogerclarkmelbourne/Arduino_STM32
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/uTimerLib.UNSUPPORTED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
#if (!defined(__AVR_ATmega32U4__) && !defined(ARDUINO_ARCH_AVR) && !defined(_VARIANT_ARDUINO_STM32_) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32) && !defined(ARDUINO_ARCH_SAM) && !defined(_SAMD21_) && !defined(__SAMD51__) && !defined(ARDUINO_attiny) && !defined(ARDUINO_AVR_ATTINYX5) && defined(UTIMERLIB_HW_COMPILE))
#ifndef _uTimerLib_IMP_
Expand Down
2 changes: 1 addition & 1 deletion src/uTimerLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/

// # if !defined(_uTimerLib_cpp_) && defined(_uTimerLib_IMP_)
Expand Down
2 changes: 1 addition & 1 deletion src/uTimerLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @see <a href="https://github.com/Naguissa/uTimerLib">https://github.com/Naguissa/uTimerLib</a>
* @see <a href="https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html">https://www.foroelectro.net/librerias-arduino-ide-f29/utimerlib-libreria-arduino-para-eventos-temporizad-t191.html</a>
* @see <a href="mailto:naguissa@foroelectro.net">naguissa@foroelectro.net</a>
* @version 1.6.2
* @version 1.6.3
*/
/** \file uTimerLib.h
* \brief uTimerLib header file
Expand Down

0 comments on commit 4fa8c4e

Please sign in to comment.