/******************************************************************************* * Function Name : Get_SerialNum. * Description : Create the serial number string descriptor. * Input : None. * Output : None. * Return : None. *******************************************************************************/ void Get_SerialNum(void) { u32 Device_Serial0, Device_Serial1, Device_Serial2;
Device_Serial0 = *(vu32*)(0x1FFFF7E8); //12 Bytes Serial Number Device_Serial1 = *(vu32*)(0x1FFFF7EC); Device_Serial2 = *(vu32*)(0x1FFFF7F0);
if (Device_Serial0 != 0) { LOADER_StringSerial[2] = (u8)(Device_Serial0 & 0x000000FF); LOADER_StringSerial[4] = (u8)((Device_Serial0 & 0x0000FF00) >> 8); LOADER_StringSerial[6] = (u8)((Device_Serial0 & 0x00FF0000) >> 16); LOADER_StringSerial[8] = (u8)((Device_Serial0 & 0xFF000000) >> 24);
LOADER_StringSerial[10] = (u8)(Device_Serial1 & 0x000000FF); LOADER_StringSerial[12] = (u8)((Device_Serial1 & 0x0000FF00) >> 8); LOADER_StringSerial[14] = (u8)((Device_Serial1 & 0x00FF0000) >> 16); LOADER_StringSerial[16] = (u8)((Device_Serial1 & 0xFF000000) >> 24);
LOADER_StringSerial[18] = (u8)(Device_Serial2 & 0x000000FF); LOADER_StringSerial[20] = (u8)((Device_Serial2 & 0x0000FF00) >> 8); LOADER_StringSerial[22] = (u8)((Device_Serial2 & 0x00FF0000) >> 16); LOADER_StringSerial[24] = (u8)((Device_Serial2 & 0xFF000000) >> 24); } }
|