Skip to content

Commit

Permalink
Bugfix 2.0.x update (#1)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
1 parent cea097d commit 9fb50f4
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 50 deletions.
11 changes: 11 additions & 0 deletions Marlin/src/lcd/language/language_ro.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ namespace Language_ro {
PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed");
PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Skew Factor");
PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch");
<<<<<<< HEAD
PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test");
PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset");
PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Stow");
Expand All @@ -420,6 +421,16 @@ namespace Language_ro {
PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode");
PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode");
PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store");
=======
PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Cmd: Self-Test");
PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Cmd: Reset");
PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Cmd: Stow");
PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Cmd: Deploy");
PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Cmd: SW-Mode");
PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Cmd: 5V-Mode");
PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Cmd: OD-Mode");
PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Cmd: Mode-Store");
>>>>>>> Bugfix 2.0.x update (#1)
PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V");
PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD");
PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain");
Expand Down
27 changes: 27 additions & 0 deletions Marlin/src/lcd/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,33 @@ millis_t MarlinUI::next_button_update_ms; // = 0
volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update
#endif

#if PREHEAT_COUNT
preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load()

PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
#ifdef PREHEAT_1_LABEL
static PGMSTR(preheat_0_label, PREHEAT_1_LABEL);
#endif
#ifdef PREHEAT_2_LABEL
static PGMSTR(preheat_1_label, PREHEAT_2_LABEL);
#endif
#ifdef PREHEAT_3_LABEL
static PGMSTR(preheat_2_label, PREHEAT_3_LABEL);
#endif
#ifdef PREHEAT_4_LABEL
static PGMSTR(preheat_3_label, PREHEAT_4_LABEL);
#endif
#ifdef PREHEAT_5_LABEL
static PGMSTR(preheat_4_label, PREHEAT_5_LABEL);
#endif

#define _PLBL(N) preheat_##N##_label,
static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT(PREHEAT_COUNT, _PLBL) };

return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
}
#endif

#if ENABLED(SDSUPPORT)

#include "../sd/cardreader.h"
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
#elif MB(MKS_ROBIN_MINI)
#include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
#elif MB(MKS_ROBIN_NANO)
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano env:mks_robin_nano35
#elif MB(MKS_ROBIN_LITE)
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#elif MB(BTT_SKR_MINI_V1_1)
Expand Down Expand Up @@ -541,9 +541,9 @@
#elif MB(CCROBOT_MEEB_3DP)
#include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb
#elif MB(CHITU3D_V5)
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init env:chitu_f103_lvgl
#elif MB(CHITU3D_V6)
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_lvgl
#elif MB(CREALITY_V4)
#include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality
#elif MB(TRIGORILLA_PRO)
Expand Down
12 changes: 6 additions & 6 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void USB::Task() { //USB state machine
uint8_t rcode;
uint8_t tmpdata;
static uint32_t delay = 0;
//USB_FD_DEVICE_DESCRIPTOR buf;
//USB_DEVICE_DESCRIPTOR buf;
bool lowspeed = false;

MAX3421E::Task();
Expand Down Expand Up @@ -647,8 +647,8 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) {
//printf("Configuring: parent = %i, port = %i\r\n", parent, port);
uint8_t devConfigIndex;
uint8_t rcode = 0;
uint8_t buf[sizeof (USB_FD_DEVICE_DESCRIPTOR)];
USB_FD_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR *>(buf);
uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)];
USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR *>(buf);
UsbDevice *p = nullptr;
EpInfo *oldep_ptr = nullptr;
EpInfo epInfo;
Expand Down Expand Up @@ -678,13 +678,13 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) {

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

// Restore p->epinfo
p->epinfo = oldep_ptr;

if (rcode) {
//printf("Configuring error: Can't get USB_FD_DEVICE_DESCRIPTOR\r\n");
//printf("Configuring error: Can't get USB_DEVICE_DESCRIPTOR\r\n");
return rcode;
}

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

uint8_t ret = getConfDescr(addr, ep, 9, conf, buf);
if (ret) return ret;
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

class UsbConfigXtracter {
public:
//virtual void ConfigXtract(const USB_FD_CONFIGURATION_DESCRIPTOR *conf) = 0;
//virtual void InterfaceXtract(uint8_t conf, const USB_FD_INTERFACE_DESCRIPTOR *iface) = 0;
//virtual void ConfigXtract(const USB_CONFIGURATION_DESCRIPTOR *conf) = 0;
//virtual void InterfaceXtract(uint8_t conf, const USB_INTERFACE_DESCRIPTOR *iface) = 0;

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))) {
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))) {
}
};

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

uint8_t stateParseDescr; // ParseDescriptor state

Expand Down Expand Up @@ -97,8 +97,8 @@ void ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::Parse(const uin
compare masks for them. When the match is found, calls EndpointXtract passing buffer containing endpoint descriptor */
template <const uint8_t CLASS_ID, const uint8_t SUBCLASS_ID, const uint8_t PROTOCOL_ID, const uint8_t MASK>
bool ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::ParseDescriptor(uint8_t **pp, uint16_t *pcntdn) {
USB_FD_CONFIGURATION_DESCRIPTOR* ucd = reinterpret_cast<USB_FD_CONFIGURATION_DESCRIPTOR*>(varBuffer);
USB_FD_INTERFACE_DESCRIPTOR* uid = reinterpret_cast<USB_FD_INTERFACE_DESCRIPTOR*>(varBuffer);
USB_CONFIGURATION_DESCRIPTOR* ucd = reinterpret_cast<USB_CONFIGURATION_DESCRIPTOR*>(varBuffer);
USB_INTERFACE_DESCRIPTOR* uid = reinterpret_cast<USB_INTERFACE_DESCRIPTOR*>(varBuffer);
switch (stateParseDescr) {
case 0:
theBuffer.valueSize = 2;
Expand Down Expand Up @@ -155,7 +155,7 @@ bool ConfigDescParser<CLASS_ID, SUBCLASS_ID, PROTOCOL_ID, MASK>::ParseDescriptor
case USB_DESCRIPTOR_ENDPOINT:
if (!valParser.Parse(pp, pcntdn)) return false;
if (isGoodInterface && theXtractor)
theXtractor->EndpointXtract(confValue, ifaceNumber, ifaceAltSet, protoValue, (USB_FD_ENDPOINT_DESCRIPTOR*)varBuffer);
theXtractor->EndpointXtract(confValue, ifaceNumber, ifaceAltSet, protoValue, (USB_ENDPOINT_DESCRIPTOR*)varBuffer);
break;
//case HID_DESCRIPTOR_HID:
// if (!valParser.Parse(pp, pcntdn)) return false;
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ bLastUsbError(0) {
*/
uint8_t BulkOnly::ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed) {

const uint8_t constBufSize = sizeof (USB_FD_DEVICE_DESCRIPTOR);
const uint8_t constBufSize = sizeof (USB_DEVICE_DESCRIPTOR);

uint8_t buf[constBufSize];
USB_FD_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_FD_DEVICE_DESCRIPTOR*>(buf);
USB_DEVICE_DESCRIPTOR * udd = reinterpret_cast<USB_DEVICE_DESCRIPTOR*>(buf);
uint8_t rcode;
UsbDevice *p = nullptr;
EpInfo *oldep_ptr = nullptr;
Expand Down Expand Up @@ -529,7 +529,7 @@ uint8_t BulkOnly::Init(uint8_t parent __attribute__((unused)), uint8_t port __at
* @param proto
* @param pep
*/
void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto __attribute__((unused)), const USB_FD_ENDPOINT_DESCRIPTOR * pep) {
void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto __attribute__((unused)), const USB_ENDPOINT_DESCRIPTOR * pep) {
ErrorMessage<uint8_t> (PSTR("Conf.Val"), conf);
ErrorMessage<uint8_t> (PSTR("Iface Num"), iface);
ErrorMessage<uint8_t> (PSTR("Alt.Set"), alt);
Expand Down Expand Up @@ -1166,7 +1166,7 @@ uint8_t BulkOnly::HandleSCSIError(uint8_t status) {
*
* @param ep_ptr
*/
void BulkOnly::PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR * ep_ptr) {
void BulkOnly::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR * ep_ptr) {
Notify(PSTR("Endpoint descriptor:"), 0x80);
Notify(PSTR("\r\nLength:\t\t"), 0x80);
D_PrintHex<uint8_t> (ep_ptr->bLength, 0x80);
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class BulkOnly : public USBDeviceConfig, public UsbConfigXtracter {
uint16_t CurrentSectorSize[MASS_MAX_SUPPORTED_LUN]; // Sector size, clipped to 16 bits
bool LUNOk[MASS_MAX_SUPPORTED_LUN]; // use this to check for media changes.
bool WriteOk[MASS_MAX_SUPPORTED_LUN];
void PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR* ep_ptr);
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr);

// Additional Initialization Method for Subclasses

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

// UsbConfigXtracter implementation
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_FD_ENDPOINT_DESCRIPTOR *ep);
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep);

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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/sd/usb_flashdrive/lib-uhs2/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int UsbDEBUGlvl = 0x80;
void E_Notifyc(char c, int lvl) {
if (UsbDEBUGlvl < lvl) return;
USB_HOST_SERIAL.print(c
#if !defined(ARDUINO) && !defined(ARDUINO_ARCH_LPC176X)
#if !defined(ARDUINO) || ARDUINO < 100
, BYTE
#endif
);
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/sd/usb_flashdrive/lib-uhs2/usb_ch9.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ typedef struct {
uint8_t iProduct; // Index of String Descriptor describing the product.
uint8_t iSerialNumber; // Index of String Descriptor with the device's serial number.
uint8_t bNumConfigurations; // Number of possible configurations.
} __attribute__((packed)) USB_FD_DEVICE_DESCRIPTOR;
} __attribute__((packed)) USB_DEVICE_DESCRIPTOR;

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

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

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

/* HID descriptor */
typedef struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class UHS_Bulk_Storage : public UHS_USBInterface {
volatile uint16_t CurrentSectorSize[MASS_MAX_SUPPORTED_LUN]; // Sector size, clipped to 16 bits
volatile bool LUNOk[MASS_MAX_SUPPORTED_LUN]; // use this to check for media changes.
volatile bool WriteOk[MASS_MAX_SUPPORTED_LUN];
void PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR* ep_ptr);
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr);

public:
UHS_Bulk_Storage(UHS_USB_HOST_BASE *p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ uint8_t UHS_NI UHS_Bulk_Storage::HandleSCSIError(uint8_t status) {
*
* @param ep_ptr
*/
void UHS_NI UHS_Bulk_Storage::PrintEndpointDescriptor(const USB_FD_ENDPOINT_DESCRIPTOR * ep_ptr) {
void UHS_NI UHS_Bulk_Storage::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR * ep_ptr) {
Notify(PSTR("Endpoint descriptor:"), 0x80);
Notify(PSTR("\r\nLength:\t\t"), 0x80);
D_PrintHex<uint8_t > (ep_ptr->bLength, 0x80);
Expand Down
Loading

0 comments on commit 9fb50f4

Please sign in to comment.