#include <bmp085_parameters.hpp>
Public Types | |
enum | sampling_mode { ULTRA_LOW_POWER = 0, ULTRA_LOW_POWER = 0, STANDARD = 1, STANDARD = 1, HIGH = 2, HIGH = 2, ULTRA_HIGH_RESOLUTION = 3, ULTRA_HIGH_RESOLUTION = 3 } |
configurable sampling mode. Higher resolution settings will result in a longer conversion time on the sensor before the value can be read. More... | |
Public Member Functions | |
BMP085Parameters () | |
constructor | |
int * | getFlags () |
an unecessary method, since the I2C protocol does not need any additional information (passed down as flags) to be read by a generic hardware interface. However, this method must be implemented since it is inheritted from a generic parameters class. | |
int | getFrequency () |
returns the communication frequency that the sensor has been set to be read from the generic hardware interface. | |
int | getPin () |
an unecessary method, since the inheritted pin_ value is only relevant to SPI and GPIO. However, this method must be implemented since it is inheritted from a generic parameters class. | |
interface_protocol | getProtocol () |
returns the interface protocol that this sensor is using to transmit data. | |
sampling_mode | getSamplingMode () |
returns the sampling_mode specified with the setSamplingMode(mode) method (or the default, STANDARD, if the user did not specifiy a sampling mode). This value is needed to perform the correct calculation from the raw sensor values. | |
bool | setFrequency (int frequency) |
set the frequency at which the I2C communication will take place on the hardware. | |
bool | setPin (uint8_t pin) |
an unecessary method, since pin is an SPI parameter only, and the sensor only communicates via the I2C protocol. However, it must be implemented since it is inheritted from a generic parameters class. | |
bool | setProtocol (interface_protocol protocol) |
bool | setSamplingMode (sampling_mode mode) |
set the sensor's sampling mode | |
~BMP085Parameters () | |
Public Attributes | |
sampling_mode | oss_ |
a class member used to store the user-defined sampling mode so that it can be passed to the driver with the getSamplingMode() method. |
Definition at line 73 of file bmp085_parameters.hpp.
configurable sampling mode. Higher resolution settings will result in a longer conversion time on the sensor before the value can be read.
ULTRA_LOW_POWER | |
ULTRA_LOW_POWER | |
STANDARD | |
STANDARD | |
HIGH | |
HIGH | |
ULTRA_HIGH_RESOLUTION | |
ULTRA_HIGH_RESOLUTION |
Reimplemented in BMP085.
Definition at line 82 of file bmp085_parameters.hpp.
Definition at line 69 of file bmp085_parameters.cpp.
int * BMP085Parameters::getFlags | ( | ) | [virtual] |
an unecessary method, since the I2C protocol does not need any additional information (passed down as flags) to be read by a generic hardware interface. However, this method must be implemented since it is inheritted from a generic parameters class.
Implements bosch_drivers_common::Parameters.
Definition at line 144 of file bmp085_parameters.cpp.
int BMP085Parameters::getFrequency | ( | ) | [virtual] |
returns the communication frequency that the sensor has been set to be read from the generic hardware interface.
Implements bosch_drivers_common::Parameters.
Definition at line 119 of file bmp085_parameters.cpp.
int BMP085Parameters::getPin | ( | ) | [virtual] |
an unecessary method, since the inheritted pin_ value is only relevant to SPI and GPIO. However, this method must be implemented since it is inheritted from a generic parameters class.
Implements bosch_drivers_common::Parameters.
Definition at line 136 of file bmp085_parameters.cpp.
interface_protocol BMP085Parameters::getProtocol | ( | ) | [virtual] |
returns the interface protocol that this sensor is using to transmit data.
Implements bosch_drivers_common::Parameters.
Definition at line 111 of file bmp085_parameters.cpp.
returns the sampling_mode specified with the setSamplingMode(mode) method (or the default, STANDARD, if the user did not specifiy a sampling mode). This value is needed to perform the correct calculation from the raw sensor values.
Definition at line 152 of file bmp085_parameters.cpp.
bool BMP085Parameters::setFrequency | ( | int | frequency | ) | [virtual] |
set the frequency at which the I2C communication will take place on the hardware.
frequency | currently only 100000 and 400000 are supported by all generic hardware interfaces. |
Implements bosch_drivers_common::Parameters.
Definition at line 102 of file bmp085_parameters.cpp.
bool BMP085Parameters::setPin | ( | uint8_t | pin | ) | [virtual] |
an unecessary method, since pin is an SPI parameter only, and the sensor only communicates via the I2C protocol. However, it must be implemented since it is inheritted from a generic parameters class.
Implements bosch_drivers_common::Parameters.
Definition at line 127 of file bmp085_parameters.cpp.
bool BMP085Parameters::setProtocol | ( | interface_protocol | protocol | ) |
protocol | the user-requested interface protocol. |
Definition at line 85 of file bmp085_parameters.cpp.
bool BMP085Parameters::setSamplingMode | ( | sampling_mode | mode | ) |
set the sensor's sampling mode
mode | the user-requested sampling mode, one of four choices given by the enumerated datatype sampling_mode. |
Definition at line 76 of file bmp085_parameters.cpp.
a class member used to store the user-defined sampling mode so that it can be passed to the driver with the getSamplingMode() method.
Definition at line 216 of file bmp085_parameters.hpp.