#include "utility/template/i2c.h"
uint8_t cirque_pinnacle_arduino_wrappers::TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop = false);

Request a number of bytes to read from the specified I2C device’s address.

Parameters:
uint8_t address

The slave device’s I2C address. To specify the register offset, use beginTransmission() and write() the register offset.

uint8_t quantity

The number of bytes to request.

Warning

This implementation uses an internal buffer allocated with 32 bytes. If requesting more than 32 bytes, then this function will only read up to 32 bytes.

uint8_t sendStop = false

If set to a non-zero value, then a stop condition is sent over the bus after the transaction is completed.

  • This parameter is ignored on Linux implementations.

Returns:

The number of bytes read into the internal buffer.