Safe Haskell | None |
---|
- data Reg t
- class IvoryBits a => IvoryIOReg a
- mkReg :: forall t. IvoryIOReg t => Integer -> Reg t
- readReg :: IvoryIOReg a => Reg a -> Ivory eff a
- writeReg :: IvoryIOReg a => Reg a -> a -> Ivory eff ()
- data BitDataReg d
- mkBitDataReg :: IvoryIOReg (BitDataRep d) => Integer -> BitDataReg d
- getReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> Ivory eff d
- setReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a
- modifyReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff a
I/O Registers
class IvoryBits a => IvoryIOReg a Source
mkReg :: forall t. IvoryIOReg t => Integer -> Reg tSource
Smart constructor that ensures a register address is in bounds when created. This raises an error if the address is invalid.
readReg :: IvoryIOReg a => Reg a -> Ivory eff aSource
Read an I/O register, returning an Ivory value.
writeReg :: IvoryIOReg a => Reg a -> a -> Ivory eff ()Source
Write an I/O register from an Ivory value.
Bit Data I/O registers
data BitDataReg d Source
A register associated with a bit data type.
mkBitDataReg :: IvoryIOReg (BitDataRep d) => Integer -> BitDataReg dSource
Create a bit data register given its address.
getReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> Ivory eff dSource
setReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff aSource
Set a register to a value taken from a block of bit modifications. The previous value is discarded.
modifyReg :: (BitData d, IvoryIOReg (BitDataRep d)) => BitDataReg d -> BitDataM d a -> Ivory eff aSource
Modify a register by a set of bit modification actions.