From f07640eaa13f7f4f9a969e39092ac893371a5b46 Mon Sep 17 00:00:00 2001 From: Graham Harrison Date: Thu, 22 May 2025 15:34:57 -0600 Subject: [PATCH] Update TMC5240.h #77 add undef to not conflict with other chips --- tmc/ic/TMC5240/TMC5240.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tmc/ic/TMC5240/TMC5240.h b/tmc/ic/TMC5240/TMC5240.h index 56815b14..e8603370 100644 --- a/tmc/ic/TMC5240/TMC5240.h +++ b/tmc/ic/TMC5240/TMC5240.h @@ -160,6 +160,30 @@ static const uint8_t tmc5240_registerAccess[TMC5240_REGISTER_COUNT] = 0x03, 0x01, 0x01, ____, 0x03, 0x01, 0x01, ____, ____, ____, ____, ____, ____, ____, ____, ____ // 0x70 - 0x7F }; +// Undefine the default register values. +// This prevents warnings in case multiple TMC-API chip headers are included at once +#undef R00 +#undef R0A +#undef R10 +#undef R11 +#undef R2A +#undef R2B +#undef R30 +#undef R3A +#undef R52 +#undef R60 +#undef R61 +#undef R62 +#undef R63 +#undef R64 +#undef R65 +#undef R66 +#undef R67 +#undef R68 +#undef R69 +#undef R6C +#undef R70 + /*******************************************************************************************************************************************************************/ #endif /* TMC_IC_TMC5240_H_ */