remove isPinValid()
This commit is contained in:
1 parent
9a0cca796d
commit
023ba48c2a
4 files changed
+1
-47
No files matched your search
@@ -78,7 +78,7 @@ void HardwarePWM::setClockDiv(uint8_t div)
|
||||
*/
|
||||
bool HardwarePWM::addPin(uint8_t pin)
|
||||
{
|
||||
VERIFY( isPinValid(pin) && (_count <= MAX_CHANNELS) );
|
||||
VERIFY( _count <= MAX_CHANNELS );
|
||||
|
||||
// Check if pin is already configured
|
||||
for(uint8_t i=0; i<_count; i++)
|
||||
|
||||
@@ -118,21 +118,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
#define PIN_WIRE_SDA (25u)
|
||||
#define PIN_WIRE_SCL (26u)
|
||||
|
||||
|
||||
static inline bool isPinValid(uint32_t pin)
|
||||
{
|
||||
// 0, 1 is xtal
|
||||
if (pin >= PINS_COUNT) return false;
|
||||
|
||||
const uint8_t forbid[] = { 0, 1, };
|
||||
for(uint8_t i=0; i<sizeof(forbid); i++)
|
||||
{
|
||||
if ( pin == forbid[i] ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -118,22 +118,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
#define PIN_WIRE_SDA (25u)
|
||||
#define PIN_WIRE_SCL (26u)
|
||||
|
||||
|
||||
// TODO remove
|
||||
static inline bool isPinValid(uint32_t pin)
|
||||
{
|
||||
// 0, 1 is xtal
|
||||
if (pin >= PINS_COUNT) return false;
|
||||
|
||||
const uint8_t forbid[] = { 0, 1, };
|
||||
for(uint8_t i=0; i<sizeof(forbid); i++)
|
||||
{
|
||||
if ( pin == forbid[i] ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -131,21 +131,6 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used
|
||||
#define EXTERNAL_FLASH_DEVICES MX25R6435F
|
||||
|
||||
// TODO remove
|
||||
static inline bool isPinValid(uint32_t pin)
|
||||
{
|
||||
// 0, 1 is xtal
|
||||
if (pin >= PINS_COUNT) return false;
|
||||
|
||||
const uint8_t forbid[] = { 0, 1, };
|
||||
for(uint8_t i=0; i<sizeof(forbid); i++)
|
||||
{
|
||||
if ( pin == forbid[i] ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user