1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-29 19:18:27 +02:00

xxx_MODE were used as if they were port bits, not registers.

- fw/atspi/atspi.c (init_io): comment had the wrong initial value for SCLK
- fw/atspi/atspi.c (init_io): xxx_MODE are registers, not bits ...
- fw/common/io.h (IRQ_RF), fw/atspi/atspi.c (init_io): indicate pending
  moving of IRQ_RF
This commit is contained in:
Werner Almesberger 2010-08-20 17:50:12 -03:00
parent 1d07933a2a
commit 14c1b4cbfc
2 changed files with 8 additions and 8 deletions

View File

@ -25,7 +25,7 @@ static void init_io(void)
* *
* MOSI push-pull 0 * MOSI push-pull 0
* MISO open drain 1 (input) * MISO open drain 1 (input)
* SCLK push-pull 1 * SCLK push-pull 0
* nSS push-pull 1 * nSS push-pull 1
* nRST_RF push-pull 1 * nRST_RF push-pull 1
* IRQ_RF open drain 1 (input) * IRQ_RF open drain 1 (input)
@ -37,22 +37,22 @@ static void init_io(void)
*/ */
MOSI = 0; MOSI = 0;
MOSI_MODE = 1; MOSI_MODE |= 1 << MOSI_BIT;
SCLK = 0; SCLK = 0;
SCLK_MODE = 1; SCLK_MODE |= 1 << SCLK_BIT;
nSS_MODE = 1; nSS_MODE |= 1 << nSS_BIT;
nRST_RF_MODE = 1; nRST_RF_MODE |= 1 << nRST_RF_BIT;
SLP_TR = 0; SLP_TR = 0;
SLP_TR_MODE = 1; SLP_TR_MODE |= 1 << SLP_TR_BIT;
P0 &= P0 &=
~((1 << 0) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); ~((1 << 0) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
/* change 1 << 0 to 1 << 2 once 100813 boards are reworked */
P3 = 0; P3 = 0;
} }

View File

@ -28,7 +28,7 @@
/* Miscellaneous RF signals */ /* Miscellaneous RF signals */
#define nRST_RF P2_0 #define nRST_RF P2_0
#define IRQ_RF P0_2 #define IRQ_RF P0_2 /* change to P0_0 when 100813 board are reworked */
#define SLP_TR P2_1 #define SLP_TR P2_1
#endif /* !IO_H */ #endif /* !IO_H */