libpynq (release 5EWC0-2023 version 0.2.5 of 2023-10-08 10:51)
Loading...
Searching...
No Matches
buttons.h File Reference
#include <gpio.h>
Include dependency graph for buttons.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BUTTON_NOT_PUSHED   0
 
#define BUTTON_PUSHED   1
 
#define SWITCH_OFF   0
 
#define SWITCH_ON   1
 

Enumerations

enum  button_index_t {
  BUTTON0 , BUTTON1 , BUTTON2 , BUTTON3 ,
  NUM_BUTTONS
}
 
enum  switches_index_t { SWITCH0 , SWITCH1 , NUM_SWITCHES }
 

Functions

void switches_init (void)
 
void switches_destroy (void)
 
void buttons_init (void)
 
void buttons_destroy (void)
 
int get_button_state (const int button)
 
int wait_until_button_state (const int button, const int state)
 
int sleep_msec_button_pushed (const int button, const int msec)
 
void sleep_msec_buttons_pushed (int button_states[], const int ms)
 
int wait_until_button_pushed (const int button)
 
int wait_until_button_released (const int button)
 
int wait_until_any_button_pushed (void)
 
int wait_until_any_button_released (void)
 
int get_switch_state (const int switch_num)