A.2 program gpio function to input, Program gpio function to input – ADLINK AmITX-IB-I User Manual
Page 69
Advertising
Super IO Programming Guide
57
AmITX-IB-I
A.2 Program GPIO Function to Input
// before SIO programming, must enter config mode. //
SIOEnterConfig(); Enter SIO configure mode.
// bIndex = 07h as logical device selection register.
// bValue = 07h as logical device number (QM67 uses
GPIO 6)
SIOWrite(0x07, 0x07); Select to Logical Device 7
// bIndex = F4h as control register
// bValue = FFh as input enabled.
SIOWrite(0xF4, 0xFF); set all GPI/O to input
Read back GPIO Input Status
// bIndex = F5h as input register.
bValue = SIORead(0xF5); read back input register
// bValue = GPI/O input status.
// after SIO programming, must exit config mode. //
SIOExitConfig(); Exit SIO configure mode.
Advertising