System Installation
PEB-2771VG2A/PEB-2781VG2A User’s Manual
3-6
enter_Superio2_CFG();
// 87 87
/* CR2A B7 = 1 selet GPIO Port 1*/
d2 = Get_CFG2(0x2A);
d2 = (d2 & 0x7F) | 0x80;
Set_CFG2(0x2A, d2);
/* IO test loop 1 */
/* Set GPIO Port 5 Enable */
Set_CFG2(0x07, 0x08); /* Select logic device 08*/
Set_CFG2(0x30, 0x02); /* Enable GPIO Port 5 */
//--------------------------------------------------------------------------------------------------------
// GPIO50->57
// GPIO51->56
// GPIO52->55
// GPIO53->54
//--------------------------------------------------------------------------------------------------------
/* Set GPIO Port 5 of Superio2 Enable */
Set_CFG2(0x07, 0x08); /* Select logic device 08*/
Set_CFG2(0xE0, 0xF0); /* GPIO Port 5 is [11110000], 0: output, 1:input */
Set_CFG2(0xE2, 0x00); /* GPIO Port 5 is non-inversed*/
delay(2);
Set_CFG2(0x07, 0x08); /* Select logic device 08*/
Set_CFG2(0xE1, 0x0F); /* GP50~53 of Superio2 -> GP57~54 of Superio2 */
delay(100);
Set_CFG2(0x07, 0x08); /* Select logic device 08*/
d2 = Get_CFG2(0xE1); /* get GPIO Port 6 data */
//printf("\n%x",d2);
if ((d2&0xFF) == 0x0F ){
printf("\n GPIO[50,51,52,53]->[57,56,55,54] test ok!");
}
else{
printf("\n GPIO[50,51,52,53]->[57,56,55,54] test fail!");
}
return(0);
}
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from