static void hal_read_chipId(unsigned char *p)
{
unsigned char *pIDStart=(unsigned char *)(STM32ADD_CHIP_ID);
for(unsigned char i=0;i<12;i++)
*p++=*pIDStart++;
}
static uint16_t hal_read_chipsize(unsigned short *p)
{
unsigned short size;
size =*(unsigned short *)(STM32ADD_CHIP_FLASHSIZE);
*p = size;
return *p;
}
hal_read_chipId(info.flash.uid); hal_read_chipsize(&info.flash.size); |