#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <inttypes.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
Go to the source code of this file.
|
| #define | LFS_TRACE(...) |
| |
| #define | LFS_DEBUG_(fmt, ...) printf("%s:%d:debug: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
| |
| #define | LFS_DEBUG(...) LFS_DEBUG_(__VA_ARGS__, "") |
| |
| #define | LFS_WARN_(fmt, ...) printf("%s:%d:warn: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
| |
| #define | LFS_WARN(...) LFS_WARN_(__VA_ARGS__, "") |
| |
| #define | LFS_ERROR_(fmt, ...) printf("%s:%d:error: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
| |
| #define | LFS_ERROR(...) LFS_ERROR_(__VA_ARGS__, "") |
| |
| #define | LFS_ASSERT(test) assert(test) |
| |
◆ LFS_ASSERT
| #define LFS_ASSERT |
( |
|
test | ) |
assert(test) |
◆ LFS_DEBUG
| #define LFS_DEBUG |
( |
|
... | ) |
LFS_DEBUG_(__VA_ARGS__, "") |
◆ LFS_DEBUG_
| #define LFS_DEBUG_ |
( |
|
fmt, |
|
|
|
... |
|
) |
| printf("%s:%d:debug: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
◆ LFS_ERROR
| #define LFS_ERROR |
( |
|
... | ) |
LFS_ERROR_(__VA_ARGS__, "") |
◆ LFS_ERROR_
| #define LFS_ERROR_ |
( |
|
fmt, |
|
|
|
... |
|
) |
| printf("%s:%d:error: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
◆ LFS_TRACE
◆ LFS_WARN
| #define LFS_WARN |
( |
|
... | ) |
LFS_WARN_(__VA_ARGS__, "") |
◆ LFS_WARN_
| #define LFS_WARN_ |
( |
|
fmt, |
|
|
|
... |
|
) |
| printf("%s:%d:warn: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__) |
◆ lfs_aligndown()
| static uint32_t lfs_aligndown |
( |
uint32_t |
a, |
|
|
uint32_t |
alignment |
|
) |
| |
|
inlinestatic |
◆ lfs_alignup()
| static uint32_t lfs_alignup |
( |
uint32_t |
a, |
|
|
uint32_t |
alignment |
|
) |
| |
|
inlinestatic |
◆ lfs_crc()
| uint32_t lfs_crc |
( |
uint32_t |
crc, |
|
|
const void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
◆ lfs_ctz()
| static uint32_t lfs_ctz |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_free()
| static void lfs_free |
( |
void * |
p | ) |
|
|
inlinestatic |
◆ lfs_frombe32()
| static uint32_t lfs_frombe32 |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_fromle32()
| static uint32_t lfs_fromle32 |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_malloc()
| static void* lfs_malloc |
( |
size_t |
size | ) |
|
|
inlinestatic |
◆ lfs_max()
| static uint32_t lfs_max |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
◆ lfs_min()
| static uint32_t lfs_min |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
◆ lfs_npw2()
| static uint32_t lfs_npw2 |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_popc()
| static uint32_t lfs_popc |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_scmp()
| static int lfs_scmp |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
◆ lfs_tobe32()
| static uint32_t lfs_tobe32 |
( |
uint32_t |
a | ) |
|
|
inlinestatic |
◆ lfs_tole32()
| static uint32_t lfs_tole32 |
( |
uint32_t |
a | ) |
|
|
inlinestatic |