Browse Source

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>
Bob Kuhn 5 years ago
parent
commit
6c994002af
No account linked to committer's email address
2 changed files with 6 additions and 1 deletions
  1. 5
    0
      Marlin/src/HAL/STM32F1/inc/Conditionals_LCD.h
  2. 1
    1
      Marlin/src/sd/Sd2Card.cpp

+ 5
- 0
Marlin/src/HAL/STM32F1/inc/Conditionals_LCD.h View File

20
  *
20
  *
21
  */
21
  */
22
 #pragma once
22
 #pragma once
23
+
24
+#if ENABLED(USE_USB_COMPOSITE)
25
+  //#warning "SD_CHECK_AND_RETRY isn't needed with USE_USB_COMPOSITE."
26
+  #undef SD_CHECK_AND_RETRY
27
+#endif

+ 1
- 1
Marlin/src/sd/Sd2Card.cpp View File

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

Loading…
Cancel
Save