diff --git a/arch/arm/src/stm32/stm32_uid.c b/arch/arm/src/stm32/stm32_uid.c index 52d9bd2ad4..d38447726f 100644 --- a/arch/arm/src/stm32/stm32_uid.c +++ b/arch/arm/src/stm32/stm32_uid.c @@ -33,14 +33,23 @@ * ************************************************************************************/ -#include -#include +/************************************************************************************ + * Included Files + ************************************************************************************/ -void stm32GetUniqueID(uint8_t uniqueID[12]) +#include +#include "stm32_uid.h" + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +void stm32_get_uniqueid(uint8_t uniqueid[12]) { - int i; - for(i=0; i<12; i++) - { - uniqueID[i] = *((uint8_t*)(STM32_SYSMEM_UID)+i); - } + int i; + + for (i = 0; i < 12; i++) + { + uniqueid[i] = *((uint8_t*)(STM32_SYSMEM_UID)+i); + } } diff --git a/arch/arm/include/stm32/stm32_uid.h b/arch/arm/src/stm32/stm32_uid.h similarity index 75% rename from arch/arm/include/stm32/stm32_uid.h rename to arch/arm/src/stm32/stm32_uid.h index 231f5b1a71..cfa0446110 100644 --- a/arch/arm/include/stm32/stm32_uid.h +++ b/arch/arm/src/stm32/stm32_uid.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/arm/include/stm32/stm32_uid.h + * arch/arm/src/stm32/stm32_uid.h * * Copyright (C) 2015 Marawan Ragab. All rights reserved. * Author: Marawan Ragab @@ -33,11 +33,19 @@ * ************************************************************************************/ -#ifndef __ARCH_ARM_INCLUDE_STM32_UID_H -#define __ARCH_ARM_INCLUDE_STM32_UID_H +#ifndef __ARCH_ARM_SRC_STM32_UID_H +#define __ARCH_ARM_SRC_STM32_UID_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ #include -void stm32GetUniqueID(uint8_t uniqueID[12]); +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ -#endif /* __ARCH_ARM_INCLUDE_STM32_UID_H */ +void stm32_get_uniqueid(uint8_t uniqueid[12]); + +#endif /* __ARCH_ARM_SRC_STM32_UID_H */