libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::Dps310SpiTransport Class Reference

Detailed Description

SPI Transport for Dps310

#include <dps310.h>

Classes

struct  Config
 

Public Member Functions

 Dps310SpiTransport ()
 
 ~Dps310SpiTransport ()
 
void Init (Config config)
 
void Write (uint8_t *data, uint16_t size)
 
void Read (uint8_t *data, uint16_t size)
 
void Write8 (uint8_t reg, uint8_t value)
 
void ReadReg (uint8_t reg, uint8_t *buff, uint8_t size)
 
uint8_t Read8 (uint8_t reg)
 
uint16_t Read16 (uint8_t reg)
 
uint32_t Read24 (uint8_t reg)
 
bool GetError ()
 

Constructor & Destructor Documentation

◆ Dps310SpiTransport()

daisy::Dps310SpiTransport::Dps310SpiTransport ( )
inline

◆ ~Dps310SpiTransport()

daisy::Dps310SpiTransport::~Dps310SpiTransport ( )
inline

Member Function Documentation

◆ GetError()

bool daisy::Dps310SpiTransport::GetError ( )
inline

◆ Init()

void daisy::Dps310SpiTransport::Init ( Config  config)
inline

◆ Read()

void daisy::Dps310SpiTransport::Read ( uint8_t data,
uint16_t  size 
)
inline

◆ Read16()

uint16_t daisy::Dps310SpiTransport::Read16 ( uint8_t  reg)
inline

Reads a 16 bit value over I2C or SPI

Parameters
regthe register address to read from
Returns
the 16 bit data value read from the device

◆ Read24()

uint32_t daisy::Dps310SpiTransport::Read24 ( uint8_t  reg)
inline

Reads a 24 bit value

Parameters
regthe register address to read from
Returns
the 24 bit data value read from the device

◆ Read8()

uint8_t daisy::Dps310SpiTransport::Read8 ( uint8_t  reg)
inline

Reads an 8 bit value

Parameters
regthe register address to read from
Returns
the data uint8_t read from the device

◆ ReadReg()

void daisy::Dps310SpiTransport::ReadReg ( uint8_t  reg,
uint8_t buff,
uint8_t  size 
)
inline

Read from a reg address a defined number of bytes

◆ Write()

void daisy::Dps310SpiTransport::Write ( uint8_t data,
uint16_t  size 
)
inline

◆ Write8()

void daisy::Dps310SpiTransport::Write8 ( uint8_t  reg,
uint8_t  value 
)
inline

Writes an 8 bit value

Parameters
regthe register address to write to
valuethe value to write to the register

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