![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
#include <bsp.hpp>
Public Member Functions | |
| i2c_bsp (const struct device *i2c_dev) | |
| void | read (uint16_t addr, uint8_t *rx, size_t rxlen, const uint8_t *tx, size_t txlen) |
| Performs an I2C read operation. | |
| void | read (uint16_t addr, uint8_t start_addr, uint8_t *rx, size_t len) |
| Simplified I2C read operation. | |
| void | write (uint16_t addr, const uint8_t *tx, size_t len) |
| Performs an I2C write operation. | |
| void | write (uint16_t addr, uint8_t start_addr, const uint8_t *tx, size_t len) |
| Performs an I2C write operation. | |
| const struct device * | dev () |
| Get the I2C device. | |
| Public Member Functions inherited from satnogs::comms::lib::bsp::i2c | |
| i2c () | |
| Construct a new I2C object. | |
| ~i2c () | |
| satnogs::comms::i2c_bsp::i2c_bsp | ( | const struct device * | i2c_dev | ) |
| const struct device * satnogs::comms::i2c_bsp::dev | ( | ) |
|
virtual |
Performs an I2C read operation.
| addr | address of the I2C device |
| rx | the receive buffer. Should be at least rxlen bytes in size |
| tx | the transmit buffer. Should be at least txlen bytes in size |
| rxlen | number of bytes to received after the write operation |
| txlen | number of bytes to transmit from the tx buffer |
Implements satnogs::comms::lib::bsp::i2c.
|
virtual |
Simplified I2C read operation.
| addr | address of the I2C device |
| start_addr | the peripheral internal address to start reading |
| rx | the receive buffer. Should be at least len bytes in size |
| len | number of bytes to receive |
Implements satnogs::comms::lib::bsp::i2c.
|
virtual |
Performs an I2C write operation.
| addr | address of the I2C device |
| tx | the transmit buffer. Should be at least len bytes in size |
| len | number of bytes to be transmitted |
Implements satnogs::comms::lib::bsp::i2c.
|
virtual |
Performs an I2C write operation.
| addr | address of the I2C device |
| start_addr | the peripheral internal address to start writing |
| tx | the transmit buffer. Should be at least len bytes in size |
| len | number of bytes to be transmitted |
Implements satnogs::comms::lib::bsp::i2c.