nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
sd_card.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef _SD_CARD_H_
8#define _SD_CARD_H_
9
10#include <stddef.h>
11#include <zephyr/fs/fs.h>
12
32int sd_card_list_files_match(uint16_t result_file_num_max, uint16_t result_file_len_max,
33 char result[][result_file_len_max], char *path,
34 char const *const pattern);
35
55int sd_card_list_files(char const *const path, char *buf, size_t *buf_size, bool extra_info);
56
74int sd_card_open_write_close(char const *const filename, char const *const data, size_t *size);
75
93int sd_card_open_read_close(char const *const filename, char *const buf, size_t *size);
94
110int sd_card_open(char const *const filename, struct fs_file_t *f_seg_read_entry);
111
130int sd_card_read(char *buf, size_t *size, struct fs_file_t *f_seg_read_entry);
131
145int sd_card_close(struct fs_file_t *f_seg_read_entry);
146
154int sd_card_init(void);
155
156#endif /* _SD_CARD_H_ */
int sd_card_list_files(char const *const path, char *buf, size_t *buf_size, bool extra_info)
Print out the contents under SD card root path and write the content to buffer.
int sd_card_open_read_close(char const *const filename, char *const buf, size_t *size)
Read data from file into the buffer.
int sd_card_close(struct fs_file_t *f_seg_read_entry)
Close the file opened by the sd_card_segment_read_open function.
int sd_card_read(char *buf, size_t *size, struct fs_file_t *f_seg_read_entry)
Read segment on the open file on the SD card.
int sd_card_open(char const *const filename, struct fs_file_t *f_seg_read_entry)
Open file on SD card.
int sd_card_list_files_match(uint16_t result_file_num_max, uint16_t result_file_len_max, char result[][result_file_len_max], char *path, char const *const pattern)
Finds all files on SD card that match the given pattern.
int sd_card_init(void)
Initialize the SD card interface and print out SD card details.
int sd_card_open_write_close(char const *const filename, char const *const data, size_t *size)
Write data from buffer into the file.