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.
Dependents: X_NUCLEO_IKS01A1 mDot_X_NUCLEO_IKS01A1 53L0A1 X_NUCLEO_IKS01A1 ... more
Fork of ST_INTERFACES by
LightSensor Class Reference
An abstract class for ambient light sensors. More...
#include <LightSensor.h>
Inherits Component.
Public Member Functions | |
| virtual int | get_lux (uint32_t *pi_data)=0 |
| Get current light [lux]. | |
| virtual | ~LightSensor () |
| Destructor. | |
| virtual int | init (void *init)=0 |
| Initializing the component. | |
| virtual int | read_id (uint8_t *id)=0 |
| Getting the ID of the component. | |
Detailed Description
An abstract class for ambient light sensors.
Definition at line 56 of file LightSensor.h.
Constructor & Destructor Documentation
| virtual ~LightSensor | ( | ) | [virtual] |
Destructor.
Definition at line 69 of file LightSensor.h.
Member Function Documentation
| virtual int get_lux | ( | uint32_t * | pi_data ) | [pure virtual] |
Get current light [lux].
- Parameters:
-
[out] pi_data Pointer to where to store light to
- Returns:
- 0 in case of success, an error code otherwise
| 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.
| 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.
Generated on Tue Jul 12 2022 18:43:53 by
1.7.2
