kansas-lava-cores-0.1.2.1: FPGA Cores Written in Kansas Lava.

Safe HaskellNone
LanguageHaskell2010

Hardware.KansasLava.Text

Synopsis

Documentation

mm_text_driver :: forall c sig row col loc. (Clock c, sig ~ Signal c, Rep loc, Rep row, Rep col, Size row, Size col, Rep (MUL row col), Num (MUL row col), Size (MUL row col)) => Matrix (row, col) U8 -> (loc -> (row, col)) -> Patch (sig (Enabled (loc, U8))) (sig (Enabled ((row, col), U8))) (sig Ack) (sig Ack) Source

mm_text_driver is a memory-mapped driver for a (small) display. It gets passed the background "image", and the mapping from active location number to row,col on the screen. It outputs values sutable for input into the LCD mm drivers.

aliveGlyph :: forall c sig. (Clock c, sig ~ Signal c) => Patch (sig (Enabled ())) (sig (Enabled (X1, U8))) (sig Ack) (sig Ack) Source

Simple digit counter.

scrollBar :: forall c sig x comb. (Clock c, sig ~ Signal c, Size x, Bounded x, Num x, Enum x, Rep x) => Patch (sig (Enabled U8)) (sig (Enabled (x, U8))) (sig Ack) (sig Ack) Source

In a scrollbar, what ever you write appears on the right hand side, pushing everything to the left.

hexForm :: forall c sig w. (Clock c, sig ~ Signal c, Size (MUL X4 w), Integral (MUL X4 w), Integral w, Bounded w, Rep w, Size w) => Patch (sig (Enabled (Unsigned (MUL X4 w)))) (sig (Enabled (w, U8))) (sig Ack) (sig Ack) Source

ordU8 :: Char -> U8 Source

ord for U8.

chrU8 :: U8 -> Char Source

chr for U8.

rowU8 :: Size x => String -> Matrix x U8 Source

Turn a string into a 1D matrix

boxU8 :: forall x row col. (Size x, Size row, Num row, Enum row, Size col, Num col, Enum col, x ~ MUL row col) => [String] -> Matrix x ((row, col), U8) Source

Turn a string into a 2D matrix, ready for background.

boxU8' :: forall row col. (Size row, Num row, Enum row, Size col, Num col, Enum col) => [String] -> Matrix (row, col) U8 Source