-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsd.h
More file actions
41 lines (37 loc) · 1.44 KB
/
sd.h
File metadata and controls
41 lines (37 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
**************************************************************************
* @author Emin Yagmahan
* @date 07.02.2020
* @file ../include/Logging/sd.h
* @brief Allows to read and write from/to a SD Card. SD Card is connected
* via SPI at 315kHz Init Speed and 20MHz during operation.
* write and read tests are performed to calculate deviations in
* sd card performance.
* @version V 2.0
**************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __SD_H_
#define __SD_H_
/*-------------------------------------------------------------------------*
* Includes
*-------------------------------------------------------------------------*/
#include <fs/fs.h>
#include <ff.h>
#include <logging/log.h>
#include <stdio.h>
#include <zephyr.h>
#include <fs/fs.h>
/*-------------------------------------------------------------------------*
* Defines
*-------------------------------------------------------------------------*/
#define TEST_FILE_SIZE 1024
#define KILO 1000
/*-------------------------------------------------------------------------*
* Prototype Functions
*-------------------------------------------------------------------------*/
int lsdir(const char *path);
int test_write_speed(struct fs_file_t file);
int test_read_speed(struct fs_file_t file);
void sd_card_info(void);
#endif