Adlink AmITX-IB-I Manual de usuario Pagina 68

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 82
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 67
56 Super IO Programming Guide
A.1 Program GPIO Function to Output
// 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 = 00h as output enabled.
SIOWrite(0xF4, 0x00); Set all GPI/O to output.
GPIO Function to AllOutput High
// bIndex = F5h as output register
// bValue = FFh as output level high
SIOWrite(0xF4, 0x00); set all GPI/O to output.
GPIO function to All Output Low
// bIndex = F5h as output register
// bValue = 00h as output level high
SIOWrite(0xF5, 0x00); set all GPI/O to output.
GPIO function to Output High (GPIOx)
// bIndex = F5h as output register
bValue = SIORead(0xF5); read back output register
bValue |= 1 << x; x means GPIO number.
SIOWrite(0xF5, bValue); set GPI/Ox to output high.
GPIO function to Output Low (GPIOx)
// bIndex = F5h as output register
bValue = SIORead(0xF5); read back output register
bValue &= ~(1 << x); x means GPIO number
SIOWrite(0xF5, bValue); set GPI/Ox to output low.
// after SIO programming, must exit config mode. //
SIOExitConfig(); Exit SIO configure mode.
Vista de pagina 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 81 82

Comentarios a estos manuales

Sin comentarios