Quantcast
Channel: Keil Discussion Forum RSS Feed
Viewing all articles
Browse latest Browse all 3049

ARM: Reverse working of Switch

$
0
0
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;

Viewing all articles
Browse latest Browse all 3049

Trending Articles