Copyright | (c) Marc Fontaine 2017 |
---|---|
License | BSD3 |
Maintainer | Marc.Fontaine@gmx.de |
Stability | experimental |
Portability | GHC-only |
Safe Haskell | None |
Language | Haskell2010 |
In this example the controller reads chars from the USART and writes them to a RAM buffer using DMA.
- readCommDMA :: IO ()
- uartRingBuffer :: IO ()
- parseSlot :: Get (Char, Bool)
Documentation
readCommDMA :: IO () Source #
Initialize the Hardware and keep polling the DMA Buffer. This loops for ever but the DMA transfer is only oneshot. (after the buffer is full nothing interesting happens)
uartRingBuffer :: IO () Source #
Initialize the Hardware and keep polling the DMA Buffer. This function uses a ring buffer that wraps over when filled up. In this example DMA controller reads Bytes (8 Bit) from the UART and writes half words (16 Bit) to then RAM or in other words it transfers a char and clears out the next byte to flag that this position in the buffer has been written.