Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
input.h File Reference

Go to the source code of this file.

Data Structures

struct  input_event
 Input event structure. More...
 
struct  input_callback
 Input callback structure. More...
 

Macros

#define INPUT_CALLBACK_DEFINE_NAMED(_dev, _callback, _user_data, name)
 Register a callback structure for input events with a custom name.
 
#define INPUT_CALLBACK_DEFINE(_dev, _callback, _user_data)
 Register a callback structure for input events.
 

Functions

int input_report (const struct device *dev, uint8_t type, uint16_t code, int32_t value, bool sync, k_timeout_t timeout)
 Report a new input event.
 
static int input_report_key (const struct device *dev, uint16_t code, int32_t value, bool sync, k_timeout_t timeout)
 Report a new INPUT_EV_KEY input event, note that value is converted to either 0 or 1.
 
static int input_report_rel (const struct device *dev, uint16_t code, int32_t value, bool sync, k_timeout_t timeout)
 Report a new INPUT_EV_REL input event.
 
static int input_report_abs (const struct device *dev, uint16_t code, int32_t value, bool sync, k_timeout_t timeout)
 Report a new INPUT_EV_ABS input event.
 
bool input_queue_empty (void)
 Returns true if the input queue is empty.