Synopsis
typedef enum {
PLATFORM_BUTTON_STANDARD,
PLATFORM_BUTTON_UP,
PLATFORM_BUTTON_DOWN,
PLATFORM_BUTTON_LEFT,
PLATFORM_BUTTON_RIGHT,
PLATFORM_BUTTON_CENTER,
PLATFORM_BUTTON_MASK_MASK,
PLATFORM_BUTTON_POSITIVE_LOGIC,
PLATFORM_BUTTON_NEGATIVE_LOGIC
} PLATFORM_BUTTON_ATTRIBUTE_t;
Description
PLATFORM_BUTTON_ATTRIBUTE_t describes the attributes of a push button.
The attributes are a combination of button logic and
now the button is sensed.
Buttons that are part of a joystick arrangement have
PLATFORM_BUTTON_JOYSTICK set along with one of the
up, down, left, right, and center attributes.
-
PLATFORM_BUTTON_STANDARD
- The button is a standard momentary push button.
-
PLATFORM_BUTTON_UP
- The button indicates Up direction.
-
PLATFORM_BUTTON_DOWN
- The button indicates Down direction.
-
PLATFORM_BUTTON_LEFT
- The button indicates Left direction.
-
PLATFORM_BUTTON_RIGHT
- The button indicates Right direction.
-
PLATFORM_BUTTON_CENTER
- The button indicates a joystick center-push "select".
-
PLATFORM_BUTTON_MASK
- The mask to isolate the button type above.
-
PLATFORM_BUTTON_POSITIVE_LOGIC
- When set indicates that the button uses positive logic:
reading a one from the GPIO indicates the button is pressed,
and reading a zero indicates it is released. When clear,
indicates the button uses negative logic.
-
PLATFORM_BUTTON_NEGATIVE_LOGIC
- A documentation convenience when constructing button attributes.
Indicates that the button uses negative logic:
reading a zero from the GPIO indicates the button is pressed,
reading a one indicates the button is released.