Hi I'm looking to Program the NRF9E5 RX board so that the LED remains high until the switch is pressed on TX. So the TX button would turn the LED high and remain so until the TX Switch is pressed. I would like to do this for two LEDs. But for the code below I am trying one (P0.2) just to check.
The code below (RX) is done on Keil uvision 4.72.9:
void Receiver(void) { unsigned char b; unsigned char b1,b2; unsigned char oldb1,oldb2;
TXEN = 0;
for(;;)
{
b = ReceivePacket();
b1= b&0;//0010
//b2=b&2;//0100
oldb1=P0.2;
//oldb2=P.2;
for(;;){
p0.2=~p0.2;
delay_ms(500);
}
if(p0.2==0)
p0.2 = 1;
else p0.2 = 0;
}
end if;
}
void Init(void)
Any assistance would be appreciated greatly.