# This is the register Channel n Status 0x1n88 (read only) for {set i 0} {$i < 8} {incr i} { variable Ch$i.Status 0 variable Ch$i.Status.b8 0 variable Ch$i.Status.b7 0 variable Ch$i.Status.b6 0 variable Ch$i.Status.b5 0 variable Ch$i.Status.b2 0 variable Ch$i.Status.b1 0 variable Ch$i.Status.b0 0 } proc GetChStatus {} { for {set i 0} {$i < 8} {incr i} { variable Ch$i.Status variable Ch$i.Status.b8 variable Ch$i.Status.b7 variable Ch$i.Status.b6 variable Ch$i.Status.b5 variable Ch$i.Status.b2 variable Ch$i.Status.b1 variable Ch$i.Status.b0 set Ch$i.Status [ReadRegister Ch$i.Status] set Ch$i.Status.b8 [expr ([set Ch$i.Status] >> 8) & 1] set Ch$i.Status.b7 [expr ([set Ch$i.Status] >> 7) & 1] set Ch$i.Status.b6 [expr ([set Ch$i.Status] >> 6) & 1] set Ch$i.Status.b5 [expr ([set Ch$i.Status] >> 5) & 1] set Ch$i.Status.b2 [expr ([set Ch$i.Status] >> 2) & 1] set Ch$i.Status.b1 [expr ([set Ch$i.Status] >> 1) & 1] set Ch$i.Status.b0 [expr [set Ch$i.Status] & 1] } } proc DrawChStatus {} { 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 "" for {set i 0} {$i < 8} {incr i} { append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" append html "" } append html "
ChannelChannel Over temperatureChannel power downCalibration doneBuffer free errorChannel n ADC BusyMemory emptyMemory full
$i" 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 }