85
Appendix B
B
APPENDIX B : GPIO-WDT Functions
B.1 1 ECS4K5.Dll API
BOOL Initial(BYTE Isolate_Type, BYTE DIO_NPN);
Install driver and initial machine for DIO access
Isolate_Type: DIO Isolate Type
1: Isolated DIO; 0: Non-Isolated DIO
DIO_NPN: DIO NPN mode
1: PNP (Source) mode for European rule; 0: NPN (Sink) mode for Japanese
rule
Return:
TRUE (1): Success; FALSE (0): Fail (Install error (privilege error, or driver not
work), or Initial error, or Parameter format error)
BOOL GetDIO1Config(BYTE *Isolate_Type, BYTE *DI_NPN, BYTE *DO_
NPN, WORD *Mask);
Get DIO1 configuration
Isolate_Type: DIO1 Isolate Type
1: Isolated DIO; 0: Non-Isolated DIO
DI_NPN: Isolate DIO1 input NPN mode (DI_NPN[7:0])
1: PNP (Source) mode for European rule; 0: NPN (Sink) mode for Japanese
rule
DO_NPN: Isolate DIO1 output NPN mode
1: PNP (Source) mode for European rule; 0: NPN (Sink) mode for Japanese
rule
Mask: Non-isolate DIO1 out enable mask (Mask[15:0])
1: output setup; 0: input setup
Return:
TRUE (1): Success; FALSE (0): Fail (driver not work, or hardware problem)
BOOL SetDIO1Config(BYTE Isolate_Type, BYTE DI_NPN, BYTE DO_NPN,
WORD Mask);
Set DIO1 configuration
Isolate_Type: DIO1 Isolate Type
1: Isolated DIO; 0: Non-Isolated DIO
DI_NPN: Isolate DIO1 input NPN mode (DI_NPN[7:0])
1: PNP (Source) mode for European rule; 0: NPN (Sink) mode for Japanese
rule
DO_NPN: Isolate DIO1 output NPN mode
1: PNP (Source) mode for European rule; 0: NPN (Sink) mode for Japanese
rule