Skip to content

daisy::Dps310I2CTransport

Module: External

More...

#include <dps310.h>

Public Classes

Name
struct Config

Public Functions

Name
Dps310I2CTransport()
~Dps310I2CTransport()
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()

Detailed Description

class daisy::Dps310I2CTransport;

I2C Transport for Dps310

Public Functions Documentation

function Dps310I2CTransport

inline Dps310I2CTransport()

function ~Dps310I2CTransport

inline ~Dps310I2CTransport()

function Init

inline void Init(
    Config config
)

function Write

inline void Write(
    uint8_t * data,
    uint16_t size
)

function Read

inline void Read(
    uint8_t * data,
    uint16_t size
)

function Write8

inline void Write8(
    uint8_t reg,
    uint8_t value
)

Parameters:

  • reg the register address to write to
  • value the value to write to the register

Writes an 8 bit value


function ReadReg

inline void ReadReg(
    uint8_t reg,
    uint8_t * buff,
    uint8_t size
)

Read from a reg address a defined number of bytes


function Read8

inline uint8_t Read8(
    uint8_t reg
)

Parameters:

  • reg the register address to read from

Return: the 16 bit data value read from the device

Reads an 8 bit value


function Read16

inline uint16_t Read16(
    uint8_t reg
)

Parameters:

  • reg the register address to read from

Return: the 16 bit data value read from the device

Reads a 16 bit value


function Read24

inline uint32_t Read24(
    uint8_t reg
)

Parameters:

  • reg the register address to read from

Return: the 24 bit data value read from the device

Reads a 24 bit value


function GetError

inline bool GetError()

---

Updated on 2024-01-03 at 19:41:01 +0000