remove isPinValid()

This commit is contained in:
hathach committed 2018-11-05 15:01:44 +07:00
1 parent 9a0cca796d
commit 023ba48c2a
4 files changed
+1 -47

No files matched your search

+1 -1
View File
@@ -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++)
-15
View File
@@ -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
-15
View File
@@ -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