Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
KSCAN APIs. More...
Typedefs | |
typedef void(* | kscan_callback_t) (const struct device *dev, uint32_t row, uint32_t column, bool pressed) |
Keyboard scan callback called when user press/release a key on a matrix keyboard. | |
Functions | |
int | kscan_config (const struct device *dev, kscan_callback_t callback) |
Configure a Keyboard scan instance. | |
int | kscan_enable_callback (const struct device *dev) |
Enables callback. | |
int | kscan_disable_callback (const struct device *dev) |
Disables callback. | |
KSCAN APIs.
typedef void(* kscan_callback_t) (const struct device *dev, uint32_t row, uint32_t column, bool pressed) |
#include <zephyr/drivers/kscan.h>
Keyboard scan callback called when user press/release a key on a matrix keyboard.
dev | Pointer to the device structure for the driver instance. |
row | Describes row change. |
column | Describes column change. |
pressed | Describes the kind of key event. |
int kscan_config | ( | const struct device * | dev, |
kscan_callback_t | callback | ||
) |
#include <zephyr/drivers/kscan.h>
Configure a Keyboard scan instance.
dev | Pointer to the device structure for the driver instance. |
callback | called when keyboard devices reply to a keyboard event such as key pressed/released. |
0 | If successful. |
Negative | errno code if failure. |
int kscan_disable_callback | ( | const struct device * | dev | ) |
#include <zephyr/drivers/kscan.h>
Disables callback.
dev | Pointer to the device structure for the driver instance. |
0 | If successful. |
Negative | errno code if failure. |
int kscan_enable_callback | ( | const struct device * | dev | ) |
#include <zephyr/drivers/kscan.h>
Enables callback.
dev | Pointer to the device structure for the driver instance. |
0 | If successful. |
Negative | errno code if failure. |