EasyManua.ls Logo

Cybernet IPC-R1ix - D. Access ECS-7800-PoE GPIO Port; E. WDT ON;OFF and Timer-Counter Setting

Cybernet IPC-R1ix
94 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
82
Appendix B
D. Start to Access the ECS-7800-PoE GPIO Port
Please refer to source code for set_data() and get_data() function.
Write data to GPO(output) port
set_data( Register Index , update_value);
example :
unsigned char data = 0x82;
set_data( 0xE5 , data);
//Set bit 7 & bit 1 of GPO output port as High level ,another bit is Low
Please refer to source code for set_data() and get_data() function.
Read data to GPI(input) port
get_data( Register Index ) //It will return a BYTE value.
example :
unsigned char data
get_data( 0xF1 , data);
//Get GPI(input) port status on input_data variable.
E. WDT ON/OFF and Timer-Counter setting
Refer to GPIO setting of Step A and B. , located Logical 0x08 for WDT function.
Reg [0x30] is WatchDog ON/OFF control.
WatchDog On : set_data( 0x30 , 0x01);
WatchDog Off : set_data( 0x30 , 0x00);
Reg [0xF0] is WatchDog timer - counterON/OFF control.
WatchDog counter start : set_data( 0xF0 , 0x02);
WatchDog counter start : set_data( 0xF0 , 0x00);
Reg [0xF1] is WatchDog time-out value, "Reading" this register returns the
current value in the Watch Dog Counter, not the Watch Dog Timer Time-out
value..
WatchDog time-out value : set_data( 0xF1 , );

Related product manuals