Skip to content

Commit 8f6fa36

Browse files
SpeakasjasonsmiththinkyheadMoellerDiellensp
committed
Bugfix 2.0.x update (#1)
* TMCStepper 0.7.0 followup (MarlinFirmware#18388) * Improve U8G+SPI delay override (MarlinFirmware#18386) Co-authored-by: Scott Lahteine <github@thinkyhead.com> * Better STM32 Tone timer int priority (MarlinFirmware#18385) * Fix 3-point middle point (MarlinFirmware#18383) * Fix LPC176x RGB NEOPIXEL startup (MarlinFirmware#18380) * Fix ExtUI automatic font scaling (MarlinFirmware#18377) * [cron] Bump distribution date (2020-06-23) * No 'probing failed' with retry (MarlinFirmware#18379) * Add SERIAL_FLOAT_PRECISION option (MarlinFirmware#18367) * Move tests up one level * Use libraries from the registry * Graphical LCD note * Update LPC176x platform version (MarlinFirmware#18392) * Add maintenance actions * [cron] Bump distribution date (2020-06-24) * General cleanup * Run close-stale once per day * Board-based ST7920 delays * TFT_LITTLE_VGL_UI followup (MarlinFirmware#18410) * Display PID Autotune status (MarlinFirmware#18408) * [cron] Bump distribution date (2020-06-25) * Use Preheat 1 as M303 default (MarlinFirmware#18407) * Fix issues with no hotend / bed / fan (MarlinFirmware#18395) * Fix material preset type * NO_LCD_REINIT for FSMC (or, no SD_DETECT_PIN) * Fix material preset editing * Clean up preheat edit items * [cron] Bump distribution date (2020-06-26) * Minor LCD cleanup, improvement * Fix typo in DWIN, preheat array * Update Italian language (MarlinFirmware#18414) * [samd51] Manifest assigned timers priority (MarlinFirmware#18402) * Update MKS Robin Nano auto-build env (MarlinFirmware#18417) * SAMD51 cleanup (MarlinFirmware#18419) * BTT SKR Pro runout pins (MarlinFirmware#18416) * Update Brazilian Portuguese language (MarlinFirmware#18411) * Fix Fan Speed menu items (MarlinFirmware#18400) * Patch some DGUS warnings * Allow larger ADC debounce Reference MarlinFirmware#17205 * [cron] Bump distribution date (2020-06-27) * [cron] Bump distribution date (2020-06-28) * Update language fonts * Tool Change Migration fixes and debugging (MarlinFirmware#18448) * ExtUI additions (MarlinFirmware#18447) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Add Romanian language (MarlinFirmware#18455) Co-authored-by: cristyanul <47246451+cristyanul@users.noreply.github.com> * Fix "probing failed" false positives (MarlinFirmware#18435) * Adjustable delta_diagonal_rod_trim (MarlinFirmware#18423) * Russian, Ukranian for wide LCD (MarlinFirmware#18433) * Tweak pins formatting * Suppress unused var warning * ClosedLoop as singleton * [cron] Bump distribution date (2020-06-29) * MKS Robin Nano flash-based EEPROM (MarlinFirmware#18466) * Use "reset reason" defines (MarlinFirmware#18462) * [cron] Bump distribution date (2020-06-30) * [cron] Bump distribution date (2020-07-01) * Fix missing parenthesis (MarlinFirmware#18473) * Fix FYSETC CHEETAH V1.2 SD re-insert (MarlinFirmware#18474) Include this board with other Cheetah stepper reset. * Hide menu item with no fan (MarlinFirmware#18470) * Permit independent X2,Y2,Z2,Z3,Z4 endstop inverting (MarlinFirmware#18481) * Add TFT_LVGL_UI support (MarlinFirmware#18438) * Per-Hotend Default PIDs (MarlinFirmware#18483) * Enforce sensor range for temperature target (MarlinFirmware#18465) * Mitigate stepper timeout * Add CHAMBER PWM code * Structured thermistor tables * Fix reversed sensor ranges * Prevent temps outside sensor range * [cron] Bump distribution date (2020-07-02) * Tweak stepper shutdown test * Extend thermistor 1047 to 500°C * [cron] Bump distribution date (2020-07-03) * Keep filament runout pin for Creality Melzi (MarlinFirmware#18504) * Add FYSETC 2.42 inch OLED support (MarlinFirmware#18485) * Option to set manual Babystepping distance in mm (MarlinFirmware#18503) Co-authored-by: Scott Lahteine <github@thinkyhead.com> * Clean up LCD Manual Move / UBL Mesh Edit (MarlinFirmware#18373) * FYSETC OLED followup (MarlinFirmware#18519) * Ensure Git applies Unix line-endings in tests (MarlinFirmware#18495) * Fix axis name in serial output (MarlinFirmware#18522) * Fix env:mks_robin_nano35 (MarlinFirmware#18516) * FIx Sanguino/1284p board_upload.maximum_size (MarlinFirmware#18502) * M150 I to set Neopixel by index (MarlinFirmware#18490) * [cron] Bump distribution date (2020-07-04) * PID Accelerated Edit (MarlinFirmware#18532) * [cron] Bump distribution date (2020-07-05) * Fix "'ubl' not declared" error (MarlinFirmware#18541) * Fix thermistors exist-for-reading tests (MarlinFirmware#18533) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Fix "Probing mesh point" message Closes MarlinFirmware#17770 Co-Authored-By: Jan-Gerard van der Toorn <jan-gerard@users.noreply.github.com> * Probing points followup (MarlinFirmware#18552) * Update actions on bugfix branch * Add CI for pushed commits (MarlinFirmware#18549) * Fix Neopixel set_color (MarlinFirmware#18544) * Fix stall sensitivity adjustment for FTDI screens (MarlinFirmware#18554) * Minor pins cleanup * Add comment to M412 * Reduce string duplication * STM32: No compile-time check for PWM_PIN (MarlinFirmware#18539) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Filament Runout Inverting => State (MarlinFirmware#18537) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Simplify home_z_safely, respect HOME_AFTER_DEACTIVATE * [cron] Bump distribution date (2020-07-06) * Filament state followup * Get SAMD51 CXX flags from script * Use Material Preset 1 for PID autotune (MarlinFirmware#18446) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Fix broken POWER_LOSS_RECOVERY prompt (MarlinFirmware#18557) Co-authored-by: Scott Lahteine <github@thinkyhead.com> * Add Lerdge S,X,K (MarlinFirmware#18302) * Fix TMC homing phase coils alignment (MarlinFirmware#18528) Co-authored-by: Fabio Santos <fabiosan@live.com> * Scale runout distance setting for editable range (MarlinFirmware#18567) * 0.7.1 <= TMCStepper <= 0.7.9 (MarlinFirmware#18564) * Reduce 'first loop' temperature residency time (MarlinFirmware#18421) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> * Update and fix POWER_MONITOR (MarlinFirmware#18561) * [cron] Bump distribution date (2020-07-07) * Temp Residency followup * Combine command macros * Whitespace cleanup * Fix typo in Configuration_adv.h (MarlinFirmware#18570) * [cron] Bump distribution date (2020-07-08) * SKR 1.4 alert for unsupported LCD * Tweak PLR debug * Fix warning with PIO * Update Chinese (zh_CN) language (MarlinFirmware#18580) * Show fixed V in Power Display with no V sensor (MarlinFirmware#18579) * Fix User Temp Sensor (1000), reversed Pt100 / Pt1000 (MarlinFirmware#18590) * Add `Cap:RUNOUT` Co-Authored-By: Julius ter Pelkwijk <mrseeker@users.noreply.github.com> * Fix some comments * [cron] Bump distribution date (2020-07-09) * Fix missing controller fan include * Consolidate probe clearance, add section debug (MarlinFirmware#18576) * Better section / function log * Add do_z_clearance motion function * Remove outdated comment (MarlinFirmware#18597) * Clean up some MMU comments * MarlinUI support for up to 5 Material Presets (MarlinFirmware#18488) - Add `I` preset parameter to `G26`, `M106`, `M140`, and `M190`. - Extend menu items to permit a string interpolation. - Keep material names in a list and interpolate in menu items. - Extend material presets to support up to 5 predefined materials. Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> Co-authored-by: Jason Smith <jason.inet@gmail.com> Co-authored-by: Scott Lahteine <github@thinkyhead.com> Co-authored-by: MoellerDi <MoellerDi@users.noreply.github.com> Co-authored-by: ellensp <ellensp@hotmail.com> Co-authored-by: RudolphRiedel <31180093+RudolphRiedel@users.noreply.github.com> Co-authored-by: thinkyhead <thinkyhead@users.noreply.github.com> Co-authored-by: Kirill Vergun <647149+o-nix@users.noreply.github.com> Co-authored-by: Fabio Santos <fabiosan@live.com> Co-authored-by: Chris Pepper <p3p@p3psoft.co.uk> Co-authored-by: Victor <rhapsodyv@gmail.com> Co-authored-by: Pascal de Bruijn <pmjdebruijn@pcode.nl> Co-authored-by: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Co-authored-by: Johnny Eshak <info@johnnytheone.com> Co-authored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Co-authored-by: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Co-authored-by: cristyanul <47246451+cristyanul@users.noreply.github.com> Co-authored-by: JP Flouret <jflouret@microsoft.com> Co-authored-by: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Co-authored-by: George Fu <nailao_5918@163.com> Co-authored-by: Robby Candra <robbycandra.mail@gmail.com> Co-authored-by: cbteeple <cbteeple@g.harvard.edu> Co-authored-by: notabucketofspam <43456540+notabucketofspam@users.noreply.github.com> Co-authored-by: Jan-Gerard van der Toorn <jan-gerard@users.noreply.github.com> Co-authored-by: Oliver Jean Eifler <olli.eifler@gmail.com> Co-authored-by: ManuelMcLure <manuel@mclure.org> Co-authored-by: GhostlyCrowd <jeffjiggens@gmail.com> Co-authored-by: Luc Hoang Long <i.me.mine@luchoanglong.com> Co-authored-by: J.C. Nelson <32139633+xC0000005@users.noreply.github.com> Co-authored-by: shuttercat <67816426+shuttercat@users.noreply.github.com> Co-authored-by: espr14 <espr14@gmail.com> Co-authored-by: cccc <cuiwei_cv@163.com> Co-authored-by: Julius ter Pelkwijk <mrseeker@users.noreply.github.com>
1 parent 4bbdc82 commit 8f6fa36

11 files changed

Lines changed: 47 additions & 47 deletions

File tree

Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ void USB::Task() { //USB state machine
428428
uint8_t rcode;
429429
uint8_t tmpdata;
430430
static uint32_t delay = 0;
431-
//USB_FD_DEVICE_DESCRIPTOR buf;
431+
//USB_DEVICE_DESCRIPTOR buf;
432432
bool lowspeed = false;
433433

434434
MAX3421E::Task();
@@ -647,8 +647,8 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) {
647647
//printf("Configuring: parent = %i, port = %i\r\n", parent, port);
648648
uint8_t devConfigIndex;
649649
uint8_t rcode = 0;
650-
uint8_t buf[sizeof (USB_FD_DEVICE_DESCRIPTOR)];
651-
USB_FD_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR *>(buf);
650+
uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)];
651+
USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
652652
UsbDevice *p = nullptr;
653653
EpInfo *oldep_ptr = nullptr;
654654
EpInfo epInfo;
@@ -678,13 +678,13 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) {
678678

679679
p->lowspeed = lowspeed;
680680
// Get device descriptor
681-
rcode = getDevDescr(0, 0, sizeof (USB_FD_DEVICE_DESCRIPTOR), (uint8_t*)buf);
681+
rcode = getDevDescr(0, 0, sizeof (USB_DEVICE_DESCRIPTOR), (uint8_t*)buf);
682682

683683
// Restore p->epinfo
684684
p->epinfo = oldep_ptr;
685685

686686
if (rcode) {
687-
//printf("Configuring error: Can't get USB_FD_DEVICE_DESCRIPTOR\r\n");
687+
//printf("Configuring error: Can't get USB_DEVICE_DESCRIPTOR\r\n");
688688
return rcode;
689689
}
690690

@@ -762,7 +762,7 @@ uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t con
762762
uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser *p) {
763763
const uint8_t bufSize = 64;
764764
uint8_t buf[bufSize];
765-
USB_FD_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_FD_CONFIGURATION_DESCRIPTOR *>(buf);
765+
USB_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_CONFIGURATION_DESCRIPTOR *>(buf);
766766

767767
uint8_t ret = getConfDescr(addr, ep, 9, conf, buf);
768768
if (ret) return ret;

Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
class UsbConfigXtracter {
3232
public:
33-
//virtual void ConfigXtract(const USB_FD_CONFIGURATION_DESCRIPTOR *conf) = 0;
34-
//virtual void InterfaceXtract(uint8_t conf, const USB_FD_INTERFACE_DESCRIPTOR *iface) = 0;
33+
//virtual void ConfigXtract(const USB_CONFIGURATION_DESCRIPTOR *conf) = 0;
34+
//virtual void InterfaceXtract(uint8_t conf, const USB_INTERFACE_DESCRIPTOR *iface) = 0;
3535

36-
virtual void EndpointXtract(uint8_t conf __attribute__((unused)), uint8_t iface __attribute__((unused)), uint8_t alt __attribute__((unused)), uint8_t proto __attribute__((unused)), const USB_FD_ENDPOINT_DESCRIPTOR *ep __attribute__((unused))) {
36+
virtual void EndpointXtract(uint8_t conf __attribute__((unused)), uint8_t iface __attribute__((unused)), uint8_t alt __attribute__((unused)), uint8_t proto __attribute__((unused)), const USB_ENDPOINT_DESCRIPTOR *ep __attribute__((unused))) {
3737
}
3838
};
3939

@@ -50,7 +50,7 @@ class ConfigDescParser : public USBReadParser {
5050
MultiValueBuffer theBuffer;
5151
MultiByteValueParser valParser;
5252
ByteSkipper theSkipper;
53-
uint8_t varBuffer[16 /*sizeof(USB_FD_CONFIGURATION_DESCRIPTOR)*/];
53+
uint8_t varBuffer[16 /*sizeof(USB_CONFIGURATION_DESCRIPTOR)*/];
5454

5555
uint8_t stateParseDescr; // ParseDescriptor state
5656

@@ -97,8 +97,8 @@ void ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::Parse(const uin
9797
compare masks for them. When the match is found, calls EndpointXtract passing buffer containing endpoint descriptor */
9898
template <const uint8_t CLASS_ID, const uint8_t SUBCLASS_ID, const uint8_t PROTOCOL_ID, const uint8_t MASK>
9999
bool ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::ParseDescriptor(uint8_t **pp, uint16_t *pcntdn) {
100-
USB_FD_CONFIGURATION_DESCRIPTOR* ucd = reinterpret_cast<USB_FD_CONFIGURATION_DESCRIPTOR*>(varBuffer);
101-
USB_FD_INTERFACE_DESCRIPTOR* uid = reinterpret_cast<USB_FD_INTERFACE_DESCRIPTOR*>(varBuffer);
100+
USB_CONFIGURATION_DESCRIPTOR* ucd = reinterpret_cast<USB_CONFIGURATION_DESCRIPTOR*>(varBuffer);
101+
USB_INTERFACE_DESCRIPTOR* uid = reinterpret_cast<USB_INTERFACE_DESCRIPTOR*>(varBuffer);
102102
switch (stateParseDescr) {
103103
case 0:
104104
theBuffer.valueSize = 2;
@@ -155,7 +155,7 @@ bool ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::ParseDescriptor
155155
case USB_DESCRIPTOR_ENDPOINT:
156156
if (!valParser.Parse(pp, pcntdn)) return false;
157157
if (isGoodInterface && theXtractor)
158-
theXtractor->EndpointXtract(confValue, ifaceNumber, ifaceAltSet, protoValue, (USB_FD_ENDPOINT_DESCRIPTOR*)varBuffer);
158+
theXtractor->EndpointXtract(confValue, ifaceNumber, ifaceAltSet, protoValue, (USB_ENDPOINT_DESCRIPTOR*)varBuffer);
159159
break;
160160
//case HID_DESCRIPTOR_HID:
161161
// if (!valParser.Parse(pp, pcntdn)) return false;

Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ bLastUsbError(0) {
250250
*/
251251
uint8_t BulkOnly::ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed) {
252252

253-
const uint8_t constBufSize = sizeof (USB_FD_DEVICE_DESCRIPTOR);
253+
const uint8_t constBufSize = sizeof (USB_DEVICE_DESCRIPTOR);
254254

255255
uint8_t buf[constBufSize];
256-
USB_FD_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR*>(buf);
256+
USB_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR*>(buf);
257257
uint8_t rcode;
258258
UsbDevice *p = nullptr;
259259
EpInfo *oldep_ptr = nullptr;
@@ -529,7 +529,7 @@ uint8_t BulkOnly::Init(uint8_t parent __attribute__((unused)), uint8_t port __at
529529
* @param proto
530530
* @param pep
531531
*/
532-
void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto __attribute__((unused)), const USB_FD_ENDPOINT_DESCRIPTOR * pep) {
532+
void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto __attribute__((unused)), const USB_ENDPOINT_DESCRIPTOR * pep) {
533533
ErrorMessage<uint8_t> (PSTR("Conf.Val"), conf);
534534
ErrorMessage<uint8_t> (PSTR("Iface Num"), iface);
535535
ErrorMessage<uint8_t> (PSTR("Alt.Set"), alt);
@@ -1166,7 +1166,7 @@ uint8_t BulkOnly::HandleSCSIError(uint8_t status) {
11661166
*
11671167
* @param ep_ptr
11681168
*/
1169-
void BulkOnly::PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR * ep_ptr) {
1169+
void BulkOnly::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR * ep_ptr) {
11701170
Notify(PSTR("Endpoint descriptor:"), 0x80);
11711171
Notify(PSTR("\r\nLength:\t\t"), 0x80);
11721172
D_PrintHex<uint8_t> (ep_ptr->bLength, 0x80);

Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ class BulkOnly : public USBDeviceConfig, public UsbConfigXtracter {
491491
uint16_t CurrentSectorSize[MASS_MAX_SUPPORTED_LUN]; // Sector size, clipped to 16 bits
492492
bool LUNOk[MASS_MAX_SUPPORTED_LUN]; // use this to check for media changes.
493493
bool WriteOk[MASS_MAX_SUPPORTED_LUN];
494-
void PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR* ep_ptr);
494+
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr);
495495

496496
// Additional Initialization Method for Subclasses
497497

@@ -526,7 +526,7 @@ class BulkOnly : public USBDeviceConfig, public UsbConfigXtracter {
526526
virtual uint8_t GetAddress() { return bAddress; }
527527

528528
// UsbConfigXtracter implementation
529-
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_FD_ENDPOINT_DESCRIPTOR *ep);
529+
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep);
530530

531531
virtual bool DEVCLASSOK(uint8_t klass) { return klass == USB_CLASS_MASS_STORAGE; }
532532

Marlin/src/sd/usb_flashdrive/lib-uhs2/message.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int UsbDEBUGlvl = 0x80;
3737
void E_Notifyc(char c, int lvl) {
3838
if (UsbDEBUGlvl < lvl) return;
3939
USB_HOST_SERIAL.print(c
40-
#if !defined(ARDUINO) && !defined(ARDUINO_ARCH_LPC176X)
40+
#if !defined(ARDUINO) || ARDUINO < 100
4141
, BYTE
4242
#endif
4343
);

Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ typedef struct {
116116
uint8_t iProduct; // Index of String Descriptor describing the product.
117117
uint8_t iSerialNumber; // Index of String Descriptor with the device's serial number.
118118
uint8_t bNumConfigurations; // Number of possible configurations.
119-
} __attribute__((packed)) USB_FD_DEVICE_DESCRIPTOR;
119+
} __attribute__((packed)) USB_DEVICE_DESCRIPTOR;
120120

121121
/* Configuration descriptor structure */
122122
typedef struct {
@@ -128,7 +128,7 @@ typedef struct {
128128
uint8_t iConfiguration; // Index of String Descriptor describing the configuration.
129129
uint8_t bmAttributes; // Configuration characteristics.
130130
uint8_t bMaxPower; // Maximum power consumed by this configuration.
131-
} __attribute__((packed)) USB_FD_CONFIGURATION_DESCRIPTOR;
131+
} __attribute__((packed)) USB_CONFIGURATION_DESCRIPTOR;
132132

133133
/* Interface descriptor structure */
134134
typedef struct {
@@ -141,7 +141,7 @@ typedef struct {
141141
uint8_t bInterfaceSubClass; // Subclass code (assigned by the USB-IF).
142142
uint8_t bInterfaceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.
143143
uint8_t iInterface; // Index of String Descriptor describing the interface.
144-
} __attribute__((packed)) USB_FD_INTERFACE_DESCRIPTOR;
144+
} __attribute__((packed)) USB_INTERFACE_DESCRIPTOR;
145145

146146
/* Endpoint descriptor structure */
147147
typedef struct {
@@ -151,7 +151,7 @@ typedef struct {
151151
uint8_t bmAttributes; // Endpoint transfer type.
152152
uint16_t wMaxPacketSize; // Maximum packet size.
153153
uint8_t bInterval; // Polling interval in frames.
154-
} __attribute__((packed)) USB_FD_ENDPOINT_DESCRIPTOR;
154+
} __attribute__((packed)) USB_ENDPOINT_DESCRIPTOR;
155155

156156
/* HID descriptor */
157157
typedef struct {

Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class UHS_Bulk_Storage : public UHS_USBInterface {
174174
volatile uint16_t CurrentSectorSize[MASS_MAX_SUPPORTED_LUN]; // Sector size, clipped to 16 bits
175175
volatile bool LUNOk[MASS_MAX_SUPPORTED_LUN]; // use this to check for media changes.
176176
volatile bool WriteOk[MASS_MAX_SUPPORTED_LUN];
177-
void PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR* ep_ptr);
177+
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr);
178178

179179
public:
180180
UHS_Bulk_Storage(UHS_USB_HOST_BASE *p);

Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_BULK_STORAGE/UHS_BULK_STORAGE_INLINE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ uint8_t UHS_NI UHS_Bulk_Storage::HandleSCSIError(uint8_t status) {
11881188
*
11891189
* @param ep_ptr
11901190
*/
1191-
void UHS_NI UHS_Bulk_Storage::PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR * ep_ptr) {
1191+
void UHS_NI UHS_Bulk_Storage::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR * ep_ptr) {
11921192
Notify(PSTR("Endpoint descriptor:"), 0x80);
11931193
Notify(PSTR("\r\nLength:\t\t"), 0x80);
11941194
D_PrintHex<uint8_t > (ep_ptr->bLength, 0x80);

Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,12 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
239239
// wrap in {} to throw away the 64 byte buffer when we are done with it
240240
{
241241
uint8_t buf[biggest];
242-
USB_FD_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR *>(buf);
242+
USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
243243
#else
244244
const uint8_t biggest = 18;
245245
uint8_t buf[biggest];
246-
USB_FD_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR *>(buf);
247-
USB_FD_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_FD_CONFIGURATION_DESCRIPTOR *>(buf);
246+
USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
247+
USB_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_CONFIGURATION_DESCRIPTOR *>(buf);
248248
#endif
249249

250250
//for(devConfigIndex = 0; devConfigIndex < UHS_HOST_MAX_INTERFACE_DRIVERS; devConfigIndex++) {
@@ -309,7 +309,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
309309
sof_delay(200);
310310
goto again;
311311
}
312-
HOST_DEBUG("Configuring error: 0x%2.2x Can't get USB_FD_DEVICE_DESCRIPTOR\r\n", rcode);
312+
HOST_DEBUG("Configuring error: 0x%2.2x Can't get USB_DEVICE_DESCRIPTOR\r\n", rcode);
313313
return rcode;
314314
}
315315

@@ -378,7 +378,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
378378
} // unwrapped, old large buf now invalid and discarded.
379379

380380
uint8_t buf[18];
381-
USB_FD_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_FD_CONFIGURATION_DESCRIPTOR *>(buf);
381+
USB_CONFIGURATION_DESCRIPTOR *ucd = reinterpret_cast<USB_CONFIGURATION_DESCRIPTOR *>(buf);
382382
#endif
383383

384384
ei.address = addrPool.AllocAddress(parent, IsHub(ei.klass), port);
@@ -415,9 +415,9 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
415415
HOST_DEBUG("configs: %i\r\n", configs);
416416
for(uint8_t conf = 0; (!rcode) && (conf < configs); conf++) {
417417
// read the config descriptor into a buffer.
418-
rcode = getConfDescr(ei.address, sizeof (USB_FD_CONFIGURATION_DESCRIPTOR), conf, buf);
418+
rcode = getConfDescr(ei.address, sizeof (USB_CONFIGURATION_DESCRIPTOR), conf, buf);
419419
if(rcode) {
420-
HOST_DEBUG("Configuring error: %2.2x Can't get USB_FD_INTERFACE_DESCRIPTOR\r\n", rcode);
420+
HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR\r\n", rcode);
421421
rcode = UHS_HOST_ERROR_FailGetConfDescr;
422422
continue;
423423
}
@@ -438,7 +438,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
438438
uint8_t offset;
439439
rcode = initDescrStream(&ei, ucd, pep, data, &left, &read, &offset);
440440
if(rcode) {
441-
HOST_DEBUG("Configuring error: %2.2x Can't get USB_FD_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
441+
HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
442442
break;
443443
}
444444
for(; (numinf) && (!rcode); inf++) {
@@ -451,7 +451,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
451451
break;
452452
}
453453
if(rcode) {
454-
HOST_DEBUG("Configuring error: %2.2x Can't close USB_FD_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
454+
HOST_DEBUG("Configuring error: %2.2x Can't close USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
455455
continue;
456456
}
457457
rcode = TestInterface(&ei);
@@ -471,9 +471,9 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
471471
if(!bestsuccess) rcode = UHS_HOST_ERROR_DEVICE_NOT_SUPPORTED;
472472
}
473473
if(!rcode) {
474-
rcode = getConfDescr(ei.address, sizeof (USB_FD_CONFIGURATION_DESCRIPTOR), bestconf, buf);
474+
rcode = getConfDescr(ei.address, sizeof (USB_CONFIGURATION_DESCRIPTOR), bestconf, buf);
475475
if(rcode) {
476-
HOST_DEBUG("Configuring error: %2.2x Can't get USB_FD_INTERFACE_DESCRIPTOR\r\n", rcode);
476+
HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR\r\n", rcode);
477477
rcode = UHS_HOST_ERROR_FailGetConfDescr;
478478
}
479479
}
@@ -497,7 +497,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
497497
uint8_t offset;
498498
rcode = initDescrStream(&ei, ucd, pep, data, &left, &read, &offset);
499499
if(rcode) {
500-
HOST_DEBUG("Configuring error: %2.2x Can't get USB_FD_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
500+
HOST_DEBUG("Configuring error: %2.2x Can't get USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
501501
} else {
502502
for(; (numinf) && (!rcode); inf++) {
503503
// iterate for each interface on this config
@@ -508,7 +508,7 @@ uint8_t UHS_USB_HOST_BASE::Configuring(uint8_t parent, uint8_t port, uint8_t spe
508508
break;
509509
}
510510
if(rcode) {
511-
HOST_DEBUG("Configuring error: %2.2x Can't close USB_FD_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
511+
HOST_DEBUG("Configuring error: %2.2x Can't close USB_INTERFACE_DESCRIPTOR stream.\r\n", rcode);
512512
continue;
513513
}
514514

@@ -721,7 +721,7 @@ uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytes
721721
* @param offset
722722
* @return zero for success or error code
723723
*/
724-
uint8_t UHS_USB_HOST_BASE::initDescrStream(ENUMERATION_INFO *ei, USB_FD_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset) {
724+
uint8_t UHS_USB_HOST_BASE::initDescrStream(ENUMERATION_INFO *ei, USB_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset) {
725725
if(!ei || !ucd) return UHS_HOST_ERROR_BAD_ARGUMENT;
726726
if(!pep) return UHS_HOST_ERROR_NULL_EPINFO;
727727
*left = ucd->wTotalLength;
@@ -837,7 +837,7 @@ uint8_t UHS_USB_HOST_BASE::getNextInterface(ENUMERATION_INFO *ei, UHS_EpInfo *pe
837837
return rcode;
838838
}
839839

840-
uint8_t UHS_USB_HOST_BASE::seekInterface(ENUMERATION_INFO *ei, uint16_t inf, USB_FD_CONFIGURATION_DESCRIPTOR *ucd) {
840+
uint8_t UHS_USB_HOST_BASE::seekInterface(ENUMERATION_INFO *ei, uint16_t inf, USB_CONFIGURATION_DESCRIPTOR *ucd) {
841841
if(!ei || !ucd) return UHS_HOST_ERROR_BAD_ARGUMENT;
842842
uint8_t data[ei->bMaxPacketSize0];
843843
UHS_EpInfo *pep;

Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usb_ch9.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ typedef struct {
164164
uint8_t iProduct; // Index of String Descriptor describing the product.
165165
uint8_t iSerialNumber; // Index of String Descriptor with the device's serial number.
166166
uint8_t bNumConfigurations; // Number of possible configurations.
167-
} __attribute__((packed)) USB_FD_DEVICE_DESCRIPTOR;
167+
} __attribute__((packed)) USB_DEVICE_DESCRIPTOR;
168168

169169
/* Configuration descriptor structure */
170170
typedef struct {
@@ -176,7 +176,7 @@ typedef struct {
176176
uint8_t iConfiguration; // Index of String Descriptor describing the configuration.
177177
uint8_t bmAttributes; // Configuration characteristics.
178178
uint8_t bMaxPower; // Maximum power consumed by this configuration.
179-
} __attribute__((packed)) USB_FD_CONFIGURATION_DESCRIPTOR;
179+
} __attribute__((packed)) USB_CONFIGURATION_DESCRIPTOR;
180180

181181
/* Interface descriptor structure */
182182
typedef struct {
@@ -189,7 +189,7 @@ typedef struct {
189189
uint8_t bInterfaceSubClass; // Subclass code (assigned by the USB-IF).
190190
uint8_t bInterfaceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.
191191
uint8_t iInterface; // Index of String Descriptor describing the interface.
192-
} __attribute__((packed)) USB_FD_INTERFACE_DESCRIPTOR;
192+
} __attribute__((packed)) USB_INTERFACE_DESCRIPTOR;
193193

194194
/* Endpoint descriptor structure */
195195
typedef struct {
@@ -199,7 +199,7 @@ typedef struct {
199199
uint8_t bmAttributes; // Endpoint transfer type.
200200
uint16_t wMaxPacketSize; // Maximum packet size.
201201
uint8_t bInterval; // Polling interval in frames.
202-
} __attribute__((packed)) USB_FD_ENDPOINT_DESCRIPTOR;
202+
} __attribute__((packed)) USB_ENDPOINT_DESCRIPTOR;
203203

204204
/* HID descriptor */
205205
/*

0 commit comments

Comments
 (0)