Go to the documentation of this file.
36 #include "openthread/instance.h"
44 #define OPENTHREAD_NUMBER_OF_SERIAL_BUFFER (1U)
46 #define OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF (4U)
48 #define OPENTHREAD_SERIAL_BUFFER_SIZE OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF + 100
50 #define OPENTHREAD_SERIAL_BUFFER__PAYLOAD_SIZE OPENTHREAD_SERIAL_BUFFER_SIZE - OPENTHREAD_SIZEOF_LENGTH_AND_FREEBUFF
52 #define OPENTHREAD_ERROR_NO_EMPTY_SERIAL_BUFFER -1
54 #define OPENTHREAD_SERIAL_BUFFER_STATUS_FREE (0x0001)
56 #define OPENTHREAD_SERIAL_BUFFER_STATUS_READY_TO_PROCESS (0x0002)
58 #define OPENTHREAD_SERIAL_BUFFER_STATUS_FULL (0x0004)
60 #define IEEE802154_MAX_LENGTH (127U)
62 #define OPENTHREAD_NETDEV_BUFLEN (IEEE802154_MAX_LENGTH)
167 uint8_t
ot_exec_command(otInstance *ot_instance,
const char* command,
void *arg,
void* answer);
void ot_random_init(void)
Init OpenThread random.
int16_t kernel_pid_t
Unique process identifier.
IEEE 802.15.4 header definitions.
void * arg
arg for the job
const char * command
A pointer to the job name string.
Struct containing an OpenThread job.
netdev_event_t
Possible event types that are send from the device driver to the upper layer.
Definition of global configuration options.
uint8_t ot_exec_command(otInstance *ot_instance, const char *command, void *arg, void *answer)
Execute OpenThread command.
event_queue_t * openthread_get_evq(void)
Get OpenThread event queue.
kernel_pid_t openthread_get_pid(void)
get PID of OpenThread thread.
Definitions for Ethernet.
void openthread_radio_init(netdev_t *dev, uint8_t *tb, uint8_t *rb)
Init OpenThread radio.
uint16_t length
length of the message
void openthread_bootstrap(void)
Bootstrap OpenThread.
Struct containing a serial message.
Definitions low-level network driver interface.
void recv_pkt(otInstance *aInstance, netdev_t *dev)
Gets packet from driver and tells OpenThread about the reception.
#define OPENTHREAD_SERIAL_BUFFER__PAYLOAD_SIZE
sizeof the spinel payload data
void send_pkt(otInstance *aInstance, netdev_t *dev, netdev_event_t event)
Inform OpenThread when tx is finished.
Structure to hold driver state.
event_t ev
Event associated to the OpenThread job.
int openthread_netdev_init(char *stack, int stacksize, char priority, const char *name, netdev_t *netdev)
Starts OpenThread thread.
int status
Status of the job.
uint16_t serial_buffer_status
status of the buffer
uint8_t ot_call_command(char *command, void *arg, void *answer)
Call OpenThread command in same thread as OT core (due to concurrency).
otInstance * openthread_get_instance(void)
Get pointer to the OpenThread instance.
void * answer
answer from the job