Embedded Artistry C Interfaces
A reference collection of abstract interfaces in C.
|
Virtual Barometric Pressure/Altimeter Interface (asynchronous mode) More...
#include <barometric_sensor.h>
Public Attributes | |
bool(* | readSample )(void) |
Request a new current pressure/altitude sample from the device. More... | |
void(* | setSeaLevelPressure )(uint32_t slp) |
Set the sea level pressure. More... | |
void(* | registerNewSampleCb )(const NewBarometricSampleCb callback) |
Register a NewBarometricSampleCb function. More... | |
void(* | unregisterNewSampleCb )(const NewBarometricSampleCb callback) |
Remove a registered NewBarometricSampleCb function. More... | |
void(* | registerErrorCb )(const BarometricErrorCb callback) |
Register a BarometricErrorCb function. More... | |
void(* | unregisterErrorCb )(const BarometricErrorCb callback) |
Remove a registered BarometricErrorCb function. More... | |
Virtual Barometric Pressure/Altimeter Interface (asynchronous mode)
A standard interface for a device which can measure barometric pressure. This interface is intended for use with asynchronous implementations. That is, the readPressure() function cannot be a blocking function, but will instead be expected to enqueue a request to geneate a new pressure sample. The pressure sample, whenver it becomes available, will be passed along to interested parties via the registered callback functions.
Definition at line 353 of file barometric_sensor.h.
bool(* BarometricSensor_asyncWithCb::readSample) (void) |
Request a new current pressure/altitude sample from the device.
Submit a request to the device for a new sample. When available, the data will be provided to registered callback functions.
Definition at line 365 of file barometric_sensor.h.
void(* BarometricSensor_asyncWithCb::registerErrorCb) (const BarometricErrorCb callback) |
Register a BarometricErrorCb function.
This function will add the callback input to a list of functions to execute when a pressure sensor error occurs.
[in] | callback | The callback function pointer to register on the "error" callback list. |
Definition at line 411 of file barometric_sensor.h.
void(* BarometricSensor_asyncWithCb::registerNewSampleCb) (const NewBarometricSampleCb callback) |
Register a NewBarometricSampleCb function.
This function will add the callback input to a list of functions to execute when a new and valid sample is available.
[in] | callback | The callback function pointer to register on the "new sample" callback list. |
Definition at line 385 of file barometric_sensor.h.
void(* BarometricSensor_asyncWithCb::setSeaLevelPressure) (uint32_t slp) |
Set the sea level pressure.
[in] | slp | The current sea level pressure in hPa. slp should be specified as an unsigned 32-bit fixed-point number in format UQ22.10. |
Definition at line 372 of file barometric_sensor.h.
void(* BarometricSensor_asyncWithCb::unregisterErrorCb) (const BarometricErrorCb callback) |
Remove a registered BarometricErrorCb function.
This function will remove a callback function from the registered list of "error" callbacks. If the function has not been previously registered, the parameter will be ignored and the list will be unchanged.
[in] | callback | The callback function pointer to remove from the "error" callback list. |
Definition at line 424 of file barometric_sensor.h.
void(* BarometricSensor_asyncWithCb::unregisterNewSampleCb) (const NewBarometricSampleCb callback) |
Remove a registered NewBarometricSampleCb function.
This function will remove a callback function from the registered list of "new sample" callbacks. If the function has not been previously registered, the parameter will be ignored and the list will be unchanged.
[in] | callback | The callback function pointer to remove from the "new sample" callback list. |
Definition at line 398 of file barometric_sensor.h.