Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
interface.h File Reference

ePacket Interface API More...

#include <zephyr/device.h>
#include <zephyr/net_buf.h>

Go to the source code of this file.

Data Structures

struct  epacket_interface_cb
 ePacket interface callback structure. More...
 
struct  epacket_interface_api
 
struct  epacket_interface_common_data
 Common data struct for all interfaces. More...
 
struct  epacket_interface_common_config
 Common config struct for all interfaces. More...
 

Macros

#define EPACKET_INTERFACE_MAX_PACKET(node_id)
 
#define EPACKET_INTERFACE_PACKET_OVERHEAD(node_id)
 
#define EPACKET_INTERFACE_PAYLOAD_FROM_PACKET(node_id, packet_size)
 
#define EPACKET_INTERFACE_MAX_PAYLOAD(node_id)
 
#define EPACKET_INTERFACE_IS_COMPILED_IN(node_id)
 Will this ePacket interface be compiled in?
 
#define GATEWAY_HANDLER_DEFINE(name, backhaul)
 Define a handler for a specific backhaul interface.
 

Typedefs

typedef void(* epacket_receive_handler) (struct net_buf *packet)
 Callback to run on received packet.
 

Enumerations

enum  epacket_interface_id {
  EPACKET_INTERFACE_SERIAL = 0 , EPACKET_INTERFACE_UDP = 1 , EPACKET_INTERFACE_BT_ADV = 2 , EPACKET_INTERFACE_BT_PERIPHERAL = 3 ,
  EPACKET_INTERFACE_BT_CENTRAL = 4 , EPACKET_INTERFACE_HCI = 10 , EPACKET_INTERFACE_DUMMY = 255
}
 

Functions

void epacket_queue (const struct device *dev, struct net_buf *buf)
 Queue an ePacket for sending over an interface.
 
int epacket_receive (const struct device *dev, k_timeout_t timeout)
 Enable receiving on the interface for a duration.
 
int epacket_send_key_ids (const struct device *dev, k_timeout_t timeout)
 Send a INFUSE_KEY_IDS packet on an interface.
 
static uint16_t epacket_interface_max_packet_size (const struct device *dev)
 Get current maximum packet size.
 
static void epacket_set_receive_handler (const struct device *dev, epacket_receive_handler handler)
 Set the ePacket receive handler for an interface.
 
static void epacket_register_callback (const struct device *dev, struct epacket_interface_cb *cb)
 Register to be notified of interface events.
 
static bool epacket_unregister_callback (const struct device *dev, struct epacket_interface_cb *cb)
 Unregister from interface events.
 
void epacket_default_receive_handler (struct net_buf *buf)
 Default ePacket receive handler.
 
void epacket_gateway_receive_handler (const struct device *backhaul, struct net_buf *buf)
 Default gateway receive handler.
 

Detailed Description

ePacket Interface API

Author
Jordan Yates jorda.nosp@m.n@em.nosp@m.beint.nosp@m..com

SPDX-License-Identifier: FSL-1.1-ALv2

API for the ePacket interfaces.