Example Program (C Language) - Advantech AIIS-1200 User Manual

Embedded ipc
Hide thumbs Also See for AIIS-1200:
Table of Contents

Advertisement

B.1.3

Example Program (C Language)

#if NCT6106D_DIGITAL_IO_PRESENT
UINT8
Data;
UINT8
InputValue=0;
UINT8
OutputValue=0;
if(SetupData->NCT6106DDIO == 0x01) {
if(SetupData->NCT6106DDIO1 == 0x00){
InputValue |= 0x01;
} else if (SetupData->NCT6106DDIO1 == 0x01) {
OutputValue |= 0x01;
}
if(SetupData->NCT6106DDIO2 == 0x00){
InputValue |= 0x02;
} else if (SetupData->NCT6106DDIO2 == 0x01) {
OutputValue |= 0x02;
}
if(SetupData->NCT6106DDIO3 == 0x00){
InputValue |= 0x04;
} else if (SetupData->NCT6106DDIO3 == 0x01) {
OutputValue |= 0x04;
}
if(SetupData->NCT6106DDIO4 == 0x00){
InputValue |= 0x08;
} else if (SetupData->NCT6106DDIO4 == 0x01) {
OutputValue |= 0x08;
}
if(SetupData->NCT6106DDIO5 == 0x00){
InputValue |= 0x10;
} else if (SetupData->NCT6106DDIO5 == 0x01) {
OutputValue |= 0x10;
}
if(SetupData->NCT6106DDIO6 == 0x00){
InputValue |= 0x20;
} else if (SetupData->NCT6106DDIO6 == 0x01) {
OutputValue |= 0x20;
}
if(SetupData->NCT6106DDIO7 == 0x00){
InputValue |= 0x40;
AIIS-1200 User Manual
//AIIS1200-X009_1
58

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AIIS-1200 and is the answer not in the manual?

Questions and answers

Table of Contents