# This is the module register Front Panel I/O Control 0x811c variable FPIO 0 variable FPIO.B18 0 variable FPIO.B16 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.B18 variable FPIO.B16 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) & 7] set FPIO.B16 [expr ($FPIO >> 16) & 3] set FPIO.B18 [expr ($FPIO >> 18) & 3] } proc SetFPIO {} { variable FPIO variable FPIO.B18 variable FPIO.B16 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.B18] << 18) | \ ([set FPIO.B16] << 16) | \ ([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 {} { variable Name set html "" append html "
" append html "
| Virtual Probe => TRGOUT | " append html "TRGOUT/GPIO Mode | " append html "LVDS GPIO Mode | " append html "LVDS I/O 18..12 | " append html "LVDS I/O 11..8 | " append html "LVDS I/O 7..4 | " append html "LVDS I/O 3..0 | " append html "LVDS GPIO Output | " append html "LEMO I/O | " append html "
| " append html "" append html " | " # Bit 16:17: append html "" append html "" append html " | " # Bit 6/8 append html "" append html "" append html " | " # Bit 5 append html "" append html "" append html " | " # Bit 4: append html "" append html "" append html " | " # Bit 3: append html "" append html "" append html " | " # Bit 2: append html "" append html "" append html " | " # Bit 1: append html "" append html "" append html " | " # Bit 0: append html "" append html "" append html " | " append html "