|
Zephyr Project API 4.3.0
A Scalable Open Source RTOS
|
Interfaces for PS/2 devices. More...
Files | |
| file | ps2.h |
| Main header file for PS/2 (Personal System/2) driver API. | |
Typedefs | |
| typedef void(* | ps2_callback_t) (const struct device *dev, uint8_t data) |
| PS/2 callback called when user types or click a mouse. | |
Functions | |
| int | ps2_config (const struct device *dev, ps2_callback_t callback_isr) |
| Configure a ps2 instance. | |
| int | ps2_write (const struct device *dev, uint8_t value) |
| Write to PS/2 device. | |
| int | ps2_read (const struct device *dev, uint8_t *value) |
| Read slave-to-host values from PS/2 device. | |
| int | ps2_enable_callback (const struct device *dev) |
| Enables callback. | |
| int | ps2_disable_callback (const struct device *dev) |
| Disables callback. | |
Interfaces for PS/2 devices.
Callers of this API are responsible for setting the typematic rate and decode keys using their desired scan code tables.
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
PS/2 callback called when user types or click a mouse.
| dev | Pointer to the device structure for the driver instance. |
| data | Data byte passed pack to the user. |
| int ps2_config | ( | const struct device * | dev, |
| ps2_callback_t | callback_isr ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
Configure a ps2 instance.
| 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. |
| 0 | If successful. |
| Negative | errno code if failure. |
| int ps2_disable_callback | ( | const struct device * | dev | ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
Disables callback.
| dev | Pointer to the device structure for the driver instance. |
| 0 | If successful. |
| Negative | errno code if failure. |
| int ps2_enable_callback | ( | const struct device * | dev | ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
Enables callback.
| dev | Pointer to the device structure for the driver instance. |
| 0 | If successful. |
| Negative | errno code if failure. |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
Read slave-to-host values from PS/2 device.
| dev | Pointer to the device structure for the driver instance. |
| value | Pointer used for reading the PS/2 device. |
| 0 | If successful. |
| Negative | errno code if failure. |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/ps2.h>
Write to PS/2 device.
| dev | Pointer to the device structure for the driver instance. |
| value | Data for the PS2 device. |
| 0 | If successful. |
| Negative | errno code if failure. |