Changeset 359 for asp3_tinet_ecnl_arm/trunk/ntshell/fatfs/sdfs.h
- Timestamp:
- Jun 20, 2018, 7:59:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/ntshell/fatfs/sdfs.h
r352 r359 34 34 #endif 35 35 36 /* MMC card type flags (MMC_GET_TYPE) */ 37 #define CT_FAIL 0x00 38 #define CT_MMC 0x01 /* MMC ver 3 */ 39 #define CT_SD1 0x02 /* SD ver 1 */ 40 #define CT_SD2 0x04 /* SD ver 2 */ 41 #define CT_SDC (CT_SD1|CT_SD2) /* SD */ 42 #define CT_BLOCK 0x08 /* Block addressing */ 43 36 44 /** Access the filesystem on an SD Card using SPI 37 45 * … … 51 59 typedef struct sdfs_s{ 52 60 const char* name; 61 volatile uint8_t _is_initialized; 62 uint8_t _card_type; 63 uint8_t _csd[16], _cid[16]; 64 uint64_t _capacity; 65 uint64_t _block_len; 53 66 uint64_t _sectors; 54 67 spi_t _spi; … … 57 70 uint32_t _init_sck; 58 71 uint32_t _transfer_sck; 59 int _is_initialized;60 72 } sdfs_t; 61 73 … … 76 88 int sdfs_sync(sdfs_t *obj); 77 89 uint64_t sdfs_sectors(sdfs_t *obj); 90 int sdfs_trim(sdfs_t *obj, uint32_t st, uint32_t ed); 91 int sdfs_get_ocr(sdfs_t *obj, uint8_t buff[4]); 92 int sdfs_get_sdstat(sdfs_t *obj, uint8_t buff[64]); 78 93 79 94 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.