Changeset 1052 for trunk/modules/sdmmc/caba/source/include
- Timestamp:
- Jun 21, 2017, 10:50:42 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/sdmmc/caba/source/include/sdmmc.h
r574 r1052 55 55 56 56 // Registers 57 int spi_fsm; // SPI state register58 int spi_shiftreg;// data shift in/out59 int spi_bitcount;60 int spi_clk;61 int spi_mosi_previous; // sampled MOSI value57 int spi_fsm; // SPI state register 58 int spi_shiftreg; // data shift in/out 59 int spi_bitcount; 60 int spi_clk; 61 int spi_mosi_previous; // sampled MOSI value 62 62 63 uint8_t command;63 uint8_t command; 64 64 uint32_t args; 65 uint8_t cmdcrc; 65 uint8_t cmdcrc; 66 66 67 int m_fd; // File descriptor 67 68 uint64_t m_device_size; // Total number of blocks 68 69 const uint32_t m_latency; // device latency 69 70 70 uint8_t m_databuf[1 /* reponse */ + 1 /* data tocken */ + 512 /* data block */ + 2 /* CRC */ ]; 71 uint32_t m_datalen_snd; // data size to be sent to host 72 uint32_t m_datalen_rcv; // data size expected from host 71 uint8_t m_databuf[1 /* reponse */ + 72 1 /* data tocken */ + 73 512 /* data block */ + 74 2 /* CRC */ ]; 75 76 uint32_t m_datalen_snd; // data size to be sent to host 77 uint32_t m_datalen_rcv; // data size expected from host 73 78 uint32_t m_data_idx; 74 bool m_acmd;// next command will be acmd75 int m_sdstate;// sdcard internal state79 bool m_acmd; // next command will be acmd 80 int m_sdstate; // sdcard internal state 76 81 77 82 // sd states 78 enum { 79 SD_IDLE = 0, 80 SD_READY = 1, 83 enum 84 { 85 SD_IDLE = 0, 86 SD_READY = 1, 81 87 }; 82 88 … … 88 94 89 95 // Master FSM states 90 enum { 96 enum 97 { 91 98 S_IDLE = 0, 92 99 S_RECEIVE_CMD = 1,
Note: See TracChangeset
for help on using the changeset viewer.