mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
allow P0.4/P0.30
This commit is contained in:
+9
-13
@@ -231,22 +231,18 @@ uint8_t humid_sht_reset( void )
|
||||
void humid_sht_init( void )
|
||||
{
|
||||
/* Configure DAT/SCL pin as GPIO */
|
||||
#if 0
|
||||
PINSEL0 &= ~(_BV(DAT_PIN*2)|_BV(DAT_PIN*2+1)|
|
||||
_BV(SCK_PIN*2)|_BV(SCK_PIN*2+1));
|
||||
|
||||
#if (DAT_PIN<16)
|
||||
PINSEL0 &= ~(_BV(DAT_PIN*2)|_BV(DAT_PIN*2+1));
|
||||
#else
|
||||
PINSEL1 &= ~(_BV((DAT_PIN-16)*2)|_BV((DAT_PIN-16)*2+1));
|
||||
#endif
|
||||
|
||||
//#if (DAT_PIN<16)
|
||||
PINSEL0 &= ~(_BV(DAT_PIN*2)|_BV(DAT_PIN*2+1));
|
||||
//#else
|
||||
// PINSEL1 &= ~(_BV((DAT_PIN-16)*2)|_BV((DAT_PIN-16)*2+1));
|
||||
//#endif
|
||||
|
||||
//#if (SCK_PIN<16)
|
||||
#if (SCK_PIN<16)
|
||||
PINSEL0 &= ~(_BV(SCK_PIN*2)|_BV(SCK_PIN*2+1));
|
||||
//#else
|
||||
// PINSEL1 &= ~(_BV((SCK_PIN-16)*2)|_BV((SCK_PIN-16)*2+1));
|
||||
//#endif
|
||||
#else
|
||||
PINSEL1 &= ~(_BV((SCK_PIN-16)*2)|_BV((SCK_PIN-16)*2+1));
|
||||
#endif
|
||||
|
||||
IO0DIR &= ~(_BV(DAT_PIN));
|
||||
IO0CLR = _BV(DAT_PIN);
|
||||
|
||||
Reference in New Issue
Block a user