cursada_mc2
Base de control de temperatura para EDU-CIAA-NXP
Loading...
Searching...
No Matches
buttons_driver.h
Go to the documentation of this file.
1
6#if !defined(TECLAS_DRIVER_H_)
7#define TECLAS_DRIVER_H_
8
9#include "chip.h"
10
12#define TECLA1 1
14#define TECLA2 2
16#define TECLA3 3
18#define TECLA4 4
19
21#define PININT0_IRQ_HANDLER GPIO0_IRQHandler
23#define PININT1_IRQ_HANDLER GPIO1_IRQHandler
25#define PININT2_IRQ_HANDLER GPIO2_IRQHandler
27#define PININT3_IRQ_HANDLER GPIO3_IRQHandler
28
32void buttons_init(void);
33
42void button_notify_irq(uint8_t button_id);
43
51void buttons_process(uint32_t delta_ms);
52
59uint8_t button_get_event(void);
60
61#endif // TECLAS_DRIVER_H_
void button_notify_irq(uint8_t button_id)
Notifica al driver que una tecla genero una interrupcion externa.
void buttons_process(uint32_t delta_ms)
Procesa el debounce y actualiza los eventos latcheados de teclas.
uint8_t button_get_event(void)
Devuelve y consume el siguiente evento de tecla confirmado.
void buttons_init(void)
Inicializa los pines asociados a los cuatro pulsadores.