Device driver interface for the STMPE811 touchscreen controller.
More...
Device driver interface for the STMPE811 touchscreen controller.
◆ stmpe811_event_cb_t
typedef void(* stmpe811_event_cb_t) (void *arg) |
Signature of touch event callback triggered from interrupt.
- Parameters
-
[in] | arg | optional context for the callback |
Definition at line 61 of file stmpe811.h.
◆ stmpe811_touch_state_t
Touch state enum.
Enumerator |
---|
STMPE811_TOUCH_STATE_PRESSED | Touchscreen is pressed.
|
STMPE811_TOUCH_STATE_RELEASED | Touchscreen is released.
|
Definition at line 43 of file stmpe811.h.
◆ stmpe811_init()
Initialize the given STMPE811 device.
- Parameters
-
[in,out] | dev | Device descriptor of the STMPE811 |
[in] | params | Initialization parameters of the STMPE811 device |
[in] | cb | Callback function called on touch interrupts |
[in] | arg | Context argument used in callback function |
- Returns
- 0 on success
-
-ENODEV when no valid device
-
-EIO when software reset failed
-
-EPROTO on any bus error
◆ stmpe811_read_touch_position()
Read the touch position.
- Parameters
-
[in] | dev | Device descriptor of the STMPE811 |
[out] | position | Touch position |
- Returns
- 0 on success
-
-EPROTO on any bus error
◆ stmpe811_read_touch_state()
Read the touch state (pressed or released)
- Parameters
-
[in] | dev | Device descriptor of the STMPE811 |
[out] | state | Touch state |
- Returns
- 0 on success
-
-EPROTO on any busI2aC error