SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::bsp::adc Class Referenceabstract

ADC device abstraction. More...

#include <adc.hpp>

Inheritance diagram for satnogs::comms::lib::bsp::adc:
satnogs::comms::adc_bsp satnogs::comms::lib::bsp::dummy_adc

Public Member Functions

 adc (uint16_t resolution, float vref)
 Construct a new ADC object.
virtual void start ()=0
 Starts the ADC.
virtual void stop ()=0
 Stops the ADC.
virtual uint32_t read ()=0
 Get the ADC value.
virtual float voltage ()
 Get the ADC voltage.
uint32_t resolution () const
 Get the ADC resolution.
float vref () const
 Get the ADC voltage reference.

Detailed Description

ADC device abstraction.

This class provides a generic ADC (Analog-to-Digital Converter) abstraction.

Warning
Depending on the target platform/RTOS users are expected to define a class that inherits this one and implement at least the pure virtual methods

Definition at line 38 of file adc.hpp.

Constructor & Destructor Documentation

◆ adc()

satnogs::comms::lib::bsp::adc::adc ( uint16_t resolution,
float vref )
inline

Construct a new ADC object.

Parameters
resolutionthe ADC resolution in number of bits
vrefthe reference voltage of the ADC in Volts

Definition at line 47 of file adc.hpp.

Member Function Documentation

◆ read()

virtual uint32_t satnogs::comms::lib::bsp::adc::read ( )
pure virtual

Get the ADC value.

Returns
uint32_t the ADC latest conversion

Implemented in satnogs::comms::adc_bsp.

◆ resolution()

uint32_t satnogs::comms::lib::bsp::adc::resolution ( ) const
inline

Get the ADC resolution.

Returns
uint32_t the ADC channel resolution

Definition at line 90 of file adc.hpp.

◆ start()

virtual void satnogs::comms::lib::bsp::adc::start ( )
pure virtual

Starts the ADC.

Implemented in satnogs::comms::adc_bsp.

◆ stop()

virtual void satnogs::comms::lib::bsp::adc::stop ( )
pure virtual

Stops the ADC.

Implemented in satnogs::comms::adc_bsp.

◆ voltage()

virtual float satnogs::comms::lib::bsp::adc::voltage ( )
inlinevirtual

Get the ADC voltage.

Returns
float the ADC latest voltage in V

Reimplemented in satnogs::comms::adc_bsp.

Definition at line 79 of file adc.hpp.

◆ vref()

float satnogs::comms::lib::bsp::adc::vref ( ) const
inline

Get the ADC voltage reference.

Returns
float the reference voltage in Volts

Definition at line 101 of file adc.hpp.


The documentation for this class was generated from the following file:
  • libsatnogs-comms/include/satnogs-comms-lib/bsp/adc.hpp