Advertisement
Guest User

Miriam Ivan Alba

a guest
Mar 30th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. unit8_t leer_pulsador(void) {
  2.    
  3.     GPIO_ReadInoutDataBit(GPIOA, GPIO_Pin_0);
  4. }
  5. int main (void)
  6. {
  7.    
  8.    led_inicializar();
  9.    pulsador_inicializar();
  10.  
  11.    while (1) {
  12.     if (leer_pulsador() == 1) {
  13.        led_on();
  14.     } else {
  15.        led_off();
  16.     }
  17.   }
  18.      
  19.    return(0);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement