# This is the module register Channel Enable Mask 0x8120 variable ChEnable 0 for {set i 0} {$i < 8} {incr i} {variable ChEnable$i 0} proc GetChEnable {} { variable ChEnable for {set i 0} {$i < 8} {incr i} {variable ChEnable$i} set ChEnable [ReadRegister ChEnable] for {set i 0} {$i < 8} {incr i} {set ChEnable$i [expr ($ChEnable >> $i) & 1]} } proc SetChEnable {} { variable ChEnable for {set i 0} {$i < 8} {incr i} {variable ChEnable$i} set ChEnable 0 for {set i 0} {$i < 8} {incr i} {set ChEnable [expr $ChEnable + ([set ChEnable$i] << $i)]} WriteRegister ChEnable $ChEnable } proc DrawChEnable {} { set 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 "
Channel #Channel Enabled
$i" append html "" append html "
" append html "

" return $html }