PebbleOS v4.47.0-1362-gd278268fe
Loading...
Searching...
No Matches
driver.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <pbl/device.h>
#include <pbl/drivers/touch.h>
#include <pbl/kernel/mutex.h>

Data Structures

struct  pbl_touch_ops
 Touchscreen driver operations, called with the device lock held. More...
 
struct  pbl_touch_state
 Touchscreen runtime state. More...
 
struct  pbl_touch
 Touchscreen. More...
 

Macros

#define PBL_TOUCH_STATE_DEFINE(sym)
 Define the class state of a touchscreen.
 
#define PBL_TOUCH_INIT(sym, _name, _parent, _ops, ...)
 Initialize a struct pbl_touch.
 

Functions

void pbl_touch_lock (const struct pbl_touch *touch)
 Take the device lock.
 
void pbl_touch_unlock (const struct pbl_touch *touch)
 Release the device lock.
 
void pbl_touch_report (const struct pbl_touch *touch, bool down, uint16_t x, uint16_t y)
 Report a sample.
 
void pbl_touch_report_gesture (const struct pbl_touch *touch, uint16_t code, uint16_t x, uint16_t y)
 Report a gesture recognized by the controller.