I tried to drive LEDs on GPIO in C using the following scripts. But LEDs did not respond correctly. In theory, LED should be on when it is set at LED_ON. But the LEDs remained off no matter if I entered LED_ON or LED_OFF.
Can somebody help on this? Thanks.
bool_t is defined in a header file:
typedef char bool_t;
Scripts in Main.c Below:
bool_t LED_ON = 0;
bool_t LED_OFF = 1;
gpio_set(LED1,LED_ON)
gpio_set(LED2,LED_OFF)