libpynq (release 5EWC0-2023 version 0.2.1 of 2023-09-01 11:02)
Loading...
Searching...
No Matches
buttons.c
Go to the documentation of this file.
1#include <buttons.h>
2void switches_init(void){};
3void switches_destroy(void){};
4extern void buttons_init(void){};
5extern void buttons_destroy(void){};
6extern int get_button_state(const int button){};
7extern int wait_until_button_state(const int button, const int state){return 0;};
8extern int sleep_msec_button_pushed(const int button, const int msec){return 0;};
9extern void sleep_msec_buttons_pushed(int button_states[], const int ms){};
10extern int wait_until_button_pushed(const int button){return 0;};
11extern int wait_until_button_released(const int button){return 0;};
12extern int wait_until_any_button_pushed(void){return 0;};
13extern int wait_until_any_button_released(void){return 0;};
14extern int get_switch_state(const int switch_num){return 0;};
int sleep_msec_button_pushed(const int button, const int ms)
Check if the given button is pushed in msec milliseconds. The function does NOT return early.
Definition buttons.c:110
int wait_until_button_pushed(const int button)
Wait until the given button is pushed (which may be immediately).
Definition buttons.c:167
void switches_init(void)
Initialise the switches before they can be used.
Definition buttons.c:56
int wait_until_any_button_pushed(void)
Wait until any button is not pushed (which may be immediately).
Definition buttons.c:177
void buttons_destroy(void)
Unitialize the buttons.
Definition buttons.c:50
int wait_until_any_button_released(void)
Wait until the given button is not pushed (which may be immediately).
Definition buttons.c:198
void switches_destroy(void)
Unitialize the buttons.
Definition buttons.c:65
int wait_until_button_state(const int button, const int state)
Wait until the given button is in state (which may be immediately).
Definition buttons.c:84
int wait_until_button_released(const int button)
Wait until the given button is not pushed (which may be immediately).
Definition buttons.c:172
int get_switch_state(const int switch_num)
Definition buttons.c:218
int get_button_state(const int button)
Return the state of the button (BUTTON_(NOT_)PUSHED).
Definition buttons.c:71
void buttons_init(void)
Initialise the buttons before they can be used.
Definition buttons.c:39
void sleep_msec_buttons_pushed(int button_states[], const int ms)
Check if any button is pushed in msec milliseconds. The function does NOT return early.
Definition buttons.c:141