setting individual bit fields

2023-01-08 Thread ElegantBeef
Here is a much cleaner version of the code: import std/setutils type DataLine* {.size: sizeof(cint).} = enum D0 D1 D2 D3 D4 D5 D6 D7 DataLines = set[DataLine] const dataLineVals = [ D

setting individual bit fields

2023-01-08 Thread ecarl42
I am setting an 8 bit field (set) where each bit is constructed individually. For the `readDataLinesFromPads` proc, is using the `if` and calling the `.incl` and `.excl` on each bit in the set the best way to approach this? const # data bus pad index db0 = 1005 db