STM32-Zombie-0.1: control a STM32F103 microcontroller from Haskell

Copyright(c) Marc Fontaine 2017
LicenseBSD3
MaintainerMarc.Fontaine@gmx.de
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

App.DMABuffer

Description

In this example the controller reads chars from the USART and writes them to a RAM buffer using DMA.

Synopsis

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.