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

ADS1115 Driver procedures. More...

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

Data Structures

struct  ADS1115_t
 ADS1115 user interface struct. More...
 

Enumerations

enum  ADS1115_func { ADS1115__FUNC_SINGLE_DIFF = 0U , ADS1115__FUNC_MULTIPLE_DIFF , ADS1115__FUNC_SINGLE_ENDED }
 Function enum for ADS1115. More...
 

Functions

FctERR ADS1115_Init_Sequence (ADS1115_t *const pCpnt)
 Initialization Sequence for ADS1115 peripheral.
 
FctERR ADS1115_handler (ADS1115_t *const pCpnt)
 Handler for ADS1115 peripheral.
 
FctERR ADS1115_handler_it (ADS1115_t *const pCpnt)
 Handler for ADS1115 peripheral GPIO interrupt.
 
FctERR ADS1115_handler_all (void)
 Handler for all ADS1115 peripherals.
 
FctERR ADS1115_handler_it_all (void)
 Handler for all ADS1115 peripherals GPIO interrupt.
 

Variables

ADS1115_t ADS1115 [I2C_ADS1115_NB]
 ADS1115 User structure.
 

Detailed Description

ADS1115 Driver procedures.

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)

Enumeration Type Documentation

◆ ADS1115_func

Function enum for ADS1115.

Enumerator
ADS1115__FUNC_SINGLE_DIFF 

Continuous conversion mode.

ADS1115__FUNC_MULTIPLE_DIFF 

Power-down single-shot mode.

ADS1115__FUNC_SINGLE_ENDED 

Power-down single-shot mode.

Function Documentation

◆ ADS1115_handler()

FctERR ADS1115_handler ( ADS1115_t *const pCpnt)

Handler for ADS1115 peripheral.

Weak Functions
ADS1115 handler may be user implemented to suit custom needs
Note
May be called periodically to handle ADS1115 tasks
Alternately may be called when event occurs on ADS1115 pin (or by calling ADS1115_handler_it instead)
Parameters
[in]pCpnt- Pointer to ADS1115 component
Returns
FctERR - error code

!

Note
Conversion time need to be respected, ADS1115_handler_it may be used to handle GPIO pin interrupt, or ADS1115_Get_conv_ms may be used to help ensure that without using interrupt pin.

!

Note
If single shot is required, ADS1115_Start_NextConversion can be called once at init, using ADS1115_handler_it afterwards. ADS1115_handler shall be user implemented in this case, only to get converted value when interrupt pin triggers (and eventually start another conversion with ADS1115_Start_NextConversion).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ADS1115_handler_all()

FctERR ADS1115_handler_all ( void )

Handler for all ADS1115 peripherals.

Note
May be called periodically to handle all ADS1115 tasks
Returns
FctERR - error code
Here is the call graph for this function:

◆ ADS1115_handler_it()

FctERR ADS1115_handler_it ( ADS1115_t *const pCpnt)

Handler for ADS1115 peripheral GPIO interrupt.

Note
ADS1115_RDY_GPIO_Init has to be called at init before using interrupt handler function
Weak Functions
ADS1115 GPIO interrupt handler may be user implemented to suit custom needs
Note
May be called periodically to handle ADS1115 tasks through interrupts
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_handler_it_all()

FctERR ADS1115_handler_it_all ( void )

Handler for all ADS1115 peripherals GPIO interrupt.

Note
ADS1115_RDY_GPIO_Init has to be called at init before using interrupt handler function
May be called periodically to handle all ADS1115 tasks
Returns
FctERR - error code
Here is the call graph for this function:

◆ ADS1115_Init_Sequence()

FctERR ADS1115_Init_Sequence ( ADS1115_t *const pCpnt)

Initialization Sequence for ADS1115 peripheral.

Weak Functions
ADS1115 Init sequence may be user implemented if custom initialization sequence needed
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:

Variable Documentation

◆ ADS1115

ADS1115_t ADS1115[I2C_ADS1115_NB]
extern

ADS1115 User structure.