|
61 | 61 | #define USB_NO_TEST_UNIT_READY // Required for removable media adapter
|
62 | 62 | #define USB_HOST_MANUAL_POLL // Optimization to shut off IRQ automatically
|
63 | 63 |
|
64 |
| - // Workarounds for keeping Marlin's watchdog timer from barking... |
65 |
| - void marlin_yield() { |
66 |
| - thermalManager.manage_heater(); |
67 |
| - } |
| 64 | + // Workarounds to keep Marlin's watchdog timer from barking... |
| 65 | + void marlin_yield() { thermalManager.manage_heater(); } |
68 | 66 | #define SYSTEM_OR_SPECIAL_YIELD(...) marlin_yield();
|
69 | 67 | #define delay(x) safe_delay(x)
|
70 | 68 |
|
|
82 | 80 |
|
83 | 81 | #define UHS_START (usb.Init() == 0)
|
84 | 82 | #define UHS_STATE(state) UHS_USB_HOST_STATE_##state
|
| 83 | + |
85 | 84 | #elif ENABLED(USE_OTG_USB_HOST)
|
86 | 85 |
|
87 | 86 | #if HAS_SD_HOST_DRIVE
|
|
93 | 92 | #define UHS_START usb.start()
|
94 | 93 | #define rREVISION 0
|
95 | 94 | #define UHS_STATE(state) USB_STATE_##state
|
| 95 | + |
96 | 96 | #else
|
| 97 | + |
97 | 98 | #include "lib-uhs2/Usb.h"
|
98 | 99 | #include "lib-uhs2/masstorage.h"
|
99 | 100 |
|
|
102 | 103 |
|
103 | 104 | #define UHS_START usb.start()
|
104 | 105 | #define UHS_STATE(state) USB_STATE_##state
|
| 106 | + |
105 | 107 | #endif
|
106 | 108 |
|
107 | 109 | #include "Sd2Card_FlashDrive.h"
|
@@ -271,11 +273,11 @@ bool DiskIODriver_USBFlash::init(const uint8_t, const pin_t) {
|
271 | 273 | if (!isInserted()) return false;
|
272 | 274 |
|
273 | 275 | #if USB_DEBUG >= 1
|
274 |
| - const uint32_t sectorSize = bulk.GetSectorSize(0); |
275 |
| - if (sectorSize != 512) { |
276 |
| - SERIAL_ECHOLNPGM("Expecting sector size of 512. Got: ", sectorSize); |
277 |
| - return false; |
278 |
| - } |
| 276 | + const uint32_t sectorSize = bulk.GetSectorSize(0); |
| 277 | + if (sectorSize != 512) { |
| 278 | + SERIAL_ECHOLNPGM("Expecting sector size of 512. Got: ", sectorSize); |
| 279 | + return false; |
| 280 | + } |
279 | 281 | #endif
|
280 | 282 |
|
281 | 283 | #if USB_DEBUG >= 3
|
|
0 commit comments