//--------------------------------------------------------------------------- void __fastcall TRegisterFormClass::FormShow(TObject *Sender) { VM_START_WITHLEVEL(1) AnsiString HID = MD5(GetHardwareID()).UpperCase(); HIDEdit->Text = HID.SubString(1, 16) + "-" + HID.SubString(17, 16); VM_END }
int checkboard(void) { unsigned int ADCVaule = twl4030_get_ADCIN0_voltage(); twl4030_vadc_onoff(0); g_BoardID = GetHardwareID(ADCVaule); switch(g_BoardID) { case BOARD_ID_EVB: case BOARD_ID_PRO: printf("Board: PROTOTYPE (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_EVT1: printf("Board: EVT1 (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_EVT2: printf("Board: EVT2 (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_EVT3: printf("Board: EVT3 (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_DVT1: printf("Board: DVT1 (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_DVT2: printf("Board: DVT2 (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_PVT: printf("Board: PVT (ADC=%dmV)\n", ADCVaule); break; case BOARD_ID_MP: printf("Board: MP (ADC=%dmV)\n", ADCVaule); break; default: printf("Board: OMAP3621\n"); break; } return (0); }