Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TempSensor Class Reference
An abstract class for Temperature sensors. More...
#include <TempSensor.h>
Inherits Component, Component, Component, and Component.
Inherited by HTS221Sensor, and LPS22HBSensor.
Public Member Functions | |
| virtual int | get_temperature (float *pf_data)=0 |
| Get current temperature in degrees Celsius [°C]. | |
| virtual int | get_fahrenheit (float *pf_data) |
| Get current temperature in degrees Fahrenheit [°F]. | |
| virtual | ~TempSensor () |
| Destructor. | |
| virtual int | get_temperature (float *pf_data)=0 |
| Get current temperature in degrees Celsius [°C]. | |
| virtual int | get_fahrenheit (float *pf_data) |
| Get current temperature in degrees Fahrenheit [°F]. | |
| virtual | ~TempSensor () |
| Destructor. | |
| virtual int | get_temperature (float *pf_data)=0 |
| Get current temperature in degrees Celsius [°C]. | |
| virtual int | get_fahrenheit (float *pf_data) |
| Get current temperature in degrees Fahrenheit [°F]. | |
| virtual | ~TempSensor () |
| Destructor. | |
| virtual int | get_temperature (float *pf_data)=0 |
| Get current temperature in degrees Celsius [°C]. | |
| virtual int | get_fahrenheit (float *pf_data) |
| Get current temperature in degrees Fahrenheit [°F]. | |
| virtual | ~TempSensor () |
| Destructor. | |
| virtual int | init (void *init)=0 |
| Initializing the component. | |
| virtual int | init (void *init)=0 |
| Initializing the component. | |
| virtual int | init (void *init)=0 |
| Initializing the component. | |
| virtual int | init (void *init)=0 |
| Initializing the component. | |
| virtual int | read_id (uint8_t *id)=0 |
| Getting the ID of the component. | |
| virtual int | read_id (uint8_t *id)=0 |
| Getting the ID of the component. | |
| virtual int | read_id (uint8_t *id)=0 |
| Getting the ID of the component. | |
| virtual int | read_id (uint8_t *id)=0 |
| Getting the ID of the component. | |
Detailed Description
An abstract class for Temperature sensors.
Definition at line 56 of file HTS221/ST_INTERFACES/Sensors/TempSensor.h.
Constructor & Destructor Documentation
| virtual ~TempSensor | ( | ) | [virtual] |
Destructor.
Definition at line 88 of file HTS221/ST_INTERFACES/Sensors/TempSensor.h.
| virtual ~TempSensor | ( | ) | [virtual] |
Destructor.
Definition at line 88 of file LPS22HB/ST_INTERFACES/Sensors/TempSensor.h.
| virtual ~TempSensor | ( | ) | [virtual] |
Destructor.
Definition at line 88 of file LSM303AGR/ST_INTERFACES/Sensors/TempSensor.h.
| virtual ~TempSensor | ( | ) | [virtual] |
Destructor.
Definition at line 88 of file LSM6DSL/ST_INTERFACES/Sensors/TempSensor.h.
Member Function Documentation
| virtual int get_fahrenheit | ( | float * | pf_data ) | [virtual] |
Get current temperature in degrees Fahrenheit [°F].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 71 of file HTS221/ST_INTERFACES/Sensors/TempSensor.h.
| virtual int get_fahrenheit | ( | float * | pf_data ) | [virtual] |
Get current temperature in degrees Fahrenheit [°F].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 71 of file LPS22HB/ST_INTERFACES/Sensors/TempSensor.h.
| virtual int get_fahrenheit | ( | float * | pf_data ) | [virtual] |
Get current temperature in degrees Fahrenheit [°F].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 71 of file LSM6DSL/ST_INTERFACES/Sensors/TempSensor.h.
| virtual int get_fahrenheit | ( | float * | pf_data ) | [virtual] |
Get current temperature in degrees Fahrenheit [°F].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 71 of file LSM303AGR/ST_INTERFACES/Sensors/TempSensor.h.
| virtual int get_temperature | ( | float * | pf_data ) | [pure virtual] |
Get current temperature in degrees Celsius [°C].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Implemented in HTS221Sensor, and LPS22HBSensor.
| virtual int get_temperature | ( | float * | pf_data ) | [pure virtual] |
Get current temperature in degrees Celsius [°C].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Implemented in HTS221Sensor, and LPS22HBSensor.
| virtual int get_temperature | ( | float * | pf_data ) | [pure virtual] |
Get current temperature in degrees Celsius [°C].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Implemented in HTS221Sensor, and LPS22HBSensor.
| virtual int get_temperature | ( | float * | pf_data ) | [pure virtual] |
Get current temperature in degrees Celsius [°C].
- Parameters:
-
[out] pf_data Pointer to where to store temperature to
- Returns:
- 0 in case of success, an error code otherwise
Implemented in HTS221Sensor, and LPS22HBSensor.
| virtual int init | ( | void * | init ) | [pure virtual, inherited] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int init | ( | void * | init ) | [pure virtual, inherited] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int init | ( | void * | init ) | [pure virtual, inherited] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int init | ( | void * | init ) | [pure virtual, inherited] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int read_id | ( | uint8_t * | id ) | [pure virtual, inherited] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int read_id | ( | uint8_t * | id ) | [pure virtual, inherited] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int read_id | ( | uint8_t * | id ) | [pure virtual, inherited] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
| virtual int read_id | ( | uint8_t * | id ) | [pure virtual, inherited] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in HTS221Sensor, LPS22HBSensor, LSM303AGRAccSensor, LSM303AGRMagSensor, and LSM6DSLSensor.
Generated on Tue Jul 12 2022 21:38:10 by
1.7.2