22
Programming Watchdog Timer
Embedded and Industrial Computing
Appendix A
To verify the GPIO driver installation, do the following
steps:
Right-click on the My Computer icon, and then select
1.
Properties form the menu.
Click the Hardware tab, then click the Device Manager
2.
button.
Select
3.
View
from the menu and select
show hidden
devices
.
The Lanner common GPIO driver should be listed
4.
under the Non-Plug and Play Drivers. If not, click the
San for hardware changes
button from the tool bar.
Sample Program
You can write your own program by modifying the source
code F81865_Test.cpp.. The index address is 2EH.
/////////////////////////////////////////////////////////////////////
////
// F81865_Test.cpp : F81865_test.exe utility for F81865.lib
APIs demonstration.
//
// History:
//
7/15/2011
Brand
new
F81865_test
program.
#include <winsock2.h>
#include “Windows.h”
#include “stdio.h”
#include “F81865.h”
#define PARAMETER_HELP
“\n”\
“The F81865 GPIO utility of Lanner\n”\
“-------------------------------------\n”\
“Usage:\n”\
“ F81865_test DIO_IN port_
number\n”\
“ F81865_test DIO_OUT port_number
value\n”\
“ F81865_test PIO port_number
value\n”\
“ F81865_test RunLED port_number
value\n”\
“ F81865_test AlarmLED port_number
value\n”\
“ F81865_test GPS_LED port_number
value\n”\
“ F81865_test WirelessLED port_number
value\n”\
“ F81865_test WatchDog seconds\n”\
“ F81865_test CaseOpen\n”\
“ F81865_test CaseOpen_Clear\n”\