NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
i2c::Device Class Reference

#include <i2c_new.h>

Public Member Functions

 Device (Bus::Ptr bus, const Address addr)
 
 Device ()=default
 
 operator bool () const noexcept
 
int Write (const std::uint8_t *data, const std::size_t size, Error *ec)
 
int Write (const std::uint8_t data, Error *ec)
 
int WriteRegister (const std::uint8_t reg, const std::uint8_t data, Error *ec)
 
int WriteRegister (const std::uint8_t reg, const std::uint8_t *data, const std::size_t size, Error *ec)
 
int Read (std::uint8_t *data, const std::size_t size, Error *ec)
 
int ReadRegister (const std::uint8_t reg, std::uint8_t *data, const std::size_t size, Error *ec)
 
i2c::Address addr () const noexcept
 
const Bus::Ptrbus () const noexcept
 

Constructor & Destructor Documentation

◆ Device() [1/2]

i2c::Device::Device ( Bus::Ptr  bus,
const Address  addr 
)

◆ Device() [2/2]

i2c::Device::Device ( )
default

Member Function Documentation

◆ addr()

i2c::Address i2c::Device::addr ( ) const
noexcept

◆ bus()

const i2c::Bus::Ptr & i2c::Device::bus ( ) const
noexcept

◆ operator bool()

i2c::Device::operator bool ( ) const
explicitnoexcept

◆ Read()

int i2c::Device::Read ( std::uint8_t *  data,
const std::size_t  size,
Error ec 
)

◆ ReadRegister()

int i2c::Device::ReadRegister ( const std::uint8_t  reg,
std::uint8_t *  data,
const std::size_t  size,
Error ec 
)

◆ Write() [1/2]

int i2c::Device::Write ( const std::uint8_t *  data,
const std::size_t  size,
Error ec 
)

◆ Write() [2/2]

int i2c::Device::Write ( const std::uint8_t  data,
Error ec 
)

◆ WriteRegister() [1/2]

int i2c::Device::WriteRegister ( const std::uint8_t  reg,
const std::uint8_t *  data,
const std::size_t  size,
Error ec 
)

◆ WriteRegister() [2/2]

int i2c::Device::WriteRegister ( const std::uint8_t  reg,
const std::uint8_t  data,
Error ec 
)

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