$ fl2k_test
Kernel mass storage driver is attached, detaching driver. This may take more than 10 seconds!
Reporting PPM error measurement every 10 seconds...
Press ^C after a few minutes.
real sample rate: 99647567 current PPM: -3524 cumulative PPM: -3524
real sample rate: 99909730 current PPM: -903 cumulative PPM: -2187
real sample rate: 99976679 current PPM: -233 cumulative PPM: -1527
real sample rate: 99994151 current PPM: -58 cumulative PPM: -1156
real sample rate: 100001137 current PPM: 11 cumulative PPM: -921
real sample rate: 100003392 current PPM: 34 cumulative PPM: -761
real sample rate: 100007238 current PPM: 72 cumulative PPM: -641
$ fl2k_test
Reporting PPM error measurement every 10 seconds...
Press ^C after a few minutes.
real sample rate: 100006806 current PPM: 68 cumulative PPM: 68
real sample rate: 100006831 current PPM: 68 cumulative PPM: 68
real sample rate: 100007186 current PPM: 72 cumulative PPM: 69
real sample rate: 100005995 current PPM: 60 cumulative PPM: 67
プログラム例
#include <windows.h>
#include<stdio.h>
int main()
{
HANDLE hComm;
int Status;
int n;
unsigned clockDivisor = 0;
hComm = CreateFile("COM1", //port name
GENERIC_READ | GENERIC_WRITE, //Read/Write
0, // No Sharing
NULL, // No Security
OPEN_EXISTING,// Open existing port only
0, // Non Overlapped I/O
NULL); // Null for Comm Devices
if (hComm == INVALID_HANDLE_VALUE)
printf("Error in opening serial port");
else {
printf("opening serial port successful");
for(n=0;n<100000;n++){ // ここのループでRF信号を放射
Status = EscapeCommFunction(hComm, SETRTS); // RTS ON
Status = EscapeCommFunction(hComm, CLRRTS); // RTS OFF
}
printf("Done...\n");
uSleep(5000000);
}
CloseHandle(hComm);//Closing the Serial Port
return 0;
}