Brick Groove Machine 0.9.3
Firmware embarqué pour contrôleur/synthé Brick
 
Chargement...
Recherche...
Aucune correspondance
drv_buttons.h
Aller à la documentation de ce fichier.
1
17#ifndef DRV_BUTTONS_H
18#define DRV_BUTTONS_H
19
20#include "ch.h"
21#include "brick_config.h"
22#include "hal.h"
23
24/* ====================================================================== */
25/* TYPES ET STRUCTURES */
26/* ====================================================================== */
27
36
41typedef struct {
42 int id;
45
46/* ====================================================================== */
47/* API PUBLIQUE */
48/* ====================================================================== */
49
56void drv_buttons_start(void);
57
63bool drv_button_is_pressed(int id);
64
72bool drv_buttons_poll(button_event_t *evt, systime_t timeout);
73
74#endif /* DRV_BUTTONS_H */
Configuration matérielle et paramètres globaux du firmware Brick.
uint32_t systime_t
Definition ch.h:12
bool drv_buttons_poll(button_event_t *evt, systime_t timeout)
Lit un événement de bouton dans la mailbox.
Definition drv_buttons.c:156
bool drv_button_is_pressed(int id)
Vérifie l’état courant d’un bouton.
Definition drv_buttons.c:144
void drv_buttons_start(void)
Initialise le driver des boutons et démarre le thread de lecture.
Definition drv_buttons.c:121
button_event_type_t
Type d’événement de bouton détecté.
Definition drv_buttons.h:32
@ BUTTON_EVENT_PRESS
Definition drv_buttons.h:33
@ BUTTON_EVENT_RELEASE
Definition drv_buttons.h:34
Structure décrivant un événement de bouton.
Definition drv_buttons.h:41
button_event_type_t type
Definition drv_buttons.h:43
int id
Definition drv_buttons.h:42