78#ifndef NET_NETDEV_TEST_H
79#define NET_NETDEV_TEST_H
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
void mutex_unlock(mutex_t *mutex)
Unlocks the mutex.
static void mutex_lock(mutex_t *mutex)
Locks a mutex, blocking.
netopt_t
Global list of configuration options available throughout the network stack, e.g.
@ NETOPT_NUMOF
maximum number of options defined here.
static void netdev_test_set_recv_cb(netdev_test_t *dev, netdev_test_recv_cb_t recv_cb)
override receive callback
void netdev_test_reset(netdev_test_t *dev)
Resets all callbacks for the device to NULL.
static void netdev_test_set_get_cb(netdev_test_t *dev, netopt_t opt, netdev_test_get_cb_t get_cb)
override get callback for a certain option type
int(* netdev_test_set_cb_t)(netdev_t *dev, const void *value, size_t value_len)
Callback type to handle set commands.
int(* netdev_test_recv_cb_t)(netdev_t *dev, char *buf, int len, void *info)
Callback type to handle receive command.
int(* netdev_test_send_cb_t)(netdev_t *dev, const iolist_t *iolist)
Callback type to handle send command.
static void netdev_test_set_init_cb(netdev_test_t *dev, netdev_test_init_cb_t init_cb)
override initialization callback
int(* netdev_test_init_cb_t)(netdev_t *dev)
Callback type to handle device initialization.
int(* netdev_test_get_cb_t)(netdev_t *dev, void *value, size_t max_len)
Callback type to handle get commands.
static void netdev_test_set_isr_cb(netdev_test_t *dev, netdev_test_isr_cb_t isr_cb)
override ISR event handler callback
void netdev_test_setup(netdev_test_t *dev, void *state)
Setup a given netdev dummy test driver device.
void(* netdev_test_isr_cb_t)(netdev_t *dev)
Callback type to handle user-space ISR events.
static void netdev_test_set_set_cb(netdev_test_t *dev, netopt_t opt, netdev_test_set_cb_t set_cb)
override get callback for a certain option type
static void netdev_test_set_send_cb(netdev_test_t *dev, netdev_test_send_cb_t send_cb)
override send callback
Mutex for thread synchronization.
iolist structure definition
Extended structure to hold IEEE 802.15.4 driver state.
Device descriptor for netdev dummy test driver devices.
netdev_ieee802154_t netdev
netdev fields
netdev_test_get_cb_t get_cbs[NETOPT_NUMOF]
callback to handle get command
mutex_t mutex
mutex for the device
netdev_test_send_cb_t send_cb
device specific fields
netdev_test_set_cb_t set_cbs[NETOPT_NUMOF]
callback to handle set command
netdev_test_isr_cb_t isr_cb
callback to handle ISR events
netdev_test_recv_cb_t recv_cb
callback to handle receive command
void * state
external state for the device
netdev_test_init_cb_t init_cb
callback to handle initialization events
Structure to hold driver state.