HardFOC Core
API reference
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
HalI2cBmp581Comm Class Reference

CRTP register transport bridging bmp581::BusInterface to a BaseI2c device. More...

#include <Bmp581Handler.h>

Inheritance diagram for HalI2cBmp581Comm:

Public Member Functions

 HalI2cBmp581Comm (BaseI2c &i2c_device) noexcept
 
CRTP-required methods (static dispatch from bmp581::BusInterface)
bool WriteRegs (std::uint8_t reg, const std::uint8_t *data, std::size_t len) noexcept
 
bool ReadRegs (std::uint8_t reg, std::uint8_t *out, std::size_t len) noexcept
 
void DelayUs (std::uint32_t us) noexcept
 
bool EnsureInitialized () noexcept
 

Static Public Attributes

static constexpr bmp581::Interface kInterface = bmp581::Interface::I2c
 

Private Attributes

BaseI2c & i2c_device_
 
std::uint8_t tx_scratch_ [8] {}
 
std::uint8_t rx_scratch_ [8] {}
 
std::uint8_t reg_scratch_ {0}
 

Detailed Description

CRTP register transport bridging bmp581::BusInterface to a BaseI2c device.

Frames writes as [reg, data…] and reads as write-reg / read-len through member scratch buffers (internal SRAM).

Note
Does not own the BaseI2c; it must outlive the adapter.

Constructor & Destructor Documentation

◆ HalI2cBmp581Comm()

HalI2cBmp581Comm::HalI2cBmp581Comm ( BaseI2c &  i2c_device)
explicitnoexcept

Member Function Documentation

◆ DelayUs()

void HalI2cBmp581Comm::DelayUs ( std::uint32_t  us)
noexcept

◆ EnsureInitialized()

bool HalI2cBmp581Comm::EnsureInitialized ( )
noexcept

◆ ReadRegs()

bool HalI2cBmp581Comm::ReadRegs ( std::uint8_t  reg,
std::uint8_t *  out,
std::size_t  len 
)
noexcept

◆ WriteRegs()

bool HalI2cBmp581Comm::WriteRegs ( std::uint8_t  reg,
const std::uint8_t *  data,
std::size_t  len 
)
noexcept

Member Data Documentation

◆ i2c_device_

BaseI2c& HalI2cBmp581Comm::i2c_device_
private

◆ kInterface

constexpr bmp581::Interface HalI2cBmp581Comm::kInterface = bmp581::Interface::I2c
staticconstexpr

The bus this transport drives. The driver then accepts the missing ACK of the soft-reset command (datasheet 7.36) and skips the SPI dummy read.

◆ reg_scratch_

std::uint8_t HalI2cBmp581Comm::reg_scratch_ {0}
private

◆ rx_scratch_

std::uint8_t HalI2cBmp581Comm::rx_scratch_[8] {}
private

◆ tx_scratch_

std::uint8_t HalI2cBmp581Comm::tx_scratch_[8] {}
private

The documentation for this class was generated from the following files: