update the pin for metro52

This commit is contained in:
hathach committed 2017-06-29 15:47:20 +07:00
1 parent a1a20425db
commit d1e86c6ee0
3 files changed
+92 -77

No files matched your search

+10 -1
View File
@@ -119,7 +119,16 @@ static const uint8_t SCK = PIN_SPI_SCK ;
static inline bool isPinValid(uint32_t pin)
{
return (pin < PINS_COUNT) && (pin != PIN_SERIAL_RX) && (pin != PIN_SERIAL_TX);
// 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