CTS-SAT-1-OBC-Firmware
Toggle main menu visibility
Loading...
Searching...
No Matches
firmware
Core
Inc
littlefs
littlefs_searching.h
Go to the documentation of this file.
1
#ifndef INCLUDE_GUARD__LITTLEFS_SEARCHING_H
2
#define INCLUDE_GUARD__LITTLEFS_SEARCHING_H
3
4
#include <stdint.h>
5
#include <stdlib.h>
6
#include "
littlefs/lfs.h
"
7
8
9
int32_t
LFS_search_count_occurrences
(
10
const
char
*filename,
11
const
uint8_t *needle,
12
size_t
needle_len
13
);
14
15
16
int32_t
LFS_search_find_nth_occurrence
(
17
const
char
*filename,
18
const
uint8_t *needle,
19
size_t
needle_len,
20
uint16_t n,
21
lfs_soff_t
*out_offset
22
);
23
24
#endif
// INCLUDE_GUARD__LITTLEFS_SEARCHING_H
lfs.h
lfs_soff_t
int32_t lfs_soff_t
Definition
lfs.h:43
LFS_search_find_nth_occurrence
int32_t LFS_search_find_nth_occurrence(const char *filename, const uint8_t *needle, size_t needle_len, uint16_t n, lfs_soff_t *out_offset)
Find the byte offset of the nth occurrence of a string/byte pattern in an LFS file.
Definition
littlefs_searching.c:75
LFS_search_count_occurrences
int32_t LFS_search_count_occurrences(const char *filename, const uint8_t *needle, size_t needle_len)
Count the number of occurrences of a string/byte pattern in an LFS file.
Definition
littlefs_searching.c:13
Generated by
1.17.0