Zephyr API Documentation 4.2.0
A Scalable Open Source RTOS
 4.2.0
SENT Interface

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.

Detailed Description

SENT Interface.

Since
4.2
Version
0.1.0

Macro Definition Documentation

◆ FAST_CRC_DISABLE

#define FAST_CRC_DISABLE   0

#include <zephyr/dt-bindings/sent/sent.h>

Disable CRC check for fast message.

◆ FAST_CRC_LEGACY_IMPLEMENTATION

#define FAST_CRC_LEGACY_IMPLEMENTATION   1

#include <zephyr/dt-bindings/sent/sent.h>

Use legacy CRC algorithm for fast message.

◆ FAST_CRC_RECOMMENDED_IMPLEMENTATION

#define FAST_CRC_RECOMMENDED_IMPLEMENTATION   2

#include <zephyr/dt-bindings/sent/sent.h>

Use the recommended CRC algorithm for fast message.

◆ FAST_CRC_STATUS_INCLUDE

#define FAST_CRC_STATUS_INCLUDE   4

#include <zephyr/dt-bindings/sent/sent.h>

Include CRC status in fast message.

◆ SENT_MAX_DATA_NIBBLES

#define SENT_MAX_DATA_NIBBLES   8

#include <zephyr/drivers/sent/sent.h>

Maximum number of data nibbles.

◆ SHORT_CRC_LEGACY_IMPLEMENTATION

#define SHORT_CRC_LEGACY_IMPLEMENTATION   0

#include <zephyr/dt-bindings/sent/sent.h>

Legacy CRC algorithm for short serial message.

◆ SHORT_CRC_RECOMMENDED_IMPLEMENTATION

#define SHORT_CRC_RECOMMENDED_IMPLEMENTATION   1

#include <zephyr/dt-bindings/sent/sent.h>

Recommended CRC algorithm for short serial message.

Typedef Documentation

◆ sent_rx_frame_callback_t

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.

Parameters
devPointer to the device structure for the driver instance.
channelThe hardware channel of the driver instance.
num_frameNumber of received frame.
user_dataUser data provided when receiving frame.

Enumeration Type Documentation

◆ sent_frame_type

#include <zephyr/drivers/sent/sent.h>

SENT frame type.

Enumerator
SENT_SHORT_SERIAL_FRAME 

Short serial message frame.

SENT_ENHANCED_SERIAL_FRAME_4_BIT_ID 

Enhanced serial message frame with 4-bit message ID.

SENT_ENHANCED_SERIAL_FRAME_8_BIT_ID 

Enhanced serial message frame with 8-bit message ID.

SENT_FAST_FRAME 

Fast message frame.

Function Documentation

◆ sent_register_callback()

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.

Parameters
devPointer to the device structure for the driver instance.
channelThe hardware channel of the driver instance.
callback_configsThe callback configurations.
Return values
0successful.
-EINVALinvalid channel.

◆ sent_start_listening()

int sent_start_listening ( const struct device * dev,
uint8_t channel )

#include <zephyr/drivers/sent/sent.h>

Enable a specific channel to start receiving from the bus.

Parameters
devPointer to the device structure for the driver instance.
channelThe hardware channel of the driver instance.
Return values
0successful.
-EINVALinvalid channel is given.
-EALREADYdevice is already started.
-EIOgeneral input/output error, failed to start device.

◆ sent_stop_listening()

int sent_stop_listening ( const struct device * dev,
uint8_t channel )

#include <zephyr/drivers/sent/sent.h>

Disable a specific channel to stop receiving from the bus.

Parameters
devPointer to the device structure for the driver instance.
channelThe hardware channel of the driver instance.
Return values
0successful.
-EINVALinvalid channel.
-EALREADYdevice is already stopped.
-EIOgeneral input/output error, failed to stop device.