-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: GPIO
Description
This issue is to discuss reworking the current GPIO flags, today we have:
/* direction */
#define GPIO_DIR_IN (0 << 0)
#define GPIO_DIR_OUT (1 << 0)
/* interrupt */
#define GPIO_INT (1 << 1)
#define GPIO_INT_ACTIVE_LOW (0 << 2)
#define GPIO_INT_ACTIVE_HIGH (1 << 2)
#define GPIO_INT_CLOCK_SYNC (1 << 3)
#define GPIO_INT_DEBOUNCE (1 << 4)
#define GPIO_INT_LEVEL (0 << 5)
#define GPIO_INT_EDGE (1 << 5)
#define GPIO_INT_DOUBLE_EDGE (1 << 6)
/* polarity */
#define GPIO_POL_NORMAL (0 << GPIO_POL_POS)
#define GPIO_POL_INV (1 << GPIO_POL_POS)
/* PULL up/down */
#define GPIO_PUD_NORMAL (0 << GPIO_PUD_POS)
#define GPIO_PUD_PULL_UP (1 << GPIO_PUD_POS)
#define GPIO_PUD_MASK (3 << GPIO_PUD_POS)
#define GPIO_DS_LOW_MASK (0x3 << GPIO_DS_LOW_POS)
#define GPIO_DS_DFLT_LOW (0x0 << GPIO_DS_LOW_POS)
#define GPIO_DS_ALT_LOW (0x1 << GPIO_DS_LOW_POS)
#define GPIO_DS_DISCONNECT_LOW (0x3 << GPIO_DS_LOW_POS)
#define GPIO_DS_DFLT_HIGH (0x0 << GPIO_DS_HIGH_POS)
#define GPIO_DS_ALT_HIGH (0x1 << GPIO_DS_HIGH_POS)
#define GPIO_DS_DISCONNECT_HIGH (0x3 << GPIO_DS_HIGH_POS)
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: GPIO