Compare commits

...

2 Commits
master ... V12

Author SHA1 Message Date
Yunhorn 741958d525 upgrade from V12 to V13 2023-10-10 14:55:27 +08:00
Yunhorn de31f9afc7 recovered from old STM32WLV12 2023-10-10 14:43:32 +08:00
4 changed files with 98 additions and 8 deletions

6
.extSettings Normal file
View File

@ -0,0 +1,6 @@
[ProjectFiles]
HeaderPath=..\..\..\..\..\..\Drivers\BSP\STM32WLxx_Nucleo
[Others]
[Groups]
Drivers/BSP/STM32WLxx_Nucleo=../../../../../../Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo.c; ../../../../../../Drivers/BSP/STM32WLxx_Nucleo/stm32wlxx_nucleo_radio.c
Doc=../readme.txt;

86
.gitignore vendored Normal file
View File

@ -0,0 +1,86 @@
# ---> C
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
*.e1f
*.axf
*.de
*.cyclo
*.list
*.mk
# Linker output
*.ilk
*.map
*.exp
*.list
*.su
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
*.axf
*.dep
*.d
*.o
*.dp
*.lst
*.build_log
*.build_log.htm
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
*.dbgconf
*.uvguix.lenovo
*.uvoptx
*.uvprojx
*.build_log.htm
*.htm
*.map
*.lnp
*.sct
*.crf
*.lst
# Kernel Module Compile Results
*.mod*
*.cmd
*.htm
*.html
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

View File

@ -100,7 +100,7 @@ void GetUniqueId(uint8_t *id);
* @brief callback to get the board 32 bits unique ID (LSB)
* @retval devAddr Device Address
*/
uint32_t GetDevAddr(void);
void GetDevAddr(uint32_t *devAddr);
/* USER CODE BEGIN EFP */

View File

@ -235,23 +235,21 @@ void GetUniqueId(uint8_t *id)
/* USER CODE END GetUniqueId_2 */
}
uint32_t GetDevAddr(void)
{
uint32_t val = 0;
void GetDevAddr(uint32_t *devAddr)
{
/* USER CODE BEGIN GetDevAddr_1 */
/* USER CODE END GetDevAddr_1 */
val = LL_FLASH_GetUDN();
if (val == 0xFFFFFFFF)
*devAddr = LL_FLASH_GetUDN();
if (*devAddr == 0xFFFFFFFF)
{
val = ((HAL_GetUIDw0()) ^ (HAL_GetUIDw1()) ^ (HAL_GetUIDw2()));
*devAddr = ((HAL_GetUIDw0()) ^ (HAL_GetUIDw1()) ^ (HAL_GetUIDw2()));
}
/* USER CODE BEGIN GetDevAddr_2 */
/* USER CODE END GetDevAddr_2 */
return val;
}