Copyright | (c) Marc Fontaine 2017 |
---|---|
License | BSD3 |
Maintainer | Marc.Fontaine@gmx.de |
Stability | experimental |
Portability | GHC-only |
Safe Haskell | None |
Language | Haskell2010 |
This module shows an example for using the analog digital converter. The ADC of the STM32 works best in combination with DMA transfers. This example turns the STM32 into a small digital storage oscilloscope. Thanks to DMA transfers, one can sample with precise timings and sampling rate is not limited by the speed of the Haskell code.
- adc3channel :: IO ()
- sampleBlock :: FilePath -> IO ()
Documentation
adc3channel :: IO () Source #
sampleBlock :: FilePath -> IO () Source #
Periodically sample a block of data and write it to a file. In combination with a wave-form viewer that can detect file updates, this works as a poor mans' digital storage oscilloscope.