From 6ec16c94d705d98dab55b33510c92df4a301bc46 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Fri, 27 Oct 2023 08:47:24 -0400 Subject: [PATCH] removed last DIAG i entered, off to test I2C --- DCCTimerGiga.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/DCCTimerGiga.cpp b/DCCTimerGiga.cpp index 00a0e94..bba353f 100644 --- a/DCCTimerGiga.cpp +++ b/DCCTimerGiga.cpp @@ -124,16 +124,17 @@ void DCCTimer::clearPWM() { void DCCTimer::getSimulatedMacAddress(byte mac[6]) { volatile uint32_t *serno1 = (volatile uint32_t *)UID_BASE; volatile uint32_t *serno2 = (volatile uint32_t *)UID_BASE+4; - + volatile uint32_t *serno3 = (volatile uint32_t *)UID_BASE+8; volatile uint32_t m1 = *serno1; volatile uint32_t m2 = *serno2; - mac[0] = m1 >> 8; - mac[1] = m1 >> 0; - mac[2] = m2 >> 24; - mac[3] = m2 >> 16; - mac[4] = m2 >> 8; - mac[5] = m2 >> 0; - DIAG(F("MAC: %P:%P:%P:%P:%P:%P"),mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]); + volatile uint32_t m3 = *serno3; + mac[0] = 0xBE; + mac[1] = 0xEF; + mac[2] = m1 ^ m3 >> 24; + mac[3] = m1 ^ m3 >> 16; + mac[4] = m1 ^ m3 >> 8; + mac[5] = m1 ^ m3 >> 0; + //DIAG(F("MAC: %P:%P:%P:%P:%P:%P"),mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]); } volatile int DCCTimer::minimum_free_memory=__INT_MAX__;