You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// general form for accessing the `lcd_enabled` bit of the `LcdControl` type in the `a` register.
a.LcdControl.lcd_enabled
// assign `a` the value of `LcdControl` with `lcd_enabled` set (and no other bits set)
a = LcdControl { lcd_enabled }
// set or clear a specific bit
a.LcdControl.lcd_enabled = true
a.LcdControl.lcd_enabled = false
// branch on the bit being set
if a.LcdControl.lcd_enabled {
foo()
}
// branch on the bit being clear
if not a.LcdControl.lcd_enabled {
bar()
}
We need to somehow support structs where each bit controls a thing.
Example using the LCD Control:
Each bit controls one thing.
We need a syntax that lets the user make values of these types for loading into a register
and also a syntax that lets the user check or edit a value
Ideally users would be able to define their own types as well, but that's probably a longer term goal.
The text was updated successfully, but these errors were encountered: