SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
hardware_api.h File Reference
Include dependency graph for current_sense/hardware_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GenericCurrentSenseParams
 

Macros

#define SIMPLEFOC_CURRENT_SENSE_INIT_FAILED   ((void*)-1)
 

Typedefs

typedef struct GenericCurrentSenseParams GenericCurrentSenseParams
 

Functions

float _readADCVoltageInline (const int pinA, const void *cs_params)
 
void * _configureADCInline (const void *driver_params, const int pinA, const int pinB, const int pinC=NOT_SET)
 
void * _configureADCLowSide (const void *driver_params, const int pinA, const int pinB, const int pinC=NOT_SET)
 
void _startADC3PinConversionLowSide ()
 
float _readADCVoltageLowSide (const int pinA, const void *cs_params)
 
void * _driverSyncLowSide (void *driver_params, void *cs_params)
 

Macro Definition Documentation

◆ SIMPLEFOC_CURRENT_SENSE_INIT_FAILED

#define SIMPLEFOC_CURRENT_SENSE_INIT_FAILED   ((void*)-1)

Definition at line 8 of file current_sense/hardware_api.h.

Typedef Documentation

◆ GenericCurrentSenseParams

Function Documentation

◆ _configureADCInline()

void * _configureADCInline ( const void *  driver_params,
const int  pinA,
const int  pinB,
const int  pinC = NOT_SET 
)

function reading an ADC value and returning the read voltage

Parameters
driver_params- driver parameter structure - hardware specific
pinA- adc pin A
pinB- adc pin B
pinC- adc pin C
Here is the caller graph for this function:

◆ _configureADCLowSide()

void * _configureADCLowSide ( const void *  driver_params,
const int  pinA,
const int  pinB,
const int  pinC = NOT_SET 
)

function reading an ADC value and returning the read voltage

Parameters
driver_params- driver parameter structure - hardware specific
pinA- adc pin A
pinB- adc pin B
pinC- adc pin C
Here is the caller graph for this function:

◆ _driverSyncLowSide()

void * _driverSyncLowSide ( void *  driver_params,
void *  cs_params 
)

function syncing the Driver with the ADC for the LowSide Sensing

Parameters
driver_params- driver parameter structure - hardware specific
cs_params- current sense parameter structure - hardware specific
Returns
void* - returns the pointer to the current sense parameter structure (unchanged)
  • returns SIMPLEFOC_CURRENT_SENSE_INIT_FAILED if the init fails
Here is the caller graph for this function:

◆ _readADCVoltageInline()

float _readADCVoltageInline ( const int  pinA,
const void *  cs_params 
)

function reading an ADC value and returning the read voltage

Parameters
pinA- the arduino pin to be read (it has to be ADC pin)
cs_params-current sense parameter structure - hardware specific
Here is the caller graph for this function:

◆ _readADCVoltageLowSide()

float _readADCVoltageLowSide ( const int  pinA,
const void *  cs_params 
)

function reading an ADC value and returning the read voltage

Parameters
pinA- the arduino pin to be read (it has to be ADC pin)
cs_params-current sense parameter structure - hardware specific
Here is the caller graph for this function:

◆ _startADC3PinConversionLowSide()

void _startADC3PinConversionLowSide ( )
Here is the caller graph for this function: