PS/2 Driver APIs .
More...
PS/2 Driver APIs .
◆ ps2_callback_t
typedef void(* ps2_callback_t) (const struct device *dev, uint8_t data) |
#include <zephyr/drivers/ps2.h>
PS/2 callback called when user types or click a mouse.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
data | Data byte passed pack to the user. |
◆ ps2_config()
#include <zephyr/drivers/ps2.h>
Configure a ps2 instance.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
callback_isr | called when PS/2 devices reply to a configuration command or when a mouse/keyboard send data to the client application. |
- Return values
-
0 | If successful. |
Negative | errno code if failure. |
◆ ps2_disable_callback()
int ps2_disable_callback |
( |
const struct device * | dev | ) |
|
#include <zephyr/drivers/ps2.h>
Disables callback.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
- Return values
-
0 | If successful. |
Negative | errno code if failure. |
◆ ps2_enable_callback()
int ps2_enable_callback |
( |
const struct device * | dev | ) |
|
#include <zephyr/drivers/ps2.h>
Enables callback.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
- Return values
-
0 | If successful. |
Negative | errno code if failure. |
◆ ps2_read()
#include <zephyr/drivers/ps2.h>
Read slave-to-host values from PS/2 device.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
value | Pointer used for reading the PS/2 device. |
- Return values
-
0 | If successful. |
Negative | errno code if failure. |
◆ ps2_write()
#include <zephyr/drivers/ps2.h>
Write to PS/2 device.
- Parameters
-
dev | Pointer to the device structure for the driver instance. |
value | Data for the PS2 device. |
- Return values
-
0 | If successful. |
Negative | errno code if failure. |