Skip to content

Commit 023ba48

Browse files
committed
remove isPinValid()
1 parent 9a0cca7 commit 023ba48

File tree

4 files changed

+1
-47
lines changed

4 files changed

+1
-47
lines changed

cores/nRF5/HardwarePWM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void HardwarePWM::setClockDiv(uint8_t div)
7878
*/
7979
bool HardwarePWM::addPin(uint8_t pin)
8080
{
81-
VERIFY( isPinValid(pin) && (_count <= MAX_CHANNELS) );
81+
VERIFY( _count <= MAX_CHANNELS );
8282

8383
// Check if pin is already configured
8484
for(uint8_t i=0; i<_count; i++)

variants/feather_nrf52832/variant.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
118118
#define PIN_WIRE_SDA (25u)
119119
#define PIN_WIRE_SCL (26u)
120120

121-
122-
static inline bool isPinValid(uint32_t pin)
123-
{
124-
// 0, 1 is xtal
125-
if (pin >= PINS_COUNT) return false;
126-
127-
const uint8_t forbid[] = { 0, 1, };
128-
for(uint8_t i=0; i<sizeof(forbid); i++)
129-
{
130-
if ( pin == forbid[i] ) return false;
131-
}
132-
133-
return true;
134-
}
135-
136121
#ifdef __cplusplus
137122
}
138123
#endif

variants/feather_nrf52840_express/variant.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
118118
#define PIN_WIRE_SDA (25u)
119119
#define PIN_WIRE_SCL (26u)
120120

121-
122-
// TODO remove
123-
static inline bool isPinValid(uint32_t pin)
124-
{
125-
// 0, 1 is xtal
126-
if (pin >= PINS_COUNT) return false;
127-
128-
const uint8_t forbid[] = { 0, 1, };
129-
for(uint8_t i=0; i<sizeof(forbid); i++)
130-
{
131-
if ( pin == forbid[i] ) return false;
132-
}
133-
134-
return true;
135-
}
136-
137121
#ifdef __cplusplus
138122
}
139123
#endif

variants/pca10056/variant.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,21 +131,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
131131
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used
132132
#define EXTERNAL_FLASH_DEVICES MX25R6435F
133133

134-
// TODO remove
135-
static inline bool isPinValid(uint32_t pin)
136-
{
137-
// 0, 1 is xtal
138-
if (pin >= PINS_COUNT) return false;
139-
140-
const uint8_t forbid[] = { 0, 1, };
141-
for(uint8_t i=0; i<sizeof(forbid); i++)
142-
{
143-
if ( pin == forbid[i] ) return false;
144-
}
145-
146-
return true;
147-
}
148-
149134
#ifdef __cplusplus
150135
}
151136
#endif

0 commit comments

Comments
 (0)