peary::hal::VoltageProvider

A resource which can read a voltage level.

#include <peary/hal/Resources.hpp>

Inherits from peary::hal::Resource

Inherited by peary::board::carboard::ADCInput, peary::board::carboard::VoltageRegulator

Public Functions

Name
virtual double getVoltage() =0Read the voltage this resource has access to.

Additional inherited members

Public Functions inherited from peary::hal::Resource

Name
virtual ~Resource() =defaultDefault constructor.
void setName(std::string_view name)Set the name of the resource.
std::string name() constGet the name of the resource.

Protected Attributes inherited from peary::hal::Resource

Name
std::string _name

Public Functions Documentation

function getVoltage

  virtual double getVoltage() =0
  

Read the voltage this resource has access to.

Return: Voltage level associated with this resource

Reimplemented by: peary::board::carboard::ADCInput::getVoltage, peary::board::carboard::VoltageRegulator::getVoltage

Purely virtual function to be implemented by the actual resource class


Updated on 2026-01-16 at 00:29:06 +0100