# 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 "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" # Bit 18:19: append html "" # Bit 16:17: append html "" # Bit 6/8 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 "
Virtual Probe => TRGOUTTRGOUT/GPIO ModeLVDS GPIO ModeLVDS I/O 18..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 }