/* ** Global struct to pass digital input data. */ typedef struct dimstruct { unsigned int stat; unsigned int data; } DIM_TS;