65#include "openthread/instance.h"
73#define OPENTHREAD_NUMBER_OF_SERIAL_BUFFER (1U)
75#define OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF (4U)
77#define OPENTHREAD_SERIAL_BUFFER_SIZE OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF + 100
79#define OPENTHREAD_SERIAL_BUFFER__PAYLOAD_SIZE OPENTHREAD_SERIAL_BUFFER_SIZE - OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF
81#define OPENTHREAD_ERROR_NO_EMPTY_SERIAL_BUFFER -1
83#define OPENTHREAD_SERIAL_BUFFER_STATUS_FREE (0x0001)
85#define OPENTHREAD_SERIAL_BUFFER_STATUS_READY_TO_PROCESS (0x0002)
87#define OPENTHREAD_SERIAL_BUFFER_STATUS_FULL (0x0004)
89#define IEEE802154_MAX_LENGTH (127U)
91#define OPENTHREAD_NETDEV_BUFLEN (IEEE802154_MAX_LENGTH)
Definitions low-level network driver interface.
Definitions for Ethernet.
netdev_event_t
Possible event types that are send from the device driver to the upper layer.
otInstance * openthread_get_instance(void)
Get pointer to the OpenThread instance.
void send_pkt(otInstance *aInstance, netdev_t *dev, netdev_event_t event)
Inform OpenThread when tx is finished.
void openthread_bootstrap(void)
Bootstrap OpenThread.
void ot_random_init(void)
Init OpenThread random.
event_queue_t * openthread_get_evq(void)
Get OpenThread event queue.
#define OPENTHREAD_SERIAL_BUFFER__PAYLOAD_SIZE
sizeof the spinel payload data
void openthread_radio_init(netdev_t *dev, uint8_t *tb, uint8_t *rb)
Init OpenThread radio.
int openthread_netdev_init(char *stack, int stacksize, char priority, const char *name, netdev_t *netdev)
Starts OpenThread thread.
void recv_pkt(otInstance *aInstance, netdev_t *dev)
Gets packet from driver and tells OpenThread about the reception.
Definition of global configuration options.
Structure to hold driver state.
Struct containing a serial message.
uint16_t serial_buffer_status
status of the buffer
uint16_t length
length of the message
IEEE 802.15.4 header definitions.