// Copyright 2005 Doi Shigeki // list406.cpp LEDの点滅 // 〜PCCardを使った外部制御の基礎 // apidio.libをリンクすること #include #include #include"apidio.h" main() { HANDLE h; DWORD r; BYTE x; printf("PCCardのテスト2\n"); r = DioOpen( &h, // デバイスのハンドル 3, // Driver No 1 ); // Group No if ( r != 0) { printf("PCCardデバイスがオープンできません\n"); return 0; } printf("点滅動作,xボタンで強制終了\n"); x = 0; while( 1 ){ // ポート0 へ x を出力 DioOutByte( h, // デバイスハンドル  0, // 出力ポート0を指定 x ); // 出力データ x++; } DioClose( h ); // デバイスのクローズ }