Zephyr API Documentation 4.2.0
A Scalable Open Source RTOS
|
|
4.2.0 |
SENT Interface. More...
Data Structures | |
struct | sent_frame |
SENT frame structure. More... |
Macros | |
#define | SENT_MAX_DATA_NIBBLES 8 |
Maximum number of data nibbles. |
Typedefs | |
typedef void(* | sent_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. |
Enumerations | |
enum | sent_frame_type { SENT_SHORT_SERIAL_FRAME , SENT_ENHANCED_SERIAL_FRAME_4_BIT_ID , SENT_ENHANCED_SERIAL_FRAME_8_BIT_ID , SENT_FAST_FRAME } |
SENT frame type. More... |
Functions | |
int | sent_start_listening (const struct device *dev, uint8_t channel) |
Enable a specific channel to start receiving from the bus. | |
int | sent_stop_listening (const struct device *dev, uint8_t channel) |
Disable a specific channel to stop receiving from the bus. | |
int | sent_register_callback (const struct device *dev, uint8_t channel, struct sent_rx_callback_configs callback_configs) |
Add a callback function to handle messages received for a specific channel. |
Fast Message CRC Configuration Flags | |
#define | FAST_CRC_DISABLE 0 |
Disable CRC check for fast message. | |
#define | FAST_CRC_LEGACY_IMPLEMENTATION 1 |
Use legacy CRC algorithm for fast message. | |
#define | FAST_CRC_RECOMMENDED_IMPLEMENTATION 2 |
Use the recommended CRC algorithm for fast message. | |
#define | FAST_CRC_STATUS_INCLUDE 4 |
Include CRC status in fast message. |
Short Serial Message CRC Configuration Flags | |
#define | SHORT_CRC_LEGACY_IMPLEMENTATION 0 |
Legacy CRC algorithm for short serial message. | |
#define | SHORT_CRC_RECOMMENDED_IMPLEMENTATION 1 |
Recommended CRC algorithm for short serial message. |
SENT Interface.
#define FAST_CRC_DISABLE 0 |
#include <zephyr/dt-bindings/sent/sent.h>
Disable CRC check for fast message.
#define FAST_CRC_LEGACY_IMPLEMENTATION 1 |
#include <zephyr/dt-bindings/sent/sent.h>
Use legacy CRC algorithm for fast message.
#define FAST_CRC_RECOMMENDED_IMPLEMENTATION 2 |
#include <zephyr/dt-bindings/sent/sent.h>
Use the recommended CRC algorithm for fast message.
#define FAST_CRC_STATUS_INCLUDE 4 |
#include <zephyr/dt-bindings/sent/sent.h>
Include CRC status in fast message.
#define SENT_MAX_DATA_NIBBLES 8 |
#include <zephyr/drivers/sent/sent.h>
Maximum number of data nibbles.
#define SHORT_CRC_LEGACY_IMPLEMENTATION 0 |
#include <zephyr/dt-bindings/sent/sent.h>
Legacy CRC algorithm for short serial message.
#define SHORT_CRC_RECOMMENDED_IMPLEMENTATION 1 |
#include <zephyr/dt-bindings/sent/sent.h>
Recommended CRC algorithm for short serial message.
typedef void(* sent_rx_frame_callback_t) (const struct device *dev, uint8_t channel, uint32_t num_frame, void *user_data) |
#include <zephyr/drivers/sent/sent.h>
Defines the application callback handler function signature for receiving frame.
dev | Pointer to the device structure for the driver instance. |
channel | The hardware channel of the driver instance. |
num_frame | Number of received frame. |
user_data | User data provided when receiving frame. |
enum sent_frame_type |
#include <zephyr/drivers/sent/sent.h>
SENT frame type.
int sent_register_callback | ( | const struct device * | dev, |
uint8_t | channel, | ||
struct sent_rx_callback_configs | callback_configs ) |
#include <zephyr/drivers/sent/sent.h>
Add a callback function to handle messages received for a specific channel.
dev | Pointer to the device structure for the driver instance. |
channel | The hardware channel of the driver instance. |
callback_configs | The callback configurations. |
0 | successful. |
-EINVAL | invalid channel. |
#include <zephyr/drivers/sent/sent.h>
Enable a specific channel to start receiving from the bus.
dev | Pointer to the device structure for the driver instance. |
channel | The hardware channel of the driver instance. |
0 | successful. |
-EINVAL | invalid channel is given. |
-EALREADY | device is already started. |
-EIO | general input/output error, failed to start device. |
#include <zephyr/drivers/sent/sent.h>
Disable a specific channel to stop receiving from the bus.
dev | Pointer to the device structure for the driver instance. |
channel | The hardware channel of the driver instance. |
0 | successful. |
-EINVAL | invalid channel. |
-EALREADY | device is already stopped. |
-EIO | general input/output error, failed to stop device. |