This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Code changes for simpleBLEPeriherpal_in function

Other Parts Discussed in Thread: CC2540

Good morning,

 

I am trying to to set the test pins values to 0 so there is less current drain for the device when taking readings, in the pdf file it gives the code below to put in the simpleBLEPeriherpal_in function. I noticed that when searching through the C file that the code is already in the, but possibly commented out with "#if defined ( CC2540 miniDK) and then the code. Show i erase the if statement and then this code will be active or should i be erasing the "#" anywhere the if (CC2540minidk) statements are. Thank you for your time.

P0SEL = 0; // Configure Port 0 as GPIO
P1SEL = 0; // Configure Port 1 as GPIO
P2SEL = 0; // Configure Port 2 as GPIO
P0DIR = 0xFC; // Port 0 pins P0.0 and P0.1 as input (buttons),
// all others (P0.2-P0.7) as output
P1DIR = 0xFF; // All port 1 pins (P1.0-P1.7) as output
P2DIR = 0x1F; // All port 2 pins (P2.0-P2.4) as output
P0 = 0x03; // All pins on port 0 to low except for P0.0 and P0.1 (buttons)
P1 = 0; // All pins on port 1 to low
P2 = 0; // All pins on port 2 to low