APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AP_ADC_ADS1115 Class Reference

#include <AP_ADC_ADS1115.h>

Collaboration diagram for AP_ADC_ADS1115:
[legend]

Public Member Functions

 AP_ADC_ADS1115 ()
 
 ~AP_ADC_ADS1115 ()
 
bool init ()
 
size_t read (adc_report_s *report, size_t length) const
 
uint8_t get_channels_number () const
 

Private Member Functions

void _update ()
 
bool _start_conversion (uint8_t channel)
 
float _convert_register_data_to_mv (int16_t word) const
 

Private Attributes

AP_HAL::OwnPtr< AP_HAL::I2CDevice_dev
 
uint16_t _gain
 
int _channel_to_read
 
adc_report_s_samples
 

Static Private Attributes

static const uint8_t _channels_number = ADS1115_CHANNELS_COUNT
 

Detailed Description

Definition at line 15 of file AP_ADC_ADS1115.h.

Constructor & Destructor Documentation

◆ AP_ADC_ADS1115()

AP_ADC_ADS1115::AP_ADC_ADS1115 ( )

Definition at line 111 of file AP_ADC_ADS1115.cpp.

◆ ~AP_ADC_ADS1115()

AP_ADC_ADS1115::~AP_ADC_ADS1115 ( )

Definition at line 119 of file AP_ADC_ADS1115.cpp.

Member Function Documentation

◆ _convert_register_data_to_mv()

float AP_ADC_ADS1115::_convert_register_data_to_mv ( int16_t  word) const
private

Definition at line 163 of file AP_ADC_ADS1115.cpp.

Referenced by _update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _start_conversion()

bool AP_ADC_ADS1115::_start_conversion ( uint8_t  channel)
private

Definition at line 138 of file AP_ADC_ADS1115.cpp.

Referenced by _update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _update()

void AP_ADC_ADS1115::_update ( )
private

Definition at line 203 of file AP_ADC_ADS1115.cpp.

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_channels_number()

uint8_t AP_ADC_ADS1115::get_channels_number ( ) const
inline

Definition at line 24 of file AP_ADC_ADS1115.h.

◆ init()

bool AP_ADC_ADS1115::init ( )

Definition at line 124 of file AP_ADC_ADS1115.cpp.

Here is the call graph for this function:

◆ read()

size_t AP_ADC_ADS1115::read ( adc_report_s report,
size_t  length 
) const

Definition at line 153 of file AP_ADC_ADS1115.cpp.

Member Data Documentation

◆ _channel_to_read

int AP_ADC_ADS1115::_channel_to_read
private

Definition at line 35 of file AP_ADC_ADS1115.h.

Referenced by _update(), and AP_ADC_ADS1115().

◆ _channels_number

const uint8_t AP_ADC_ADS1115::_channels_number = ADS1115_CHANNELS_COUNT
staticprivate

Definition at line 30 of file AP_ADC_ADS1115.h.

Referenced by _update(), and AP_ADC_ADS1115().

◆ _dev

AP_HAL::OwnPtr<AP_HAL::I2CDevice> AP_ADC_ADS1115::_dev
private

Definition at line 32 of file AP_ADC_ADS1115.h.

Referenced by _start_conversion(), _update(), and init().

◆ _gain

uint16_t AP_ADC_ADS1115::_gain
private

◆ _samples

adc_report_s* AP_ADC_ADS1115::_samples
private

Definition at line 36 of file AP_ADC_ADS1115.h.

Referenced by _update(), AP_ADC_ADS1115(), read(), and ~AP_ADC_ADS1115().


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