Bit by bit microcontroller

 

// button while loop or timer, external interrupt solve

1              IF (! BTN0) // button low 
2              {
 3                  IF (g_state_btn0) // just is high? 
. 4                  {
 . 5                      IF (g_state_led0!) // just to be destroyed 
. 6                      {
 . 7                          g_state_led0 = . 1 ; // now lit state 
. 8                          LED0_H;                
 . 9                      }
 10                      the else 
. 11                      {
 12 is                          g_state_led0 = 0 ; //Is now off state 
13 is                          LED0_L;
 14                      }
 15                  }
 16                  g_state_btn0 = 0 ; // now set low 
. 17              }
 18 is              the else  // button when low 
. 19              {
 20 is                  g_state_btn0 = . 1 ; // now set high 
21              }
 22         

 

Guess you like

Origin www.cnblogs.com/kingboy100/p/11684083.html
Bit
BIT