Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
psi5.h File Reference

Peripheral Sensor Interface (PSI5) driver API. More...

#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/syscalls/psi5.h>

Go to the source code of this file.

Data Structures

struct  psi5_frame
 PSI5 frame structure. More...
struct  psi5_rx_callback_config
 Configuration structure for RX callback. More...
struct  psi5_rx_callback_configs
 Composite configuration structure for RX callback registration. More...
struct  psi5_driver_api
 @driver_ops{PSI5} More...

Typedefs

typedef void(* psi5_tx_callback_t) (const struct device *dev, uint8_t channel, int status, void *user_data)
 Defines the application callback handler function signature for sending.
typedef void(* psi5_rx_frame_callback_t) (const struct device *dev, uint8_t channel, uint32_t num_frame, void *user_data)
 Defines the application callback handler function signature for receiving frame.
typedef int(* psi5_start_sync_t) (const struct device *dev, uint8_t channel)
 @def_driverbackendgroup{PSI5,psi5_interface}
typedef int(* psi5_stop_sync_t) (const struct device *dev, uint8_t channel)
 Callback API upon stopping sync PSI5 See psi5_stop_sync() for argument description.
typedef int(* psi5_send_t) (const struct device *dev, uint8_t channel, const uint64_t data, k_timeout_t timeout, psi5_tx_callback_t callback, void *user_data)
 Callback API upon sending PSI5 frame See psi5_send() for argument description.
typedef int(* psi5_register_callback_t) (const struct device *dev, uint8_t channel, struct psi5_rx_callback_configs callback_configs)
 Callback API upon adding RX callback See psi5_register_callback() for argument description.

Enumerations

enum  psi5_frame_type { PSI5_SERIAL_FRAME_4_BIT_ID , PSI5_SERIAL_FRAME_8_BIT_ID , PSI5_DATA_FRAME }
 PSI5 frame type. More...

Functions

int psi5_start_sync (const struct device *dev, uint8_t channel)
 Start the sync pulse generator on a specific channel.
int psi5_stop_sync (const struct device *dev, uint8_t channel)
 Stop the sync pulse generator on a specific channel.
int psi5_send (const struct device *dev, uint8_t channel, const uint64_t data, k_timeout_t timeout, psi5_tx_callback_t callback, void *user_data)
 Transmitting PSI5 data on a specific channel.
int psi5_register_callback (const struct device *dev, uint8_t channel, struct psi5_rx_callback_configs callback_configs)
 Add a callback function to handle messages received for a specific channel.

Detailed Description

Peripheral Sensor Interface (PSI5) driver API.