|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
ePacket interface driver API More...
#include <interface.h>
Data Fields | |
| void(* | send )(const struct device *dev, struct net_buf *buf) |
| Send a packet over the interface. | |
| void(* | decrypt_result )(const struct device *dev, struct net_buf *buf, int decrypt_result) |
| Callback for packet decryption result. | |
| int(* | receive_ctrl )(const struct device *dev, bool enable) |
| Control receiving on the interface. | |
| uint16_t(* | max_packet_size )(const struct device *dev) |
| Get current maximum packet size. | |
ePacket interface driver API
| void(* epacket_interface_api::decrypt_result) (const struct device *dev, struct net_buf *buf, int decrypt_result) |
Callback for packet decryption result.
Can be used for downlink tracking in backend drivers.
| dev | Interface device |
| buf | Packet buffer |
| decrypt_result | 0 if successfully decrypted, -2 on bad device key identifier, -1 otherwise |
| uint16_t(* epacket_interface_api::max_packet_size) (const struct device *dev) |
Get current maximum packet size.
If not defined, epacket_interface_common_config::max_packet_size is used
| dev | Interface device |
| int(* epacket_interface_api::receive_ctrl) (const struct device *dev, bool enable) |
Control receiving on the interface.
| dev | Interface device |
| enable | True to enable receiving, false to disable |
| 0 | on success |
| -errno | on failure |
| void(* epacket_interface_api::send) (const struct device *dev, struct net_buf *buf) |
Send a packet over the interface.
| dev | Interface device |
| buf | Packet to send |