Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/gpio.h
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
#define GPIO_PIN_PRESET_HIGH 0x00000800 /* low before enabling output */ | #define GPIO_PIN_PRESET_HIGH 0x00000800 /* low before enabling output */ | ||||
/* GPIO interrupt capabilities */ | /* GPIO interrupt capabilities */ | ||||
#define GPIO_INTR_NONE 0x00000000 /* no interrupt support */ | #define GPIO_INTR_NONE 0x00000000 /* no interrupt support */ | ||||
#define GPIO_INTR_LEVEL_LOW 0x00010000 /* level trigger, low */ | #define GPIO_INTR_LEVEL_LOW 0x00010000 /* level trigger, low */ | ||||
#define GPIO_INTR_LEVEL_HIGH 0x00020000 /* level trigger, high */ | #define GPIO_INTR_LEVEL_HIGH 0x00020000 /* level trigger, high */ | ||||
#define GPIO_INTR_EDGE_RISING 0x00040000 /* edge trigger, rising */ | #define GPIO_INTR_EDGE_RISING 0x00040000 /* edge trigger, rising */ | ||||
#define GPIO_INTR_EDGE_FALLING 0x00080000 /* edge trigger, falling */ | #define GPIO_INTR_EDGE_FALLING 0x00080000 /* edge trigger, falling */ | ||||
#define GPIO_INTR_EDGE_BOTH 0x00100000 /* edge trigger, both */ | #define GPIO_INTR_EDGE_BOTH 0x00100000 /* edge trigger, both */ | ||||
#define GPIO_INTR_ATTACHED 0x00200000 /* interrupt attached to file */ | |||||
#define GPIO_INTR_MASK (GPIO_INTR_LEVEL_LOW | GPIO_INTR_LEVEL_HIGH | \ | #define GPIO_INTR_MASK (GPIO_INTR_LEVEL_LOW | GPIO_INTR_LEVEL_HIGH | \ | ||||
GPIO_INTR_EDGE_RISING | \ | GPIO_INTR_EDGE_RISING | \ | ||||
GPIO_INTR_EDGE_FALLING | GPIO_INTR_EDGE_BOTH) | GPIO_INTR_EDGE_FALLING | GPIO_INTR_EDGE_BOTH | \ | ||||
GPIO_INTR_ATTACHED) | |||||
struct gpio_pin { | struct gpio_pin { | ||||
uint32_t gp_pin; /* pin number */ | uint32_t gp_pin; /* pin number */ | ||||
char gp_name[GPIOMAXNAME]; /* human-readable name */ | char gp_name[GPIOMAXNAME]; /* human-readable name */ | ||||
uint32_t gp_caps; /* capabilities */ | uint32_t gp_caps; /* capabilities */ | ||||
uint32_t gp_flags; /* current flags */ | uint32_t gp_flags; /* current flags */ | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |