0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-22 17:52:57 +00:00

🔧 STM32 UID followup (#26727)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
ellensp 2024-01-25 07:50:48 +13:00 committed by Scott Lahteine
parent 7d0c25631e
commit eed29eaef4
4 changed files with 6 additions and 16 deletions

View file

@ -32,7 +32,7 @@
#include "../../feature/caselight.h"
#endif
#if !defined(MACHINE_UUID) && HAS_STM32_UID
#if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID)
#include "../../libs/hex_print.h"
#endif
@ -69,7 +69,7 @@ void GcodeSuite::M115() {
#if NUM_AXES != XYZ
" AXIS_COUNT:" STRINGIFY(NUM_AXES)
#endif
#if defined(MACHINE_UUID) || HAS_STM32_UID
#if defined(MACHINE_UUID) || ENABLED(HAS_STM32_UID)
" UUID:"
#endif
#ifdef MACHINE_UUID
@ -77,7 +77,7 @@ void GcodeSuite::M115() {
#endif
);
#if !defined(MACHINE_UUID) && HAS_STM32_UID
#if !defined(MACHINE_UUID) && ENABLED(HAS_STM32_UID)
/**
* STM32-based devices have a 96-bit CPU device serial number.
* Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations.
@ -90,7 +90,7 @@ void GcodeSuite::M115() {
#else
uint16_t * const UID = (uint16_t*)UID_BASE;
SERIAL_ECHO(
F("CEDE2A2F-"), hex_word(UID[0]), '-', hex_word(UID[1]), '-', hex_word(UID[2]), '-',
F("CEDE2A2F-"), hex_word(UID[0]), C('-'), hex_word(UID[1]), C('-'), hex_word(UID[2]), C('-'),
hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5])
);
#endif

View file

@ -45,11 +45,6 @@
// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
#define HAS_MCP3426_ADC
// Opulo Lumen uses the CPU serial number
#ifdef STM32F4
#define HAS_STM32_UID 1
#endif
//
// Servos
//

View file

@ -45,11 +45,6 @@
// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
#define HAS_MCP3426_ADC
// Opulo Lumen uses the CPU serial number
#ifdef STM32F4
#define HAS_STM32_UID 1
#endif
//
// Servos
//

View file

@ -100,7 +100,7 @@ extends = stm32_variant
board = marlin_opulo_lumen_rev3
build_flags = ${stm32_variant.build_flags}
-DARDUINO_BLACK_F407VE
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
extra_scripts = ${stm32_variant.extra_scripts}
#
@ -111,7 +111,7 @@ extends = stm32_variant
board = marlin_opulo_lumen_rev4
build_flags = ${stm32_variant.build_flags}
-DARDUINO_BLACK_F407VE
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID
extra_scripts = ${stm32_variant.extra_scripts}
#