modm API documentation
modm::Bmp581SpiTransport< SpiMaster, Cs > Class Template Reference

#include <modm/driver/pressure/bmp581_transport.hpp>

Inheritance diagram for modm::Bmp581SpiTransport< SpiMaster, Cs >:
modm::SpiDevice< SpiMaster >

Public Member Functions

 Bmp581SpiTransport ()
 
bool initialize ()
 Initialize the transport layer (configures CS pin)
 
bool read (uint8_t reg, uint8_t *buffer, std::size_t length)
 Read one or more registers starting at the given address.
 
bool write (uint8_t reg, uint8_t data)
 Write a single byte to a register.
 
bool write (uint8_t reg, const uint8_t *data, std::size_t length)
 Write multiple bytes starting at the given register address.
 
void attachConfigurationHandler (Spi::ConfigurationHandler handler)
 

Protected Member Functions

bool acquireMaster ()
 
bool releaseMaster ()
 

Static Protected Attributes

static constexpr uint8_t ReadFlag = 0x80
 SPI read flag (bit 7 set for read operations)
 

Detailed Description

template<typename SpiMaster, typename Cs>
class modm::Bmp581SpiTransport< SpiMaster, Cs >

BMP581 SPI Transport Layer

Implements register read/write operations over SPI. SPI Mode 0 (CPOL=0, CPHA=0) is used. Maximum SPI clock: 10 MHz.

Template Parameters
SpiMasterSPI master peripheral
CsChip select GPIO pin

Constructor & Destructor Documentation

template<typename SpiMaster , typename Cs >
modm::Bmp581SpiTransport< SpiMaster, Cs >::Bmp581SpiTransport ( )

Constructor


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