KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
func.h File Reference

Various useful functions. More...

#include <stdint.h>
#include <stdbool.h>
#include <string.h>

Go to the source code of this file.

Data Structures

union  b16_t
 
union  b32_t
 

Functions

static int firstBitPos (uint32_t value)
 
static bool streq (const char *one, char *other)
 Simple compares two strings for equality. More...
 
int clz (uint32_t val)
 Count the leading zero's. More...
 

Detailed Description

Various useful functions.

Definition in file func.h.

Function Documentation

int clz ( uint32_t  val)

Count the leading zero's.

Parameters
valInput integer
Returns
Number of leading zeros.

Definition at line 17 of file func.c.

static bool streq ( const char *  one,
char *  other 
)
inlinestatic

Simple compares two strings for equality.

Parameters
oneThe one string
otherThe other sting
Return values
trueThey equal
falseThey do not equal

Definition at line 58 of file func.h.