FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Util_functions

Functions

static void _bitfield_mask_copy (uint32_t *bitfield, uint32_t mask)
 Copy mask to target variable. More...
 
static void _bitfield_mask_init (uint32_t *bitfield, int nbBits)
 Initial target mask according to number of bits. More...
 
static void _bitfield_clear (uint32_t *bitfield)
 Clean all mask bits of target. More...
 
static int _bitfield_get (uint32_t bitfield)
 Get the number of bit 1 of target. More...
 
static int _bitfield_alloc (uint32_t *bitfield)
 TODO. More...
 
static int _bitfield_reserve (uint32_t *bitfield, int id)
 Reserve a bit (set to 0) in target. More...
 
static void _bitfield_free (uint32_t *bitfield, int id)
 Free the mask (set to 1) according to event number. More...
 

Description

Function Documentation

static int _bitfield_alloc ( uint32_t *  bitfield)
inlinestatic
Parameters
bitfieldDestination

References _bitfield_get().

static void _bitfield_clear ( uint32_t *  bitfield)
inlinestatic
Parameters
bitfieldDestination
static void _bitfield_free ( uint32_t *  bitfield,
int  id 
)
inlinestatic
Parameters
bitfieldDestination
idevent number
static int _bitfield_get ( uint32_t  bitfield)
inlinestatic
Parameters
bitfieldDestination

Referenced by _bitfield_alloc().

static void _bitfield_mask_copy ( uint32_t *  bitfield,
uint32_t  mask 
)
inlinestatic
Parameters
bitfieldDestination
maskSource
static void _bitfield_mask_init ( uint32_t *  bitfield,
int  nbBits 
)
inlinestatic
Parameters
bitfieldDestination
nbBitsNumber of bits
static int _bitfield_reserve ( uint32_t *  bitfield,
int  id 
)
inlinestatic

If this bit mask is already allocated to a event, return error.

Parameters
bitfieldDestination
idevent number