Skip to content

Commit 8997020

Browse files
committed
some cleanup around the wrong pin static assert
1 parent 01fd2eb commit 8997020

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

platforms/arm/d21/fastpin_arm_d21.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ template<uint8_t PIN, uint8_t _BIT, uint32_t _MASK, int _GRP> class _ARMPIN {
6060

6161
#define _IO32(L) _RD32(GPIO ## L)
6262

63-
#define _DEFPIN_ARM(PIN, L, BIT) template<> class FastPin<PIN> : public _ARMPIN<PIN, BIT, 1 << BIT, L> { constexpr static bool validpin() { return false; } };
63+
#define _DEFPIN_ARM(PIN, L, BIT) template<> class FastPin<PIN> : public _ARMPIN<PIN, BIT, 1 << BIT, L> {};
6464

6565
// Actual pin definitions
6666
#if defined(ARDUINO_SAMD_ZERO)

platforms/arm/k20/fastpin_arm_k20.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ template<uint8_t PIN, int _BIT, typename _PDOR, typename _PSOR, typename _PCOR,
8181
#define _IO32(L) _RD32(GPIO ## L ## _PDOR); _RD32(GPIO ## L ## _PSOR); _RD32(GPIO ## L ## _PCOR); _RD32(GPIO ## L ## _PTOR); _RD32(GPIO ## L ## _PDIR); _RD32(GPIO ## L ## _PDDR);
8282

8383
#define _DEFPIN_ARM(PIN, BIT, L) template<> class FastPin<PIN> : public _ARMPIN<PIN, 1 << BIT, _R(GPIO ## L ## _PDOR), _R(GPIO ## L ## _PSOR), _R(GPIO ## L ## _PCOR), \
84-
_R(GPIO ## L ## _PTOR), _R(GPIO ## L ## _PDIR), _R(GPIO ## L ## _PDDR)> { constexpr static bool validpin() { return false; } }; \
84+
_R(GPIO ## L ## _PTOR), _R(GPIO ## L ## _PDIR), _R(GPIO ## L ## _PDDR)> {}; \
8585
template<> class FastPinBB<PIN> : public _ARMPIN_BITBAND<PIN, BIT, _R(GPIO ## L ## _PDOR), _R(GPIO ## L ## _PSOR), _R(GPIO ## L ## _PCOR), \
86-
_R(GPIO ## L ## _PTOR), _R(GPIO ## L ## _PDIR), _R(GPIO ## L ## _PDDR)> { constexpr static bool validpin() { return false; } };
86+
_R(GPIO ## L ## _PTOR), _R(GPIO ## L ## _PDIR), _R(GPIO ## L ## _PDDR)> {};
8787

8888
// Actual pin definitions
8989
#if defined(FASTLED_TEENSY3) && defined(CORE_TEENSY)

platforms/arm/kl26/fastpin_arm_kl26.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ template<int BIT> static __attribute__((always_inline)) inline ptr_reg32_t rx()
5353
#define _IO32(L) _RD32(FGPIO ## L ## _PDOR); _RD32(FGPIO ## L ## _PSOR); _RD32(FGPIO ## L ## _PCOR); _RD32(GPIO ## L ## _PTOR); _RD32(FGPIO ## L ## _PDIR); _RD32(FGPIO ## L ## _PDDR);
5454

5555
#define _DEFPIN_ARM(PIN, BIT, L) template<> class FastPin<PIN> : public _ARMPIN<PIN, 1 << BIT, _R(FGPIO ## L ## _PDOR), _R(FGPIO ## L ## _PSOR), _R(FGPIO ## L ## _PCOR), \
56-
_R(GPIO ## L ## _PTOR), _R(FGPIO ## L ## _PDIR), _R(FGPIO ## L ## _PDDR)> { constexpr static bool validpin() { return false; } }; \
56+
_R(GPIO ## L ## _PTOR), _R(FGPIO ## L ## _PDIR), _R(FGPIO ## L ## _PDDR)> {}; \
5757
/* template<> class FastPinBB<PIN> : public _ARMPIN_BITBAND<PIN, BIT, _R(GPIO ## L ## _PDOR), _R(GPIO ## L ## _PSOR), _R(GPIO ## L ## _PCOR), \
5858
_R(GPIO ## L ## _PTOR), _R(GPIO ## L ## _PDIR), _R(GPIO ## L ## _PDDR)> {}; */
5959

platforms/arm/nrf51/fastpin_arm_nrf51.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ template<uint8_t PIN, uint32_t _MASK> class _ARMPIN {
9898
};
9999

100100

101-
#define _DEFPIN_ARM(PIN) template<> class FastPin<PIN> : public _ARMPIN<PIN, 1 << PIN> { constexpr static bool validpin() { return false; } };
101+
#define _DEFPIN_ARM(PIN) template<> class FastPin<PIN> : public _ARMPIN<PIN, 1 << PIN> {};
102102
#endif
103103

104104
// Actual pin definitions

platforms/arm/sam/fastpin_arm_sam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ template<uint8_t PIN, uint32_t _BIT, typename _PDOR, typename _PSOR, typename _P
8181
#define DUE_IO32(L) _RD32(REG_PIO ## L ## _ODSR); _RD32(REG_PIO ## L ## _SODR); _RD32(REG_PIO ## L ## _CODR); _RD32(REG_PIO ## L ## _OER);
8282

8383
#define _DEFPIN_DUE(PIN, BIT, L) template<> class FastPin<PIN> : public _DUEPIN<PIN, 1 << BIT, _R(REG_PIO ## L ## _ODSR), _R(REG_PIO ## L ## _SODR), _R(REG_PIO ## L ## _CODR), \
84-
_R(GPIO ## L ## _OER)> { constexpr static bool validpin() { return false; } }; \
84+
_R(GPIO ## L ## _OER)> {}; \
8585
template<> class FastPinBB<PIN> : public _DUEPIN_BITBAND<PIN, BIT, _R(REG_PIO ## L ## _ODSR), _R(REG_PIO ## L ## _SODR), _R(REG_PIO ## L ## _CODR), \
86-
_R(GPIO ## L ## _OER)> { constexpr static bool validpin() { return false; } };
86+
_R(GPIO ## L ## _OER)> {};
8787

8888
#if defined(__SAM3X8E__)
8989

platforms/arm/stm32/fastpin_arm_stm32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ template<uint8_t PIN, uint8_t _BIT, uint32_t _MASK, typename _GPIO> class _ARMPI
6060

6161
#define _IO32(L) _RD32(GPIO ## L)
6262

63-
#define _DEFPIN_ARM(PIN, BIT, L) template<> class FastPin<PIN> : public _ARMPIN<PIN, BIT, 1 << BIT, _R(GPIO ## L)> { constexpr static bool validpin() { return false; } };
63+
#define _DEFPIN_ARM(PIN, BIT, L) template<> class FastPin<PIN> : public _ARMPIN<PIN, BIT, 1 << BIT, _R(GPIO ## L)> {};
6464

6565
// Actual pin definitions
6666
#if defined(SPARK)

platforms/avr/fastpin_avr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef volatile uint8_t & reg8_t;
4949
#define _R(T) struct __gen_struct_ ## T
5050
#define _RD8(T) struct __gen_struct_ ## T { static inline reg8_t r() { return T; }};
5151
#define _IO(L) _RD8(DDR ## L); _RD8(PORT ## L); _RD8(PIN ## L);
52-
#define _DEFPIN_AVR(_PIN, MASK, L) template<> class FastPin<_PIN> : public _AVRPIN<_PIN, MASK, _R(PORT ## L), _R(DDR ## L), _R(PIN ## L)> { constexpr static bool validpin() { return false; } };
52+
#define _DEFPIN_AVR(_PIN, MASK, L) template<> class FastPin<_PIN> : public _AVRPIN<_PIN, MASK, _R(PORT ## L), _R(DDR ## L), _R(PIN ## L)> {};
5353

5454
#if defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny45__)
5555
_IO(B);

0 commit comments

Comments
 (0)