# This is the module register Front Panel I/O Control 0x811c variable FPIO 0 variable FPIO.B15 0 variable FPIO.B14 0 variable FPIO.B6 0 variable FPIO.B5 0 variable FPIO.B4 0 variable FPIO.B3 0 variable FPIO.B2 0 variable FPIO.B1 0 variable FPIO.B0 0 proc GetFPIO {} { variable FPIO variable FPIO.B15 variable FPIO.B14 variable FPIO.B6 variable FPIO.B5 variable FPIO.B4 variable FPIO.B3 variable FPIO.B2 variable FPIO.B1 variable FPIO.B0 set FPIO [ReadRegister FPIOControl] set FPIO.B0 [expr $FPIO & 1] set FPIO.B1 [expr ($FPIO >> 1) & 1] set FPIO.B2 [expr ($FPIO >> 2) & 1] set FPIO.B3 [expr ($FPIO >> 3) & 1] set FPIO.B4 [expr ($FPIO >> 4) & 1] set FPIO.B5 [expr ($FPIO >> 5) & 1] set FPIO.B6 [expr ($FPIO >> 6) & 3] set FPIO.B14 [expr ($FPIO >> 14) & 1] set FPIO.B15 [expr ($FPIO >> 15) & 1] } proc SetFPIO {} { variable FPIO variable FPIO.B15 variable FPIO.B14 variable FPIO.B6 variable FPIO.B5 variable FPIO.B4 variable FPIO.B3 variable FPIO.B2 variable FPIO.B1 variable FPIO.B0 set FPIO [expr \ ([set FPIO.B15] << 15) | \ ([set FPIO.B14] << 14) | \ ([set FPIO.B6] << 6) | \ ([set FPIO.B5] << 5) | \ ([set FPIO.B4] << 4) | \ ([set FPIO.B3] << 3) | \ ([set FPIO.B2] << 2) | \ ([set FPIO.B1] << 1) | \ ([set FPIO.B0])] WriteRegister FPIOControl $FPIO } proc DrawFPIO {} { set html "" append html "

" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" # Bit 15: append html "" # Bit 14: append html "" # Bit 6/7 append html "" # Bit 5 append html "" # Bit 4: append html "" # Bit 3: append html "" # Bit 2: append html "" # Bit 1: append html "" # Bit 0: append html "" append html "" append html "
TRGOUTTRGOUT Test ModeLVDS GPIO ModeLVDS I/O 15..12LVDS I/O 11..8LVDS I/O 7..4LVDS I/O 3..0LVDS GPIO OutputLEMO I/O
" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "
" append html "

" return $html }