Part Number: MSP432P401R
Tool/software: Code Composer Studio
I took as a start the code from the Resource explorer. My current code turns on the blue light (and the light remains on for ever)
volatile uint32_t i;
// Stop watchdog timer
WDT_A_hold(WDT_A_BASE);
GPIO_setAsOutputPin(
GPIO_PORT_P2,
GPIO_PIN2
);
while(1)
{
// I want to do something like : if switch s1 is pressed, then execute this condition below. If not, then I call setOutputLowonPin method
// Also I want to print to the console whether "lights is on" or "lights is off"
GPIO_setOutputHighOnPin(
GPIO_PORT_P2,
GPIO_PIN2
);
// Delay
for(i=1000000; i>0; i--);
}