semf
semf::AnalogInDma Class Referenceabstract

Interface for using ADC (Analog to Digital Conversion) hardware in DMA (Direct Memory Access) mode. More...

#include <analogindma.h>

Inheritance diagram for semf::AnalogInDma:
Inheritance graph
Collaboration diagram for semf::AnalogInDma:
Collaboration graph

Public Member Functions

virtual ~AnalogInDma ()=default
 
virtual void start (uint8_t buffer[], size_t bufferSize)=0
 Starts the hardware modules (ADC with DMA) for reading ADC values. More...
 
virtual void stop ()=0
 

Public Attributes

Signal dataAvailable
 
Signal< Errorerror
 

Detailed Description

Interface for using ADC (Analog to Digital Conversion) hardware in DMA (Direct Memory Access) mode.

Inheriting class handles a hardware unit with one or more channels.

dataAvailble signal is emitted after all channels are converted.

Definition at line 25 of file analogindma.h.

Constructor & Destructor Documentation

◆ ~AnalogInDma()

virtual semf::AnalogInDma::~AnalogInDma ( )
virtualdefault

Member Function Documentation

◆ start()

virtual void semf::AnalogInDma::start ( uint8_t  buffer[],
size_t  bufferSize 
)
pure virtual

Starts the hardware modules (ADC with DMA) for reading ADC values.

Parameters
bufferBuffer where the read data should be stored.
bufferSizeSize of buffer in bytes.

Implemented in semf::Stm32AnalogInDma.

◆ stop()

virtual void semf::AnalogInDma::stop ( )
pure virtual

Stops the ADC hardware.

Implemented in semf::Stm32AnalogInDma.

Member Data Documentation

◆ dataAvailable

Signal semf::AnalogInDma::dataAvailable

Signal is emitted after readData function is executed.

Definition at line 40 of file analogindma.h.

◆ error

Signal<Error> semf::AnalogInDma::error

Signal is emitted after an hardware error occurred.

Definition at line 42 of file analogindma.h.