| 看各位高手讨论,不免心动,借机询问: 以下是stm32 usb库中的一段程序:
 /* Function Name  : Get_SerialNum.
 * Description    : Create the serial number string descriptor.
 * Input          : None.
 * Output         : None.
 * Return         : None.
 */
 void Get_SerialNum(void)
 {
 uint32_t Device_Serial0, Device_Serial1, Device_Serial2;
 
 Device_Serial0 = *(__IO uint32_t*)(0x1FFFF7E8);        //器件电子签名的首地址
 Device_Serial1 = *(__IO uint32_t*)(0x1FFFF7EC);
 Device_Serial2 = *(__IO uint32_t*)(0x1FFFF7F0);
 
 Device_Serial0 += Device_Serial2;
 
 if (Device_Serial0 != 0)
 //这是否意味着电子签名还是有一定规律的?或都只是我乱猜?或都是写这个例子的人有点偷懒?
 
 {
 IntToUnicode (Device_Serial0, &Joystick_StringSerial[2] , 8);
 IntToUnicode (Device_Serial1, &Joystick_StringSerial[18], 4);
 }
 }
 |