30 lines
492 B
C
30 lines
492 B
C
|
|
#ifndef __SD_H__
|
||
|
|
#define __SD_H__
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#include "stm32f4xx.h"
|
||
|
|
#include "ff.h"
|
||
|
|
|
||
|
|
#define SD_STS_NULL (0)
|
||
|
|
#define SD_STS_ERR_INIT (1)
|
||
|
|
#define SD_STS_ERR_MOUNT (2)
|
||
|
|
#define SD_STS_ERR_GETCWD (3)
|
||
|
|
#define SD_STS_ERR_OPENDIR (4)
|
||
|
|
#define SD_STS_OK (5)
|
||
|
|
|
||
|
|
#define FILE_NAME_LEN (13)
|
||
|
|
|
||
|
|
extern uint32_t system_tick_cnt;
|
||
|
|
|
||
|
|
uint8_t sd_detect(void);
|
||
|
|
void sd_loop(void);
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif /* __SD_H__ */
|