Skip to content

Commit

Permalink
Improved Teensy SDIO, new features, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
greiman committed Feb 25, 2021
1 parent cb5a7d2 commit 4582dd4
Show file tree
Hide file tree
Showing 45 changed files with 1,512 additions and 1,395 deletions.
30 changes: 15 additions & 15 deletions doc/SdErrorCodes.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
2019-12-10
2021-01-06

Run the SdErrorCode example to produce an updated list.

C
Code,Symbol - failed operation
0X00,SD_CARD_ERROR_NONE - No error
0X01,SD_CARD_ERROR_CMD0 - Card reset failed
Expand Down Expand Up @@ -35,16 +34,17 @@ Code,Symbol - failed operation
0X1C,SD_CARD_ERROR_READ_START - Bad readStart argument
0X1D,SD_CARD_ERROR_READ_TIMEOUT - Read data timeout
0X1E,SD_CARD_ERROR_STOP_TRAN - Multiple block stop failed
0X1F,SD_CARD_ERROR_WRITE_DATA - Write data not accepted
0X20,SD_CARD_ERROR_WRITE_FIFO - SDIO fifo write timeout
0X21,SD_CARD_ERROR_WRITE_START - Bad writeStart argument
0X22,SD_CARD_ERROR_WRITE_PROGRAMMING - Flash programming
0X23,SD_CARD_ERROR_WRITE_TIMEOUT - Write timeout
0X24,SD_CARD_ERROR_DMA - DMA transfer failed
0X25,SD_CARD_ERROR_ERASE - Card did not accept erase commands
0X26,SD_CARD_ERROR_ERASE_SINGLE_SECTOR - Card does not support erase
0X27,SD_CARD_ERROR_ERASE_TIMEOUT - Erase command timeout
0X28,SD_CARD_ERROR_INIT_NOT_CALLED - Card has not been initialized
0X29,SD_CARD_ERROR_INVALID_CARD_CONFIG - Invalid card config
0X2A,SD_CARD_ERROR_FUNCTION_NOT_SUPPORTED - Unsupported SDIO command
0X2B,SD_CARD_ERROR_UNKNOWN - Unknown error
0X1F,SD_CARD_ERROR_TRANSFER_COMPLETE - SDIO transfer complete
0X20,SD_CARD_ERROR_WRITE_DATA - Write data not accepted
0X21,SD_CARD_ERROR_WRITE_FIFO - SDIO fifo write timeout
0X22,SD_CARD_ERROR_WRITE_START - Bad writeStart argument
0X23,SD_CARD_ERROR_WRITE_PROGRAMMING - Flash programming
0X24,SD_CARD_ERROR_WRITE_TIMEOUT - Write timeout
0X25,SD_CARD_ERROR_DMA - DMA transfer failed
0X26,SD_CARD_ERROR_ERASE - Card did not accept erase commands
0X27,SD_CARD_ERROR_ERASE_SINGLE_SECTOR - Card does not support erase
0X28,SD_CARD_ERROR_ERASE_TIMEOUT - Erase command timeout
0X29,SD_CARD_ERROR_INIT_NOT_CALLED - Card has not been initialized
0X2A,SD_CARD_ERROR_INVALID_CARD_CONFIG - Invalid card config
0X2B,SD_CARD_ERROR_FUNCTION_NOT_SUPPORTED - Unsupported SDIO command
0X2C,SD_CARD_ERROR_UNKNOWN - Unknown error
4 changes: 4 additions & 0 deletions doc/ZipMsg/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h3>Replace the content of the html folder by unzipping html.zip.</h3>
<h3>I have zipped the documentation since Doxygen changes every file each time it runs.</h3>
<h3>This makes viewing changes on GitHub difficult.</h3>
<p>&nbsp;</p>
Binary file modified doc/html.zip
Binary file not shown.
839 changes: 4 additions & 835 deletions doc/html/index.html

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions doc/html/index_files/colorschememapping.xml

This file was deleted.

6 changes: 0 additions & 6 deletions doc/html/index_files/filelist.xml

This file was deleted.

Binary file removed doc/html/index_files/themedata.thmx
Binary file not shown.
85 changes: 0 additions & 85 deletions examples/ExFatFormatter/ExFatFormatter.ino

This file was deleted.

5 changes: 5 additions & 0 deletions examples/STM32Test/STM32Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ FsFile file1;
// Use mySPI2 since SPI2 is used in SPI.h as a different type.
static SPIClass mySPI2(2);
// Chip select PB21, dedicated SPI, 18 MHz, port 2.
#if ENABLE_DEDICATED_SPI
#define SD2_CONFIG SdSpiConfig(PB12, DEDICATED_SPI, SD_SCK_MHZ(18), &mySPI2)
#else // ENABLE_DEDICATED_SPI
#define SD2_CONFIG SdSpiConfig(PB12, SHARED_SPI, SD_SCK_MHZ(18), &mySPI2)
#endif // ENABLE_DEDICATED_SPI

SdFs sd2;
FsFile file2;

Expand Down
4 changes: 4 additions & 0 deletions examples/SoftwareSpi/SoftwareSpi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const uint8_t SOFT_SCK_PIN = 13;
// SdFat software SPI template
SoftSpiDriver<SOFT_MISO_PIN, SOFT_MOSI_PIN, SOFT_SCK_PIN> softSpi;
// Speed argument is ignored for software SPI.
#if ENABLE_DEDICATED_SPI
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, DEDICATED_SPI, SD_SCK_MHZ(0), &softSpi)
#else // ENABLE_DEDICATED_SPI
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, SHARED_SPI, SD_SCK_MHZ(0), &softSpi)
#endif // ENABLE_DEDICATED_SPI

#if SD_FAT_TYPE == 0
SdFat sd;
Expand Down
Loading

0 comments on commit 4582dd4

Please sign in to comment.