libpynq
(release 5EWC0-2023 version 0.2.0 of 2023-08-28 20:33)
Loading...
Searching...
No Matches
buttons.c
Go to the documentation of this file.
1
#include <
buttons.h
>
2
void
switches_init
(
void
){};
3
void
switches_destroy
(
void
){};
4
extern
void
buttons_init
(
void
){};
5
extern
void
buttons_destroy
(
void
){};
6
extern
int
get_button_state
(
const
int
button){};
7
extern
int
wait_until_button_state
(
const
int
button,
const
int
state){
return
0;};
8
extern
int
sleep_msec_button_pushed
(
const
int
button,
const
int
msec){
return
0;};
9
extern
void
sleep_msec_buttons_pushed
(
int
button_states[],
const
int
ms){};
10
extern
int
wait_until_button_pushed
(
const
int
button){
return
0;};
11
extern
int
wait_until_button_released
(
const
int
button){
return
0;};
12
extern
int
wait_until_any_button_pushed
(
void
){
return
0;};
13
extern
int
wait_until_any_button_released
(
void
){
return
0;};
14
extern
int
get_switch_state
(
const
int
switch_num){
return
0;};
buttons.h
sleep_msec_button_pushed
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
wait_until_button_pushed
int wait_until_button_pushed(const int button)
Wait until the given button is pushed (which may be immediately).
Definition
buttons.c:167
switches_init
void switches_init(void)
Initialise the switches before they can be used.
Definition
buttons.c:56
wait_until_any_button_pushed
int wait_until_any_button_pushed(void)
Wait until any button is not pushed (which may be immediately).
Definition
buttons.c:177
buttons_destroy
void buttons_destroy(void)
Unitialize the buttons.
Definition
buttons.c:50
wait_until_any_button_released
int wait_until_any_button_released(void)
Wait until the given button is not pushed (which may be immediately).
Definition
buttons.c:198
switches_destroy
void switches_destroy(void)
Unitialize the buttons.
Definition
buttons.c:65
wait_until_button_state
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
wait_until_button_released
int wait_until_button_released(const int button)
Wait until the given button is not pushed (which may be immediately).
Definition
buttons.c:172
get_switch_state
int get_switch_state(const int switch_num)
Definition
buttons.c:218
get_button_state
int get_button_state(const int button)
Return the state of the button (BUTTON_(NOT_)PUSHED).
Definition
buttons.c:71
buttons_init
void buttons_init(void)
Initialise the buttons before they can be used.
Definition
buttons.c:39
sleep_msec_buttons_pushed
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
library
empty-library
buttons.c
Generated on Mon Aug 28 2023 20:33:19 for libpynq by
1.9.7