Voss Connection Detection
1
Detect a connector click using realtime code on Bela hardware
|
Go to the source code of this file.
Macros | |
#define | SYSFS_GPIO_DIR "/sys/class/gpio" |
#define | POLL_TIMEOUT (3 * 1000) /* 3 seconds */ |
#define | MAX_BUF 64 |
#define | SYSFS_OMAP_MUX_DIR "/sys/kernel/debug/omap_mux/" |
Enumerations | |
enum | PIN_DIRECTION { INPUT_PIN =0, OUTPUT_PIN =1 } |
enum | PIN_VALUE { LOW =0, HIGH =1 } |
Functions | |
int | gpio_export (unsigned int gpio) |
int | gpio_unexport (unsigned int gpio) |
int | gpio_set_dir (unsigned int gpio, PIN_DIRECTION out_flag) |
int | gpio_set_value (unsigned int gpio, PIN_VALUE value) |
int | gpio_get_value (unsigned int gpio, unsigned int *value) |
int | gpio_set_edge (unsigned int gpio, char *edge) |
int | gpio_fd_open (unsigned int gpio) |
int | gpio_fd_close (int fd) |
int | gpio_omap_mux_setup (const char *omap_pin0_name, const char *mode) |
#define MAX_BUF 64 |
Definition at line 46 of file SimpleGPIO.h.
#define POLL_TIMEOUT (3 * 1000) /* 3 seconds */ |
Definition at line 45 of file SimpleGPIO.h.
#define SYSFS_GPIO_DIR "/sys/class/gpio" |
Definition at line 44 of file SimpleGPIO.h.
#define SYSFS_OMAP_MUX_DIR "/sys/kernel/debug/omap_mux/" |
Definition at line 47 of file SimpleGPIO.h.
enum PIN_DIRECTION |
Enumerator | |
---|---|
INPUT_PIN | |
OUTPUT_PIN |
Definition at line 49 of file SimpleGPIO.h.
enum PIN_VALUE |
Enumerator | |
---|---|
LOW | |
HIGH |
Definition at line 54 of file SimpleGPIO.h.
int gpio_export | ( | unsigned int | gpio | ) |
Definition at line 49 of file SimpleGPIO.cpp.
int gpio_fd_close | ( | int | fd | ) |
Definition at line 211 of file SimpleGPIO.cpp.
int gpio_fd_open | ( | unsigned int | gpio | ) |
Definition at line 193 of file SimpleGPIO.cpp.
int gpio_get_value | ( | unsigned int | gpio, |
unsigned int * | value | ||
) |
Definition at line 140 of file SimpleGPIO.cpp.
int gpio_omap_mux_setup | ( | const char * | omap_pin0_name, |
const char * | mode | ||
) |
Definition at line 220 of file SimpleGPIO.cpp.
int gpio_set_dir | ( | unsigned int | gpio, |
PIN_DIRECTION | out_flag | ||
) |
Definition at line 90 of file SimpleGPIO.cpp.
int gpio_set_edge | ( | unsigned int | gpio, |
char * | edge | ||
) |
Definition at line 171 of file SimpleGPIO.cpp.
int gpio_set_value | ( | unsigned int | gpio, |
PIN_VALUE | value | ||
) |
Definition at line 115 of file SimpleGPIO.cpp.
int gpio_unexport | ( | unsigned int | gpio | ) |
Definition at line 70 of file SimpleGPIO.cpp.