Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Keyboard Scan Driver APIs

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.
 

Detailed Description

KSCAN APIs .

Since
2.1
Version
1.0.0
Deprecated

Typedef Documentation

◆ kscan_callback_t

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.

Deprecated
Parameters
devPointer to the device structure for the driver instance.
rowDescribes row change.
columnDescribes column change.
pressedDescribes the kind of key event.

Function Documentation

◆ kscan_config()

int kscan_config ( const struct device * dev,
kscan_callback_t callback )

#include <zephyr/drivers/kscan.h>

Configure a Keyboard scan instance.

Deprecated
Deprecated
Parameters
devPointer to the device structure for the driver instance.
callbackcalled when keyboard devices reply to a keyboard event such as key pressed/released.
Return values
0If successful.
Negativeerrno code if failure.

◆ kscan_disable_callback()

int kscan_disable_callback ( const struct device * dev)

#include <zephyr/drivers/kscan.h>

Disables callback.

Deprecated
Parameters
devPointer to the device structure for the driver instance.
Return values
0If successful.
Negativeerrno code if failure.

◆ kscan_enable_callback()

int kscan_enable_callback ( const struct device * dev)

#include <zephyr/drivers/kscan.h>

Enables callback.

Deprecated
Parameters
devPointer to the device structure for the driver instance.
Return values
0If successful.
Negativeerrno code if failure.