Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
input_kbd_matrix.h File Reference
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/pm/device.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys_clock.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Data Structures

struct  input_kbd_matrix_api
 Keyboard matrix internal APIs. More...
 
struct  input_kbd_matrix_common_config
 Common keyboard matrix config. More...
 
struct  input_kbd_matrix_common_data
 Common keyboard matrix data. More...
 

Macros

#define INPUT_KBD_MATRIX_COLUMN_DRIVE_NONE   -1
 Special drive_column argument for not driving any column.
 
#define INPUT_KBD_MATRIX_COLUMN_DRIVE_ALL   -2
 Special drive_column argument for driving all the columns.
 
#define INPUT_KBD_MATRIX_SCAN_OCURRENCES   30U
 Number of tracked scan cycles.
 
#define PRIkbdrow   "02" PRIx8
 
#define INPUT_KBD_ACTUAL_KEY_MASK_CONST
 
#define INPUT_KBD_MATRIX_ROW_BITS   NUM_BITS(kbd_row_t)
 Maximum number of rows.
 
#define INPUT_KBD_MATRIX_DATA_NAME(node_id, name)
 
#define INPUT_KBD_MATRIX_DT_DEFINE_ROW_COL(node_id, _row_size, _col_size)
 Defines the common keyboard matrix support data from devicetree, specify row and col count.
 
#define INPUT_KBD_MATRIX_DT_DEFINE(node_id)
 Defines the common keyboard matrix support data from devicetree.
 
#define INPUT_KBD_MATRIX_DT_INST_DEFINE_ROW_COL(inst, row_size, col_size)
 Defines the common keyboard matrix support data from devicetree instance, specify row and col count.
 
#define INPUT_KBD_MATRIX_DT_INST_DEFINE(inst)
 Defines the common keyboard matrix support data from devicetree instance.
 
#define INPUT_KBD_MATRIX_DT_COMMON_CONFIG_INIT_ROW_COL(node_id, _api, _row_size, _col_size)
 Initialize common keyboard matrix config from devicetree, specify row and col count.
 
#define INPUT_KBD_MATRIX_DT_COMMON_CONFIG_INIT(node_id, api)
 Initialize common keyboard matrix config from devicetree.
 
#define INPUT_KBD_MATRIX_DT_INST_COMMON_CONFIG_INIT_ROW_COL(inst, api, row_size, col_size)
 Initialize common keyboard matrix config from devicetree instance, specify row and col count.
 
#define INPUT_KBD_MATRIX_DT_INST_COMMON_CONFIG_INIT(inst, api)
 Initialize common keyboard matrix config from devicetree instance.
 
#define INPUT_KBD_STRUCT_CHECK(config, data)
 Validate the offset of the common data structures.
 

Typedefs

typedef uint8_t kbd_row_t
 Row entry data type.
 

Functions

int input_kbd_matrix_actual_key_mask_set (const struct device *dev, uint8_t row, uint8_t col, bool enabled)
 Enables or disables a specific row, column combination in the actual key mask.
 
void input_kbd_matrix_poll_start (const struct device *dev)
 Start scanning the keyboard matrix.
 
void input_kbd_matrix_drive_column_hook (const struct device *dev, int col)
 Drive column hook.
 
int input_kbd_matrix_common_init (const struct device *dev)
 Common function to initialize a keyboard matrix device at init time.