
Appendix
MPT-7000V User Manual
87
SetDioInputMask:
if ((*lpIsDioAvailable)(0))
{
int DioInput;
printf(" Test for digital IO ....\n");
//Please check digital IO setting in BIOS setup utility
//Here example as follow:
// Digital GPIO [1..3] = Input
// Digital GPIO [4..6] = Output
//set hardware information for GPIO chip
//bit 0..2 : input for GPIO_0 to GPIO_2
//bit 4..6 : output for GPIO_4 to GPIO_6
(*lpSetDioInputMask)(0x07);
(*lpSetDioOutputMask)(0x70);
DioInput = (*lpGetDioInput)(0);
printf(" Current GPIO_0 to GPIO_2 is 0x%X\n", DioInput);
while(1)
{
(*lpSetDioOutput)(0x00);
printf(" Set GPIO_4 to GPIO_6 to LOW\n");
(*lpSetDioOutput)(0x70);
printf(" Set GPIO_4 to GPIO_6 to HIGH\n");
(*lpSetDioOutput)(0x30);
printf(" Set GPIO_4 to GPIO_5 to HIGH\n");
(*lpSetDioOutput)(0x60);
printf(" Set GPIO_5 to GPIO_6 to HIGH\n");
Sleep(500);
if (_kbhit())
{
break;
}//if (kbhit())
}//while(1)
}//if ((*lpIsDioAvailable)(0))
Note:
Be sure to set up the input / output for GPIO bits in BIOS identically with
the GPIO hardware information above.