Synopsis
typedef struct {
unsigned char pin;
unsigned char attributes;
unsigned char mode;
const char *name;
} PLATFORM_BUTTON_CONFIGURATION_t;
Description
PLATFORM_BUTTON_CONFIGURATION_t describes the features of a button connected
to a GPIO.
-
pin
- The digital pin that senses the button. See PLATFORM_PIN_CONNECTION_t.
-
attributes
- The attributes of the button. See PLATFORM_BUTTON_ATTRIBUTE_t.
-
mode
- The mode to set the pin, should it be connected by a GPIO.
See PLATFORM_PIN_MODE_t.
Some boards rely on integrated pull-up or pull-down resistors
for buttons rather than using an external resistor. You can
specify the pull-ups or pull-downs by setting this member
appropriately.
-
name
- The name of the button. You can set this to the name of the
button on the silkscreen or whatever is visible to the user for
identification. If name is zero, the button's name is
derived from the GPIO connection name for pin or the pad
name for pin. See platform_button_name.
See Also
platform_button_catalog