13#ifndef ZEPHYR_INCLUDE_DRIVERS_PS2_H_
14#define ZEPHYR_INCLUDE_DRIVERS_PS2_H_
111static inline int z_impl_ps2_config(
const struct device *dev,
128static inline int z_impl_ps2_write(
const struct device *dev,
uint8_t value)
143static inline int z_impl_ps2_read(
const struct device *dev,
uint8_t *value)
157static inline int z_impl_ps2_enable_callback(
const struct device *dev)
177static inline int z_impl_ps2_disable_callback(
const struct device *dev)
196#include <zephyr/syscalls/ps2.h>
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1425
int(* ps2_read_t)(const struct device *dev, uint8_t *value)
Callback API for reading from a PS/2 device.
Definition ps2.h:61
int(* ps2_config_t)(const struct device *dev, ps2_callback_t callback_isr)
Callback API for configuring a PS/2 device.
Definition ps2.h:54
int(* ps2_disable_callback_t)(const struct device *dev)
Callback API for disabling a PS/2 device callback.
Definition ps2.h:72
int(* ps2_enable_callback_t)(const struct device *dev)
Callback API for enabling a PS/2 device callback.
Definition ps2.h:78
int(* ps2_write_t)(const struct device *dev, uint8_t value)
Callback API for writing to a PS/2 device.
Definition ps2.h:67
int ps2_config(const struct device *dev, ps2_callback_t callback_isr)
Configure a PS/2 device instance.
int ps2_enable_callback(const struct device *dev)
Enables callback.
int ps2_read(const struct device *dev, uint8_t *value)
Read slave-to-host values from PS/2 device.
void(* ps2_callback_t)(const struct device *dev, uint8_t data)
PS/2 callback called when user types or click a mouse.
Definition ps2.h:42
int ps2_disable_callback(const struct device *dev)
Disables callback.
int ps2_write(const struct device *dev, uint8_t value)
Write to a PS/2 device.
#define ENOSYS
Function not implemented.
Definition errno.h:82
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
void * data
Address of the device instance private data.
Definition device.h:523
<span class="mlabel">Driver Operations</span> PS/2 driver operations
Definition ps2.h:83
ps2_disable_callback_t disable_callback
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition ps2.h:91
ps2_enable_callback_t enable_callback
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition ps2.h:93
ps2_config_t config
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ps2.h:85
ps2_read_t read
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ps2.h:87
ps2_write_t write
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition ps2.h:89