Fix Arduino DUE compilation (#20058)
This commit is contained in:
parent
2365df532f
commit
ee48fc6544
@ -20,6 +20,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
||||||
|
|
||||||
#include "MarlinSPI.h"
|
#include "MarlinSPI.h"
|
||||||
|
|
||||||
static void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb, uint32_t dataSize) {
|
static void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb, uint32_t dataSize) {
|
||||||
@ -159,3 +161,5 @@ uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc)
|
|||||||
HAL_DMA_DeInit(&_dmaTx);
|
HAL_DMA_DeInit(&_dmaTx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
||||||
|
@ -34,6 +34,8 @@ uint8_t ControllerFan::speed;
|
|||||||
|
|
||||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||||
controllerFan_settings_t ControllerFan::settings; // {0}
|
controllerFan_settings_t ControllerFan::settings; // {0}
|
||||||
|
#else
|
||||||
|
const controllerFan_settings_t &ControllerFan::settings = controllerFan_defaults;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ControllerFan::setup() {
|
void ControllerFan::setup() {
|
||||||
|
@ -58,7 +58,7 @@ class ControllerFan {
|
|||||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||||
static controllerFan_settings_t settings;
|
static controllerFan_settings_t settings;
|
||||||
#else
|
#else
|
||||||
static const controllerFan_settings_t constexpr &settings = controllerFan_defaults;
|
static const controllerFan_settings_t &settings;
|
||||||
#endif
|
#endif
|
||||||
static inline bool state() { return speed > 0; }
|
static inline bool state() { return speed > 0; }
|
||||||
static inline void init() { reset(); }
|
static inline void init() { reset(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user