#include "gpio_driver.h"
#include "switch.h"
gpio_handle switches[8];//declare the gpio_handle object for 8 switch;
gpio_handle leds[8];//declare the gpio_handle object for 8 leds;
void setup()
{
Serial.begin(9600);
for (uint8_t i = 0; i <= 7; i++)
{
handle_configure(switches[i], GPIOK, i, GPIO_INPUT); //initialize all pin as input for switch
handle_configure(leds[i],GPIOF,i,GPIO_OUTPUT);//initialize all pin as poutput for leds
}
}
void loop()
{
//press_sw1_out_led1();
//press_sw1_out_all_led();
//press_sw2_blink_all_led();
//press_sw3_glow_onebyone_delay();
//any_sw_glow_rev_onebyone_delay();
//press_sw0_glow_even_leds();
//press_sw7_glow_odd_leds();
press_sw0_glow_onebyone_sw_State_delay();
}sw1
sw2
sw3
sw4
sw5
sw6
sw7
sw8
LSB (A0)