I2C_Drivers (ARM) 1.1
SMFSW collection of HAL I2C Drivers for ARM
Loading...
Searching...
No Matches
ADS1115_ex.h File Reference

ADS1115 Driver extensions. More...

#include "sarmfsw.h"
#include "ADS1115.h"
Include dependency graph for ADS1115_ex.h:
This graph shows which files directly or indirectly include this file:

Data Structures

union  uADS1115_REG_MAP
 Union of ADS1115 registry map. More...
 

Functions

uint32_t ADS1115_Get_conv_us (ADS1115_t *const pCpnt)
 Get conversion time for ADS1115 component (µs)
 
uint32_t ADS1115_Get_conv_ms (ADS1115_t *const pCpnt)
 Get conversion time for ADS1115 component (ms)
 
FctERR ADS1115_Get_Conversion (ADS1115_t *const pCpnt)
 Get ADS1115 conversion.
 
FctERR ADS1115_Set_Function (ADS1115_t *const pCpnt, const ADS1115_func func, const ADS1115_mode mode, const uint8_t nb)
 Set ADS1115 functional mode.
 
FctERR ADS1115_Set_Mode (ADS1115_t *const pCpnt, const ADS1115_mode mode)
 Set ADS1115 mode.
 
FctERR ADS1115_Set_Gain (ADS1115_t *const pCpnt, const ADS1115_gain gain)
 Set ADS1115 gain.
 
FctERR ADS1115_Set_Rate (ADS1115_t *const pCpnt, const ADS1115_rate rate)
 Set ADS1115 rate.
 
FctERR ADS1115_Set_CompMode (ADS1115_t *const pCpnt, const ADS1115_comp comp)
 Set ADS1115 Comparator mode.
 
FctERR ADS1115_Set_CompPolarity (ADS1115_t *const pCpnt, const ADS1115_polarity pol)
 Set ADS1115 Comparator polarity.
 
FctERR ADS1115_Set_CompLatch (ADS1115_t *const pCpnt, const ADS1115_latch latch)
 Set ADS1115 Comparator latch.
 
FctERR ADS1115_Set_CompQueue (ADS1115_t *const pCpnt, const ADS1115_queue queue)
 Set ADS1115 Comparator queue.
 
FctERR ADS1115_Set_LowThreshold (ADS1115_t *const pCpnt, const int16_t thrh)
 Set ADS1115 low threshold.
 
FctERR ADS1115_Set_HighThreshold (ADS1115_t *const pCpnt, const int16_t thrh)
 Set ADS1115 high threshold.
 
int16_t ADS1115_Get_LowThreshold (const ADS1115_t *const pCpnt)
 Get ADS1115 low threshold.
 
int16_t ADS1115_Get_HighThreshold (const ADS1115_t *const pCpnt)
 Get ADS1115 high threshold.
 
FctERR ADS1115_Start_Conversion (ADS1115_t *const pCpnt, const ADS1115_mux chan)
 Start ADS1115 conversion.
 
FctERR ADS1115_Start_NextConversion (ADS1115_t *const pCpnt)
 Start ADS1115 Next conversion.
 
int16_t ADS1115_Get_raw_value (const ADS1115_t *const pCpnt, const uint8_t chan)
 Get ADS1115 raw channel value.
 
float ADS1115_Get_converted_value_uV (const ADS1115_t *const pCpnt, const uint8_t chan)
 Get ADS1115 raw channel value in µV.
 
float ADS1115_Get_converted_value_mV (const ADS1115_t *const pCpnt, const uint8_t chan)
 Get ADS1115 raw channel value in mV.
 
float ADS1115_Get_converted_value_V (const ADS1115_t *const pCpnt, const uint8_t chan)
 Get ADS1115 raw channel value in V.
 
void ADS1115_RDY_GPIO_Init (ADS1115_t *const pCpnt, GPIO_TypeDef *const GPIOx, const uint16_t GPIO_Pin, const GPIO_PinState GPIO_Active)
 Ready GPIO pin init for ADS1115.
 
bool ADS1115_RDY_GPIO_Get (const ADS1115_t *const pCpnt)
 Ready GPIO pin getter for ADS1115.
 

Detailed Description

ADS1115 Driver extensions.

Author
SMFSW

ADS1115: Ultra-Small, Low-Power, 16-Bit Analog-to-Digital Converter with Internal Reference

Note
Compatibility with:
  • ADS1113 (restrictions given in datasheet)
  • ADS1114 (restrictions given in datasheet)
  • ADS1115
Compatibility should be assured with:
  • ADS1x1x (check datasheets for compatibility informations)

Function Documentation

◆ ADS1115_Get_conv_ms()

uint32_t ADS1115_Get_conv_ms ( ADS1115_t *const pCpnt)

Get conversion time for ADS1115 component (ms)

Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
Conversion time in ms

◆ ADS1115_Get_conv_us()

uint32_t ADS1115_Get_conv_us ( ADS1115_t *const pCpnt)

Get conversion time for ADS1115 component (µs)

Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
Conversion time in µs
Here is the caller graph for this function:

◆ ADS1115_Get_Conversion()

FctERR ADS1115_Get_Conversion ( ADS1115_t *const pCpnt)

Get ADS1115 conversion.

Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADS1115_Get_converted_value_mV()

float ADS1115_Get_converted_value_mV ( const ADS1115_t *const pCpnt,
const uint8_t chan )

Get ADS1115 raw channel value in mV.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]chan- ADS1115 channel
Returns
Converted channel value (mV)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADS1115_Get_converted_value_uV()

float ADS1115_Get_converted_value_uV ( const ADS1115_t *const pCpnt,
const uint8_t chan )

Get ADS1115 raw channel value in µV.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]chan- ADS1115 channel
Returns
Converted channel value (µV)
Here is the call graph for this function:

◆ ADS1115_Get_converted_value_V()

float ADS1115_Get_converted_value_V ( const ADS1115_t *const pCpnt,
const uint8_t chan )

Get ADS1115 raw channel value in V.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]chan- ADS1115 channel
Returns
Converted channel value (V)
Here is the call graph for this function:

◆ ADS1115_Get_HighThreshold()

int16_t ADS1115_Get_HighThreshold ( const ADS1115_t *const pCpnt)
inline

Get ADS1115 high threshold.

Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
High threshold value

◆ ADS1115_Get_LowThreshold()

int16_t ADS1115_Get_LowThreshold ( const ADS1115_t *const pCpnt)
inline

Get ADS1115 low threshold.

Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
Low threshold value

◆ ADS1115_Get_raw_value()

int16_t ADS1115_Get_raw_value ( const ADS1115_t *const pCpnt,
const uint8_t chan )
inline

Get ADS1115 raw channel value.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]chan- ADS1115 channel
Returns
Raw channel value
Here is the caller graph for this function:

◆ ADS1115_RDY_GPIO_Get()

bool ADS1115_RDY_GPIO_Get ( const ADS1115_t *const pCpnt)

Ready GPIO pin getter for ADS1115.

Weak Functions
ADS1115 Ready GPIO pin getter may be user implemented if needed
Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
RDY pin state value (0: inactive, 1: active)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADS1115_RDY_GPIO_Init()

void ADS1115_RDY_GPIO_Init ( ADS1115_t *const pCpnt,
GPIO_TypeDef *const GPIOx,
const uint16_t GPIO_Pin,
const GPIO_PinState GPIO_Active )

Ready GPIO pin init for ADS1115.

Weak Functions
ADS1115 Ready GPIO pin init may be user implemented if needed
Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]GPIOx- RDY port
[in]GPIO_Pin- RDY pin
[in]GPIO_ActiveRDY pin active state
Here is the call graph for this function:

◆ ADS1115_Set_CompLatch()

FctERR ADS1115_Set_CompLatch ( ADS1115_t *const pCpnt,
const ADS1115_latch latch )

Set ADS1115 Comparator latch.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]latch- Comparator latch
Returns
FctERR - error code

◆ ADS1115_Set_CompMode()

FctERR ADS1115_Set_CompMode ( ADS1115_t *const pCpnt,
const ADS1115_comp comp )

Set ADS1115 Comparator mode.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]comp- Comparator Mode
Returns
FctERR - error code

◆ ADS1115_Set_CompPolarity()

FctERR ADS1115_Set_CompPolarity ( ADS1115_t *const pCpnt,
const ADS1115_polarity pol )

Set ADS1115 Comparator polarity.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]pol- Comparator Polarity
Returns
FctERR - error code

◆ ADS1115_Set_CompQueue()

FctERR ADS1115_Set_CompQueue ( ADS1115_t *const pCpnt,
const ADS1115_queue queue )

Set ADS1115 Comparator queue.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]queue- Comparator queue
Returns
FctERR - error code

◆ ADS1115_Set_Function()

FctERR ADS1115_Set_Function ( ADS1115_t *const pCpnt,
const ADS1115_func func,
const ADS1115_mode mode,
const uint8_t nb )

Set ADS1115 functional mode.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]func- ADS1115 function
[in]mode- ADS1115 mode
[in]nb- Number of channels used
Returns
FctERR - error code
Here is the caller graph for this function:

◆ ADS1115_Set_Gain()

FctERR ADS1115_Set_Gain ( ADS1115_t *const pCpnt,
const ADS1115_gain gain )

Set ADS1115 gain.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]gain- Gain
Returns
FctERR - error code

◆ ADS1115_Set_HighThreshold()

FctERR ADS1115_Set_HighThreshold ( ADS1115_t *const pCpnt,
const int16_t thrh )
inline

Set ADS1115 high threshold.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]thrh- High threshold value
Returns
FctERR - error code
Here is the call graph for this function:

◆ ADS1115_Set_LowThreshold()

FctERR ADS1115_Set_LowThreshold ( ADS1115_t *const pCpnt,
const int16_t thrh )
inline

Set ADS1115 low threshold.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]thrh- Low threshold value
Returns
FctERR - error code
Here is the call graph for this function:

◆ ADS1115_Set_Mode()

FctERR ADS1115_Set_Mode ( ADS1115_t *const pCpnt,
const ADS1115_mode mode )

Set ADS1115 mode.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]mode- Mode
Returns
FctERR - error code

◆ ADS1115_Set_Rate()

FctERR ADS1115_Set_Rate ( ADS1115_t *const pCpnt,
const ADS1115_rate rate )

Set ADS1115 rate.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]rate- Data rate
Returns
FctERR - error code

◆ ADS1115_Start_Conversion()

FctERR ADS1115_Start_Conversion ( ADS1115_t *const pCpnt,
const ADS1115_mux chan )

Start ADS1115 conversion.

Parameters
[in]pCpnt- Pointer to ADS1115 component
[in]chan- Channel
Returns
FctERR - error code
Here is the caller graph for this function:

◆ ADS1115_Start_NextConversion()

FctERR ADS1115_Start_NextConversion ( ADS1115_t *const pCpnt)

Start ADS1115 Next conversion.

Note
Using ADS1115__MODE_CONTINUOUS with ADS1115__FUNC_SINGLE_DIFF or single channel used, function ADS1115_Get_Conversion may be used instead
Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
FctERR - error code
Here is the call graph for this function:
Here is the caller graph for this function: