From 21136ed5b13208ec6077dcb79226269f2415eee3 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 23 Jan 2021 20:43:58 +0100 Subject: [PATCH 1/2] case of include, warnings (wrong return types) --- EveryTimerB.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EveryTimerB.h b/EveryTimerB.h index 4c371a9..1dcd878 100644 --- a/EveryTimerB.h +++ b/EveryTimerB.h @@ -83,7 +83,7 @@ nona4809.menu.clock.20internal.bootloader.OSCCFG=0x02 #else #include "WProgram.h" #endif -#include "MegaAvr20MHz.h" +#include "MegaAvr20Mhz.h" #include "pins_arduino.h" #define TCB_RESOLUTION 65536UL // TCB is 16 bit @@ -228,7 +228,7 @@ class EveryTimerB timer->CTRLA |= TCB_ENABLE_bm; } - bool disable(void) __attribute__((always_inline)) { + void disable(void) __attribute__((always_inline)) { timer->CTRLA &= ~TCB_ENABLE_bm; } @@ -270,11 +270,11 @@ class EveryTimerB return timer->CTRLB & TCB_CCMPEN_bm; } - uint8_t enableOutput() __attribute__((always_inline)) { + void enableOutput() __attribute__((always_inline)) { timer->CTRLB |= TCB_CCMPEN_bm; } - uint8_t disableOutput() __attribute__((always_inline)) { + void disableOutput() __attribute__((always_inline)) { timer->CTRLB &= ~TCB_CCMPEN_bm; } From 3313211c90b48438e28d28373d136652c4963127 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 23 Jan 2021 21:52:10 +0100 Subject: [PATCH 2/2] Add the F define to be on safe side if it is not present in the library core code --- FSH.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FSH.h b/FSH.h index f8c0f87..21df20c 100644 --- a/FSH.h +++ b/FSH.h @@ -2,6 +2,10 @@ #define FSH_h #include #ifdef ARDUINO_ARCH_MEGAAVR +#ifdef F +#undef F +#define F(str) (str) +#endif typedef char FSH; #define GETFLASH(addr) (*(const unsigned char *)(addr)) #define FLASH