Lines Matching +full:read +full:- +full:write

83      * The interface can later be re-opened by calling open().
94 /** @brief Read byte data from i2c
96 * @param[out] data - The data read from the i2c device
100 virtual void read(uint8_t& data) = 0;
102 /** @brief Read byte data from i2c
104 * @param[in] addr - The register address of the i2c device
105 * @param[out] data - The data read from the i2c device
109 virtual void read(uint8_t addr, uint8_t& data) = 0;
111 /** @brief Read word data from i2c
113 * Uses the SMBus Read Word protocol. Reads two bytes from the device, and
114 * the first byte read is the low-order byte.
116 * @param[in] addr - The register address of the i2c device
117 * @param[out] data - The data read from the i2c device
121 virtual void read(uint8_t addr, uint16_t& data) = 0;
123 /** @brief Read block data from i2c
125 * @param[in] addr - The register address of the i2c device
126 * @param[in,out] size - The out parameter to indicate the size of data read
128 * input parameter to indicate how many bytes to read
129 * @param[out] data - The pointer to buffer to read from the i2c device,
133 * @param[in] mode - The block read mode, either SMBus or I2C.
140 virtual void read(uint8_t addr, uint8_t& size, uint8_t* data,
143 /** @brief Write byte data to i2c
145 * @param[in] data - The data to write to the i2c device
149 virtual void write(uint8_t data) = 0;
151 /** @brief Write byte data to i2c
153 * @param[in] addr - The register address of the i2c device
154 * @param[in] data - The data to write to the i2c device
158 virtual void write(uint8_t addr, uint8_t data) = 0;
160 /** @brief Write word data to i2c
162 * Uses the SMBus Write Word protocol. Writes two bytes to the device, and
163 * the first byte written is the low-order byte.
165 * @param[in] addr - The register address of the i2c device
166 * @param[in] data - The data to write to the i2c device
170 virtual void write(uint8_t addr, uint16_t data) = 0;
172 /** @brief Write block data to i2c
174 * @param[in] addr - The register address of the i2c device
175 * @param[in] size - The size of data to write, SMBus allows at most 32
177 * @param[in] data - The data to write to the i2c device
178 * @param[in] mode - The block write mode, either SMBus or I2C.
185 virtual void write(uint8_t addr, uint8_t size, const uint8_t* data,
188 /** @brief SMBus Process Call protocol to write and then read word data
190 * @param[in] addr - The register address of the i2c device
191 * @param[in] writeData - The data to write to the i2c device
192 * @param[out] readData - The data read from the i2c device
199 /** @brief SMBus Block Write-Block Read Process Call protocol
201 * The maximum write size depends on the SMBus version being used and what
204 * If SMBus version 2.0 is being used, the maximum write size is 32 bytes.
205 * The read size + write size must be <= 32 bytes.
208 * I2C-level commands, the maximum write size is 255 bytes. The read size +
209 * write size must be <= 255 bytes.
211 * @param[in] addr - The register address of the i2c device
212 * @param[in] writeSize - The size of data to write
213 * @param[in] writeData - The data to write to the i2c device
214 * @param[out] readSize - The size of data read from i2c device. Max read
216 * @param[out] readData - Pointer to buffer to hold the data read from the
231 * @param[in] busId - The i2c bus ID
232 * @param[in] devAddr - The device address of the i2c
233 * @param[in] initialState - Initial state of the I2CInterface object
234 * @param[in] maxRetries - Maximum number of times to retry an I2C operation