mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-12 09:47:54 +00:00
Merge 20cb173f8ea366486e7e1c27ac97fcefe350de3e into aa52bcee8cf3998723f12557cbbc616cfccc9f3b
This commit is contained in:
commit
24abe5790c
@ -1017,7 +1017,14 @@ static uint32_t random_id(uint16_t adress, uint8_t create_new)
|
||||
return id;
|
||||
}
|
||||
// Generate a random ID
|
||||
#if defined STM32_BOARD
|
||||
#define STM32_UUID ((uint32_t *)0x1FFFF7E8)
|
||||
if (!create_new)
|
||||
id = STM32_UUID[0] ^ STM32_UUID[1] ^ STM32_UUID[2];
|
||||
else
|
||||
#else
|
||||
id = random(0xfefefefe) + ((uint32_t)random(0xfefefefe) << 16);
|
||||
#endif
|
||||
for(uint8_t i=0;i<4;i++)
|
||||
{
|
||||
eeprom_write_byte((EE_ADDR)adress+i,id);
|
||||
|
@ -22,7 +22,9 @@
|
||||
/********************/
|
||||
//Uncomment one of the line below if you have a different module not based on the original Multi Atmega328p design which includes the 4-in-1.
|
||||
//If you don't know then leave them commented.
|
||||
//#define STM32_BOARD
|
||||
#ifdef __arm__
|
||||
#define STM32_BOARD
|
||||
#endif
|
||||
|
||||
|
||||
/*******************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user