리크 테스트 gui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include "dask.h"
void main(int argc, char* argv[])
{
I16 err, card;
U16 card_num;
char fWriteEE;
printf("This sample auto-calibrates itself, and you can write the calibration constants to EEPROM.\n");
printf("\nPlease input a card number:");
scanf(" %hd", &card_num);
if ((card = Register_Card(PCI_9221, card_num)) <0 ) {
printf("Register_Card error=%d", card);
exit(1);
}
printf("\nPress any key to start auto-calibration\n");
getch();
printf("\nAuto-calibration... it may take some minutes.\n");
err = PCI_DB_Auto_Calibration_ALL(card);
if(err < 0){
printf("Auto-Calibration failed: %d\n", err);
Release_Card(card);
exit(1);
}
printf("\nAuto-Calibration finish...\n");
printf("\nWrite calibration constant to EEPROM?\n");
printf("press 'y' for YES, and others for NO: ");
scanf(" %c", &fWriteEE);
if((fWriteEE=='y')||(fWriteEE=='Y')){
err = PCI_EEPROM_CAL_Constant_Update(card, EEPROM_USER_BANK1);
if(err < 0){
printf("Write EEPROM Error: %d\n", err);
Release_Card(card);
exit(1);
}
printf("\nWrite EEPROM finish...\n");
}
printf("press any key to exit.\n");
getch();
Release_Card(card);
return;
}