SimpleFOClibrary  2.1
current_sense/hardware_specific/generic_mcu.cpp File Reference
#include "../hardware_api.h"

Go to the source code of this file.

Macros

#define _ADC_VOLTAGE   5.0
 
#define _ADC_RESOLUTION   1024.0
 
#define _ADC_CONV   ( (_ADC_VOLTAGE) / (_ADC_RESOLUTION) )
 

Functions

float _readADCVoltage (const int pinA)
 
void _configureADC (const int pinA, const int pinB, const int pinC)
 

Macro Definition Documentation

◆ _ADC_CONV

#define _ADC_CONV   ( (_ADC_VOLTAGE) / (_ADC_RESOLUTION) )

◆ _ADC_RESOLUTION

#define _ADC_RESOLUTION   1024.0

◆ _ADC_VOLTAGE

#define _ADC_VOLTAGE   5.0

Function Documentation

◆ _configureADC()

void _configureADC ( const int  pinA,
const int  pinB,
const int  pinC = NOT_SET 
)

function reading an ADC value and returning the read voltage

Parameters
pinA- adc pin A
pinB- adc pin B
pinC- adc pin C

Definition at line 43 of file current_sense/hardware_specific/generic_mcu.cpp.

◆ _readADCVoltage()

float _readADCVoltage ( const int  pinA)

function reading an ADC value and returning the read voltage

Parameters
pinA- the arduino pin to be read (it has to be ADC pin)

Definition at line 36 of file current_sense/hardware_specific/generic_mcu.cpp.