|
HardFOC Core
API reference
|
Handler wrapping one BMP581 on a BaseI2c device.
More...
#include <Bmp581Handler.h>
Classes | |
| struct | Counters |
| Diagnostics counters since construction. More... | |
Public Types | |
| using | DriverType = bmp581::Driver< HalI2cBmp581Comm > |
Public Member Functions | |
| Bmp581Handler (BaseI2c &i2c_device, const Bmp581HandlerConfig &config=Bmp581HandlerConfig{}, RtosMutex *bus_mutex=nullptr) noexcept | |
| Bmp581Handler (const Bmp581Handler &)=delete | |
| Bmp581Handler & | operator= (const Bmp581Handler &)=delete |
| Bmp581Handler (Bmp581Handler &&)=delete | |
| Bmp581Handler & | operator= (Bmp581Handler &&)=delete |
| bool | EnsureInitialized () noexcept |
| Probe (chip id + NVM ready), optional soft reset, apply the configured preset. Idempotent. | |
| bool | IsPresent () const noexcept |
True once EnsureInitialized() has succeeded. | |
| std::uint8_t | ChipId () const noexcept |
| Chip id read at probe (0 until present). | |
| const bmp581::EffectiveOsr & | EffectiveOsr () const noexcept |
| Effective OSR / ODR validity captured after configuration. | |
| bmp581::DriverResult< bool > | DataReady () noexcept |
| Whether a fresh sample is waiting (INT_STATUS.drdy). | |
| bmp581::DriverResult< bmp581::Sample > | ReadSample () noexcept |
| Read pressure [Pa] and temperature [°C]. | |
| bmp581::DriverResult< void > | Configure (const bmp581::Config &cfg) noexcept |
| Re-apply a new configuration (standby hop handled by the driver). | |
| bmp581::DriverResult< void > | Reset () noexcept |
| Soft reset; the handler re-applies the current configuration. | |
| Counters | GetCounters () const noexcept |
Private Member Functions | |
| bool | EnsureInitializedLocked () noexcept |
Private Attributes | |
| Bmp581HandlerConfig | config_ |
| HalI2cBmp581Comm | comm_ |
| std::unique_ptr< DriverType > | driver_ |
| std::uint8_t | chip_id_ {0} |
| bmp581::EffectiveOsr | effective_ {} |
| std::atomic< bool > | initialized_ {false} |
| std::atomic< std::uint32_t > | samples_ {0} |
| std::atomic< std::uint32_t > | bus_errors_ {0} |
| RtosMutex | private_mutex_ |
| RtosMutex * | bus_mutex_ |
Handler wrapping one BMP581 on a BaseI2c device.
| using Bmp581Handler::DriverType = bmp581::Driver<HalI2cBmp581Comm> |
|
explicitnoexcept |
| i2c_device | Configured BaseI2c device. Must outlive the handler. |
| config | Sensor preset + bring-up options. |
| bus_mutex | Optional shared mutex when several devices share the bus; private when null. |
|
delete |
|
delete |
|
inlinenoexcept |
Chip id read at probe (0 until present).
|
noexcept |
Re-apply a new configuration (standby hop handled by the driver).
|
noexcept |
Whether a fresh sample is waiting (INT_STATUS.drdy).
|
inlinenoexcept |
Effective OSR / ODR validity captured after configuration.
|
noexcept |
Probe (chip id + NVM ready), optional soft reset, apply the configured preset. Idempotent.
|
privatenoexcept |
|
noexcept |
|
inlinenoexcept |
True once EnsureInitialized() has succeeded.
|
delete |
|
delete |
|
noexcept |
Read pressure [Pa] and temperature [°C].
|
noexcept |
Soft reset; the handler re-applies the current configuration.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |