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