CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
lfs_util.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <inttypes.h>
Include dependency graph for lfs_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LFS_NO_MALLOC   1
 
#define LFS_NO_DEBUG   1
 
#define LFS_NO_WARN   1
 
#define LFS_NO_ERROR   1
 
#define LFS_NO_ASSERT   1
 
#define LFS_STRINGIZE(x)
 
#define LFS_STRINGIZE2(x)
 
#define LFS_TRACE(...)
 
#define LFS_DEBUG(...)
 
#define LFS_WARN(...)
 
#define LFS_ERROR(...)
 
#define LFS_ASSERT(test)
 

Functions

static uint32_t lfs_max (uint32_t a, uint32_t b)
 
static uint32_t lfs_min (uint32_t a, uint32_t b)
 
static uint32_t lfs_aligndown (uint32_t a, uint32_t alignment)
 
static uint32_t lfs_alignup (uint32_t a, uint32_t alignment)
 
static uint32_t lfs_npw2 (uint32_t a)
 
static uint32_t lfs_ctz (uint32_t a)
 
static uint32_t lfs_popc (uint32_t a)
 
static int lfs_scmp (uint32_t a, uint32_t b)
 
static uint32_t lfs_fromle32 (uint32_t a)
 
static uint32_t lfs_tole32 (uint32_t a)
 
static uint32_t lfs_frombe32 (uint32_t a)
 
static uint32_t lfs_tobe32 (uint32_t a)
 
uint32_t lfs_crc (uint32_t crc, const void *buffer, size_t size)
 
static void * lfs_malloc (size_t size)
 
static void lfs_free (void *p)
 

Macro Definition Documentation

◆ LFS_ASSERT

#define LFS_ASSERT ( test)

◆ LFS_DEBUG

#define LFS_DEBUG ( ...)

◆ LFS_ERROR

#define LFS_ERROR ( ...)

◆ LFS_NO_ASSERT

#define LFS_NO_ASSERT   1

◆ LFS_NO_DEBUG

#define LFS_NO_DEBUG   1

◆ LFS_NO_ERROR

#define LFS_NO_ERROR   1

◆ LFS_NO_MALLOC

#define LFS_NO_MALLOC   1

◆ LFS_NO_WARN

#define LFS_NO_WARN   1

◆ LFS_STRINGIZE

#define LFS_STRINGIZE ( x)
Value:
#define LFS_STRINGIZE2(x)
Definition lfs_util.h:24

◆ LFS_STRINGIZE2

#define LFS_STRINGIZE2 ( x)
Value:
#x

◆ LFS_TRACE

#define LFS_TRACE ( ...)

◆ LFS_WARN

#define LFS_WARN ( ...)

Function Documentation

◆ lfs_aligndown()

static uint32_t lfs_aligndown ( uint32_t a,
uint32_t alignment )
inlinestatic
Here is the caller graph for this function:

◆ lfs_alignup()

static uint32_t lfs_alignup ( uint32_t a,
uint32_t alignment )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lfs_crc()

uint32_t lfs_crc ( uint32_t crc,
const void * buffer,
size_t size )
Here is the caller graph for this function:

◆ lfs_ctz()

static uint32_t lfs_ctz ( uint32_t a)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lfs_free()

static void lfs_free ( void * p)
inlinestatic
Here is the caller graph for this function:

◆ lfs_frombe32()

static uint32_t lfs_frombe32 ( uint32_t a)
inlinestatic
Here is the caller graph for this function:

◆ lfs_fromle32()

static uint32_t lfs_fromle32 ( uint32_t a)
inlinestatic
Here is the caller graph for this function:

◆ lfs_malloc()

static void * lfs_malloc ( size_t size)
inlinestatic
Here is the caller graph for this function:

◆ lfs_max()

static uint32_t lfs_max ( uint32_t a,
uint32_t b )
inlinestatic
Here is the caller graph for this function:

◆ lfs_min()

static uint32_t lfs_min ( uint32_t a,
uint32_t b )
inlinestatic
Here is the caller graph for this function:

◆ lfs_npw2()

static uint32_t lfs_npw2 ( uint32_t a)
inlinestatic
Here is the caller graph for this function:

◆ lfs_popc()

static uint32_t lfs_popc ( uint32_t a)
inlinestatic
Here is the caller graph for this function:

◆ lfs_scmp()

static int lfs_scmp ( uint32_t a,
uint32_t b )
inlinestatic
Here is the caller graph for this function:

◆ lfs_tobe32()

static uint32_t lfs_tobe32 ( uint32_t a)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lfs_tole32()

static uint32_t lfs_tole32 ( uint32_t a)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function: