Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Files

file  input_keymap.h
 Header file for keymap utilities.
 

Macros

#define MATRIX_ROW(keymap_entry)   (((keymap_entry) >> 24) & 0xff)
 Extract the row index from a keymap entry.
 
#define MATRIX_COL(keymap_entry)   (((keymap_entry) >> 16) & 0xff)
 Extract the column index from a keymap entry.
 

Detailed Description

Macro Definition Documentation

◆ MATRIX_COL

#define MATRIX_COL (   keymap_entry)    (((keymap_entry) >> 16) & 0xff)

#include <include/zephyr/input/input_keymap.h>

Extract the column index from a keymap entry.

This macro extracts the column index from a 32-bit keymap entry. The column index is stored in bits 16-23 of the keymap entry.

Parameters
keymap_entryThe 32-bit keymap entry value.
Returns
The column index (0-255) extracted from the keymap entry.

◆ MATRIX_ROW

#define MATRIX_ROW (   keymap_entry)    (((keymap_entry) >> 24) & 0xff)

#include <include/zephyr/input/input_keymap.h>

Extract the row index from a keymap entry.

This macro extracts the row index from a 32-bit keymap entry. The row index is stored in bits 24-31 of the keymap entry.

Parameters
keymap_entryThe 32-bit keymap entry value.
Returns
The row index (0-255) extracted from the keymap entry.