Loading...
Searching...
No Matches
cb_mux.h File Reference

cb_mux interface definitions More...

Detailed Description

cb_mux interface definitions

Author
Matthew Blue matth.nosp@m.ew.b.nosp@m.lue.n.nosp@m.euro.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition in file cb_mux.h.

#include <stdint.h>
#include "periph_cpu.h"
+ Include dependency graph for cb_mux.h:

Go to the source code of this file.

Data Structures

struct  cb_mux
 cb_mux list entry structure More...
 

Typedefs

typedef unsigned int cb_mux_cbid_t
 cb_mux identifier type
 
typedef void(* cb_mux_cb_t) (void *)
 cb_mux callback type
 
typedef struct cb_mux cb_mux_t
 cb_mux list entry structure
 
typedef void(* cb_mux_iter_t) (cb_mux_t *, void *)
 cb_mux iterate function callback type for cb_mux_iter
 

Functions

void cb_mux_add (cb_mux_t **head, cb_mux_t *entry)
 Add a new entry to the end of a cb_mux list.
 
void cb_mux_del (cb_mux_t **head, cb_mux_t *entry)
 Remove a entry from a cb_mux list.
 
cb_mux_tcb_mux_find_cbid (cb_mux_t *head, cb_mux_cbid_t cbid_val)
 Find an entry in the list by ID.
 
cb_mux_tcb_mux_find_low (cb_mux_t *head)
 Find the entry with the lowest ID.
 
cb_mux_tcb_mux_find_high (cb_mux_t *head)
 Find the entry with the highest ID.
 
cb_mux_cbid_t cb_mux_find_free_id (cb_mux_t *head)
 Find the lowest unused ID.
 
void cb_mux_iter (cb_mux_t *head, cb_mux_iter_t func, void *arg)
 Run a function on every item in the cb_mux list.