Skip to content

Commit eed29ea

Browse files
ellenspthinkyhead
andcommitted
🔧 STM32 UID followup (#26727)
Co-authored-by: Scott Lahteine <[email protected]>
1 parent 7d0c256 commit eed29ea

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

Marlin/src/gcode/host/M115.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "../../feature/caselight.h"
3333
#endif
3434

35-
#if !defined(MACHINE_UUID) && HAS_STM32_UID
35+
#if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID)
3636
#include "../../libs/hex_print.h"
3737
#endif
3838

@@ -69,15 +69,15 @@ void GcodeSuite::M115() {
6969
#if NUM_AXES != XYZ
7070
" AXIS_COUNT:" STRINGIFY(NUM_AXES)
7171
#endif
72-
#if defined(MACHINE_UUID) || HAS_STM32_UID
72+
#if defined(MACHINE_UUID) || ENABLED(HAS_STM32_UID)
7373
" UUID:"
7474
#endif
7575
#ifdef MACHINE_UUID
7676
MACHINE_UUID
7777
#endif
7878
);
7979

80-
#if !defined(MACHINE_UUID) && HAS_STM32_UID
80+
#if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID)
8181
/**
8282
* STM32-based devices have a 96-bit CPU device serial number.
8383
* Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations.
@@ -90,7 +90,7 @@ void GcodeSuite::M115() {
9090
#else
9191
uint16_t * const UID = (uint16_t*)UID_BASE;
9292
SERIAL_ECHO(
93-
F("CEDE2A2F-"), hex_word(UID[0]), '-', hex_word(UID[1]), '-', hex_word(UID[2]), '-',
93+
F("CEDE2A2F-"), hex_word(UID[0]), C('-'), hex_word(UID[1]), C('-'), hex_word(UID[2]), C('-'),
9494
hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5])
9595
);
9696
#endif

Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
4646
#define HAS_MCP3426_ADC
4747

48-
// Opulo Lumen uses the CPU serial number
49-
#ifdef STM32F4
50-
#define HAS_STM32_UID 1
51-
#endif
52-
5348
//
5449
// Servos
5550
//

Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
4646
#define HAS_MCP3426_ADC
4747

48-
// Opulo Lumen uses the CPU serial number
49-
#ifdef STM32F4
50-
#define HAS_STM32_UID 1
51-
#endif
52-
5348
//
5449
// Servos
5550
//

ini/stm32f4.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extends = stm32_variant
100100
board = marlin_opulo_lumen_rev3
101101
build_flags = ${stm32_variant.build_flags}
102102
-DARDUINO_BLACK_F407VE
103-
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
103+
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
104104
extra_scripts = ${stm32_variant.extra_scripts}
105105

106106
#
@@ -111,7 +111,7 @@ extends = stm32_variant
111111
board = marlin_opulo_lumen_rev4
112112
build_flags = ${stm32_variant.build_flags}
113113
-DARDUINO_BLACK_F407VE
114-
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
114+
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
115115
extra_scripts = ${stm32_variant.extra_scripts}
116116

117117
#

0 commit comments

Comments
 (0)