USB EPROM/Flash Programmer
Public Member Functions | List of all members
VddGenerator Class Reference

Voltage (VDD) Generator Class. More...

#include <vgenerator.hpp>

Inheritance diagram for VddGenerator:
Inheritance graph

Public Member Functions

 VddGenerator (const VGenerator *owner)
 Constructor. More...
 
void on ()
 Enables the output of the Voltage Generator. More...
 
void off ()
 Disables the output of the Voltage Generator. More...
 
void initCalibration (float reference=5.0f) override
 Starts the calibration process. More...
 
void onVpp (bool status=true)
 Sets/Resets the VDD on VPP pin. More...
 
bool isOnVpp () const
 Gets the VDD on VPP pin status. More...
 
virtual bool isRunning () const
 Returns if the Voltage Generator is running. More...
 
virtual void setV (float value)
 Sets the target output voltage of the Voltage Generator. More...
 
virtual float getVTarget () const
 Gets the target output voltage of the Voltage Generator. More...
 
virtual float getV () const
 Gets the current output voltage of the Voltage Generator. More...
 
virtual float getCalibration () const
 Returns the calibration value of the output of the Voltage Generator. More...
 
virtual float getDuty () const
 Gets the current duty cycle of the PWM. More...
 
virtual void saveCalibration (float measure)
 Finishes the calibration process. More...
 
virtual void toggle ()
 Toggles the output of the Voltage Generator. More...
 
virtual bool isOn () const
 Returns if output of the Voltage Generator is enabled. More...
 

Detailed Description

Voltage (VDD) Generator Class.

The purpose of this class is to provide the methods to manipulate a Voltage (VDD) Generator (based in a buck DC2DC converter and GPIO pins to control - on/off - the output).

Constructor & Destructor Documentation

◆ VddGenerator()

VddGenerator ( const VGenerator owner)
explicit

Constructor.

Parameters
ownerPointer to owner VGenerator object instance.

Member Function Documentation

◆ on()

void on ( )
virtual

Enables the output of the Voltage Generator.

Implements GenericGenerator.

◆ off()

void off ( )
virtual

Disables the output of the Voltage Generator.

Implements GenericGenerator.

◆ initCalibration()

void initCalibration ( float  reference = 5.0f)
overridevirtual

Starts the calibration process.

Sets the calibration value to zero, and sets the output voltage to value of the reference parameter.

Parameters
referenceCalibration target voltage, in Volts. Default: 5.0.

Reimplemented from GenericGenerator.

◆ onVpp()

void onVpp ( bool  status = true)

Sets/Resets the VDD on VPP pin.

Parameters
statusTrue to set pin, false to reset.

◆ isOnVpp()

bool isOnVpp ( ) const

Gets the VDD on VPP pin status.

Returns
The pin status.

◆ isRunning()

bool isRunning ( ) const
virtualinherited

Returns if the Voltage Generator is running.

Returns
True if Voltage Generator is running, false otherwise.

◆ setV()

void setV ( float  value)
virtualinherited

Sets the target output voltage of the Voltage Generator.

Parameters
valueTarget output voltage, in Volts.

◆ getVTarget()

float getVTarget ( ) const
virtualinherited

Gets the target output voltage of the Voltage Generator.

Returns
Target output voltage, in Volts.

◆ getV()

float getV ( ) const
virtualinherited

Gets the current output voltage of the Voltage Generator.

Returns
Current output voltage, in Volts.

◆ getCalibration()

float getCalibration ( ) const
virtualinherited

Returns the calibration value of the output of the Voltage Generator.

Returns
Calibration value.

◆ getDuty()

float getDuty ( ) const
virtualinherited

Gets the current duty cycle of the PWM.

Returns
Current duty cycle value, in percent.

◆ saveCalibration()

void saveCalibration ( float  measure)
virtualinherited

Finishes the calibration process.

Calculates and saves the calibration value.

Parameters
measureMeasured voltage, in Volts.

◆ toggle()

void toggle ( )
virtualinherited

Toggles the output of the Voltage Generator.

◆ isOn()

bool isOn ( ) const
virtualinherited

Returns if output of the Voltage Generator is enabled.

Returns
True if output of the Voltage Generator is enabled, false otherwise.

The documentation for this class was generated from the following files: