![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
things are working
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of CDMS_DEC_2016_jan by
cdms_sd.h
- Committer:
- cholletisaik777
- Date:
- 2016-01-23
- Revision:
- 4:560716ec8414
- Parent:
- 1:ad3b8a8032e2
File content as of revision 4:560716ec8414:
#include "mbed.h" #include "mbed_debug.h" #define SD_COMMAND_TIMEOUT 5000 #define SD_DBG 0 #define R1_IDLE_STATE (1 << 0) #define R1_ERASE_RESET (1 << 1) #define R1_ILLEGAL_COMMAND (1 << 2) #define R1_COM_CRC_ERROR (1 << 3) #define R1_ERASE_SEQUENCE_ERROR (1 << 4) #define R1_ADDRESS_ERROR (1 << 5) #define R1_PARAMETER_ERROR (1 << 6) #define SD_MAX_CYCLES 10000 extern uint8_t SD_INIT_FLAGS; int initialise_card(); int initialise_card_v1(); int initialise_card_v2(); int disk_write(const uint8_t *, uint64_t); int disk_read(uint8_t *, uint64_t); int disk_initialize(); int disk_erase(int,int); //void FCTN_CDMS_INIT_SD(); //int FCTN_CDMS_WR_SD(const uint8_t *, uint64_t); //int FCTN_CDMS_RD_SD(uint8_t *, uint64_t); uint32_t FCTN_SD_MNGR(uint8_t); int cmd(int, int); int cmd58(); int cmdx(int, int); int cmd8(); int read(uint8_t*, uint32_t ); int write(const uint8_t*, uint32_t ); static uint32_t ext_bits(unsigned char *, int , int ); int SD_WRITE(uint8_t*,uint32_t,uint8_t); void FCTN_CDMS_SD_INIT(); int SD_READ(uint8_t*,uint32_t,uint8_t); #define SDCARD_FAIL 0 #define SDCARD_V1 1 #define SDCARD_V2 2 #define SDCARD_V2HC 3