nrf24l01硬件接口和msp430IO设置,的?430 IO口应该怎么设置,我下面配置的对不对? 50
//==================CE===========#defineRF24L01_CE_0P2OUT&=~BIT1#defineRF24L01_CE_1P2...
//==================CE===========
#define RF24L01_CE_0 P2OUT &=~BIT1
#define RF24L01_CE_1 P2OUT |= BIT1
//===========RF24L01_CSN端口=====
#define RF24L01_CSN_0 P2OUT &=~BIT2
#define RF24L01_CSN_1 P2OUT |= BIT2
//==========RF24L01_SCK========
#define RF24L01_SCK_0 P3OUT &=~BIT0
#define RF24L01_SCK_1 P3OUT |= BIT0
//=============MISO端口=========
#define RF24L01_MISO_0 P3OUT &=~BIT2
#define RF24L01_MISO_1 P3OUT |= BIT2
//============MOSI端口==========
#define RF24L01_MOSI_0 P3OUT &=~BIT1
#define RF24L01_MOSI_1 P3OUT |= BIT1
//===========IRQ状态=========
#define RF24L01_IRQ_0 P3OUT &=~BIT3
#define RF24L01_IRQ_1 P3OUT |= BIT3
配置::P2DIR |= BIT1; P2DIR |= BIT2; P3DIR |= BIT0;
P3DIR |= BIT1; P3DIR |= BIT2; P3DIR |= BIT3;P1IE&=~BIT1
顺便问下P1IE&=~BIT1什么意思 展开
#define RF24L01_CE_0 P2OUT &=~BIT1
#define RF24L01_CE_1 P2OUT |= BIT1
//===========RF24L01_CSN端口=====
#define RF24L01_CSN_0 P2OUT &=~BIT2
#define RF24L01_CSN_1 P2OUT |= BIT2
//==========RF24L01_SCK========
#define RF24L01_SCK_0 P3OUT &=~BIT0
#define RF24L01_SCK_1 P3OUT |= BIT0
//=============MISO端口=========
#define RF24L01_MISO_0 P3OUT &=~BIT2
#define RF24L01_MISO_1 P3OUT |= BIT2
//============MOSI端口==========
#define RF24L01_MOSI_0 P3OUT &=~BIT1
#define RF24L01_MOSI_1 P3OUT |= BIT1
//===========IRQ状态=========
#define RF24L01_IRQ_0 P3OUT &=~BIT3
#define RF24L01_IRQ_1 P3OUT |= BIT3
配置::P2DIR |= BIT1; P2DIR |= BIT2; P3DIR |= BIT0;
P3DIR |= BIT1; P3DIR |= BIT2; P3DIR |= BIT3;P1IE&=~BIT1
顺便问下P1IE&=~BIT1什么意思 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询