This commit is contained in:
Bertrand Songis
2016-01-29 16:11:51 +01:00
parent 364bf6ac23
commit 7ebebb312a
7 changed files with 50 additions and 14 deletions
@@ -39,6 +39,16 @@ void watchdogInit(unsigned int duration)
IWDG->KR = 0xCCCC ; // start
}
void getCPUUniqueID(char * s)
{
uint32_t * cpu_uid = (uint32_t *)0x1FFF7A10;
char * tmp = strAppendNumber(s, cpu_uid[0], 8, 16);
*tmp = ' ';
tmp = strAppendNumber(tmp+1, cpu_uid[1], 8, 16);
*tmp = ' ';
strAppendNumber(tmp+1, cpu_uid[2], 8, 16);
}
// Starts TIMER at 2MHz
void init2MhzTimer()
{
@@ -144,6 +144,10 @@ void delay(uint32_t ms);
}
#endif
// CPU Unique ID
#define LEN_CPU_UID (3*8+2)
void getCPUUniqueID(char * s);
// SD driver
#if !defined(SIMU) || defined(SIMU_DISKIO)
uint32_t sdIsHC(void);