No SD_CHECK_AND_RETRY with USE_USB_COMPOSITE (STM32F103 + SDIO) (#18108)

* disable SD_CHECK_AND_RETRY when USE_USB_COMPOSITE is enabled

* Update Sd2Card.cpp

* Disable SD_CHECK_AND_RETRY with USE_USB_COMPOSITE

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
Bob Kuhn 2020-05-26 00:44:12 -05:00 committed by GitHub
parent 38ccc769f7
commit 6c994002af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -20,3 +20,8 @@
* *
*/ */
#pragma once #pragma once
#if ENABLED(USE_USB_COMPOSITE)
//#warning "SD_CHECK_AND_RETRY isn't needed with USE_USB_COMPOSITE."
#undef SD_CHECK_AND_RETRY
#endif

View File

@ -575,7 +575,7 @@ bool Sd2Card::writeData(const uint8_t* src) {
// Send one block of data for write block or write multiple blocks // Send one block of data for write block or write multiple blocks
bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) { bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) {
uint16_t crc = const uint16_t crc =
#if ENABLED(SD_CHECK_AND_RETRY) #if ENABLED(SD_CHECK_AND_RETRY)
CRC_CCITT(src, 512) CRC_CCITT(src, 512)
#else #else