When I am executing this code, the LED is ON by default whereas it
should only be ON when switch is pressed. And when I press the
switch, it turns off. Can anyone please explain me, what I am doing
wrong with my code.</ #include <lpc17xx.h>
#define SwitchPinNumber 11
#define LedPinNumber 6
void main()
{
uint32_t switchStatus;
SystemInit();
LPC_PINCON->PINSEL4 = 0x000000; //Configure the Pins for
GPIO;
↧