BMP581 Driver 1.0.0
API reference
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables
bmp581 Namespace Reference

Namespaces

namespace  addr
 7-bit I2C addresses (SDO low → 0x46, SDO high → 0x47).
 
namespace  chip_id
 Chip identifiers accepted by Driver::Init().
 
namespace  cmd
 Command register values.
 
namespace  detail
 
namespace  dsp_config
 DSP_CONFIG (0x30) fields.
 
namespace  dsp_iir
 DSP_IIR (0x31) fields.
 
namespace  int_config
 INT_CONFIG (0x14) fields.
 
namespace  int_source
 INT_SOURCE (0x15) enable bits.
 
namespace  int_status
 INT_STATUS (0x27) bits.
 
namespace  nvm
 NVM user space (3 × 16-bit words).
 
namespace  odr_config
 ODR_CONFIG (0x37) fields.
 
namespace  osr_config
 OSR_CONFIG (0x36) fields.
 
namespace  osr_eff
 OSR_EFF (0x38) fields.
 
namespace  reg
 Register addresses.
 
namespace  status
 STATUS (0x28) bits.
 
namespace  timing
 Timing (data sheet / Bosch API).
 

Classes

class  BusInterface
 CRTP base for the BMP581 register transport. More...
 
struct  Config
 Convenience: one-call configuration for Driver::Configure(). More...
 
class  Driver
 BMP581 client. More...
 
struct  DriverResult
 
struct  DriverResult< void >
 
struct  EffectiveOsr
 Effective oversampling and ODR validity (OSR_EFF). More...
 
struct  IirConfig
 IIR configuration (DSP_CONFIG + DSP_IIR). Writable in standby only. More...
 
struct  InterruptConfig
 Interrupt pin configuration (INT_CONFIG). More...
 
struct  InterruptSources
 Interrupt sources (INT_SOURCE). More...
 
struct  OsrOdrConfig
 Oversampling / ODR / pressure-enable (OSR_CONFIG + ODR_CONFIG). More...
 
struct  Sample
 One pressure / temperature sample. More...
 

Enumerations

enum class  Interface : uint8_t { Unspecified = 0 , I2c = 1 , Spi = 2 }
 Bus an adapter drives, declared as static constexpr Interface kInterface (optional). More...
 
enum class  PowerMode : uint8_t {
  Standby = 0 , Normal = 1 , Forced = 2 , Continuous = 3 ,
  DeepStandby = 4
}
 Power modes (ODR_CONFIG bits 1:0; deep standby = standby with deep_dis = 0). More...
 
enum class  Oversampling : uint8_t {
  X1 = 0 , X2 = 1 , X4 = 2 , X8 = 3 ,
  X16 = 4 , X32 = 5 , X64 = 6 , X128 = 7
}
 Oversampling (OSR_CONFIG). More...
 
enum class  Odr : uint8_t {
  Hz240 = 0x00 , Hz218_5 = 0x01 , Hz199_1 = 0x02 , Hz179_2 = 0x03 ,
  Hz160 = 0x04 , Hz149_3 = 0x05 , Hz140 = 0x06 , Hz129_8 = 0x07 ,
  Hz120 = 0x08 , Hz110_1 = 0x09 , Hz100_2 = 0x0A , Hz89_6 = 0x0B ,
  Hz80 = 0x0C , Hz70 = 0x0D , Hz60 = 0x0E , Hz50 = 0x0F ,
  Hz45 = 0x10 , Hz40 = 0x11 , Hz35 = 0x12 , Hz30 = 0x13 ,
  Hz25 = 0x14 , Hz20 = 0x15 , Hz15 = 0x16 , Hz10 = 0x17 ,
  Hz5 = 0x18 , Hz4 = 0x19 , Hz3 = 0x1A , Hz2 = 0x1B ,
  Hz1 = 0x1C , Hz0_5 = 0x1D , Hz0_25 = 0x1E , Hz0_125 = 0x1F
}
 Output data rate (ODR_CONFIG bits 6:2). Codes ascend as rate descends. More...
 
enum class  IirFilter : uint8_t {
  Bypass = 0 , Coeff1 = 1 , Coeff3 = 2 , Coeff7 = 3 ,
  Coeff15 = 4 , Coeff31 = 5 , Coeff63 = 6 , Coeff127 = 7
}
 IIR filter coefficient (DSP_IIR). More...
 
enum class  IntMode : uint8_t { Pulsed = 0 , Latched = 1 }
 Interrupt pin behaviour. More...
 
enum class  IntPolarity : uint8_t { ActiveLow = 0 , ActiveHigh = 1 }
 
enum class  IntDrive : uint8_t { PushPull = 0 , OpenDrain = 1 }
 
enum class  DriverError : uint8_t {
  None = 0 , InvalidParameter , NotInitialized , Bus ,
  InvalidChipId , NvmNotReady , PorSoftReset , InvalidPowerMode ,
  NvmInvalidAddr , NvmCommandError
}
 Driver-level error codes (stable for logging / telemetry). More...
 

Functions

const char * GetDriverVersion () noexcept
 Driver version string (from generated bmp581_version.h).
 
constexpr float OdrHz (Odr odr) noexcept
 ODR code → nominal rate in Hz (for logging / loop-rate planning).
 
constexpr std::string_view ToString (DriverError e) noexcept
 
constexpr std::string_view ToString (PowerMode m) noexcept
 
constexpr Config BarometricReferencePreset () noexcept
 Barometric preset for a ~100 Hz reference channel. OSR ×8 pressure / ×1 temperature keeps the ODR valid at 100 Hz on the BMP581; IIR coeff 3 trims the last few Pa of noise without adding meaningful lag.
 

Variables

template<typename Bus >
constexpr Interface kBusInterface = detail::DeclaredInterface<Bus>::value
 The interface adapter Bus declares, or Interface::Unspecified.
 
constexpr float kPressureLsbPerPa = 64.0f
 Raw → engineering scaling (data sheet §4.x, Bosch API).
 
constexpr float kTemperatureLsbPerC = 65536.0f
 temperature_c = raw / 65536
 

Enumeration Type Documentation

◆ DriverError

Driver-level error codes (stable for logging / telemetry).

Enumerator
None 
InvalidParameter 
NotInitialized 

transport EnsureInitialized() failed

Bus 

register read/write failed

InvalidChipId 

CHIP_ID not 0x50 / 0x51.

NvmNotReady 

STATUS.nvm_rdy clear or nvm_err set.

PorSoftReset 

INT_STATUS.por_softreset_complete not set after reset.

InvalidPowerMode 
NvmInvalidAddr 

outside 0x20..0x22

NvmCommandError 

STATUS.nvm_cmd_err set.

◆ IirFilter

IIR filter coefficient (DSP_IIR).

Enumerator
Bypass 
Coeff1 
Coeff3 
Coeff7 
Coeff15 
Coeff31 
Coeff63 
Coeff127 

◆ IntDrive

Enumerator
PushPull 
OpenDrain 

◆ Interface

Bus an adapter drives, declared as static constexpr Interface kInterface (optional).

Enumerator
Unspecified 

not declared: the driver handles both I2C and SPI behaviour

I2c 
Spi 

◆ IntMode

Interrupt pin behaviour.

Enumerator
Pulsed 
Latched 

◆ IntPolarity

Enumerator
ActiveLow 
ActiveHigh 

◆ Odr

Output data rate (ODR_CONFIG bits 6:2). Codes ascend as rate descends.

Enumerator
Hz240 
Hz218_5 
Hz199_1 
Hz179_2 
Hz160 
Hz149_3 
Hz140 
Hz129_8 
Hz120 
Hz110_1 
Hz100_2 
Hz89_6 
Hz80 
Hz70 
Hz60 
Hz50 
Hz45 
Hz40 
Hz35 
Hz30 
Hz25 
Hz20 
Hz15 
Hz10 
Hz5 
Hz4 
Hz3 
Hz2 
Hz1 
Hz0_5 
Hz0_25 
Hz0_125 

◆ Oversampling

Oversampling (OSR_CONFIG).

Enumerator
X1 
X2 
X4 
X8 
X16 
X32 
X64 
X128 

◆ PowerMode

Power modes (ODR_CONFIG bits 1:0; deep standby = standby with deep_dis = 0).

Enumerator
Standby 
Normal 

periodic at ODR

Forced 

one conversion then standby

Continuous 

back-to-back conversions

DeepStandby 

pseudo-mode: standby + deep_dis cleared

Function Documentation

◆ BarometricReferencePreset()

constexpr Config bmp581::BarometricReferencePreset ( )
constexprnoexcept

Barometric preset for a ~100 Hz reference channel. OSR ×8 pressure / ×1 temperature keeps the ODR valid at 100 Hz on the BMP581; IIR coeff 3 trims the last few Pa of noise without adding meaningful lag.

◆ GetDriverVersion()

const char * bmp581::GetDriverVersion ( )
inlinenoexcept

Driver version string (from generated bmp581_version.h).

◆ OdrHz()

constexpr float bmp581::OdrHz ( Odr  odr)
constexprnoexcept

ODR code → nominal rate in Hz (for logging / loop-rate planning).

◆ ToString() [1/2]

constexpr std::string_view bmp581::ToString ( DriverError  e)
constexprnoexcept

◆ ToString() [2/2]

constexpr std::string_view bmp581::ToString ( PowerMode  m)
constexprnoexcept

Variable Documentation

◆ kBusInterface

template<typename Bus >
constexpr Interface bmp581::kBusInterface = detail::DeclaredInterface<Bus>::value
inlineconstexpr

The interface adapter Bus declares, or Interface::Unspecified.

◆ kPressureLsbPerPa

constexpr float bmp581::kPressureLsbPerPa = 64.0f
constexpr

Raw → engineering scaling (data sheet §4.x, Bosch API).

pressure_pa = raw / 64

◆ kTemperatureLsbPerC

constexpr float bmp581::kTemperatureLsbPerC = 65536.0f
constexpr

temperature_c = raw / 65536