mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-19 08:17:36 +00:00
Wio-e5 wip (#2265)
* Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * Wio-e5 / STM32WL wip * Stubbing some FS stuff out * LittleFS compiles. Can't check with actual device. * make cppcheck happy again * Guard against accelerometer thread * Missed a spot * Upload via ST-LINK * Derive MAC address from UID * upload port * Trunk it * Guard it * Maybe fix the cache error on startup. * Latest RadioLib ref to fix SubGHZ * revert nasty Sub-GHz Hack * Boots and radio inits with RadioLib 6.0, LittleFS doesn't seem to work --------- Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com> Co-authored-by: GUVWAF <thijs@havinga.eu>
This commit is contained in:
@@ -11,8 +11,18 @@ void updateBatteryLevel(uint8_t level) {}
|
||||
|
||||
void getMacAddr(uint8_t *dmac)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
dmac[i] = i;
|
||||
// https://flit.github.io/2020/06/06/mcu-unique-id-survey.html
|
||||
const uint32_t uid0 = HAL_GetUIDw0(); // X/Y coordinate on wafer
|
||||
const uint32_t uid1 = HAL_GetUIDw1(); // [31:8] Lot number (23:0), [7:0] Wafer number
|
||||
const uint32_t uid2 = HAL_GetUIDw2(); // Lot number (55:24)
|
||||
|
||||
// Need to go from 96-bit to 48-bit unique ID
|
||||
dmac[5] = (uint8_t)uid0;
|
||||
dmac[4] = (uint8_t)(uid0 >> 16);
|
||||
dmac[3] = (uint8_t)uid1;
|
||||
dmac[2] = (uint8_t)(uid1 >> 8);
|
||||
dmac[1] = (uint8_t)uid2;
|
||||
dmac[0] = (uint8_t)(uid2 >> 8);
|
||||
}
|
||||
|
||||
void cpuDeepSleep(uint32_t msecToWake) {}
|
||||
|
||||
Reference in New Issue
Block a user