From d220abdabb47b356f58f350f6668f8e2e07609b8 Mon Sep 17 00:00:00 2001 From: "DESKTOP\\fahadmirza" Date: Sun, 29 Nov 2020 01:54:32 -0600 Subject: [PATCH] Write functions' description updated that explains why the buffer arguments are const. --- Adafruit_I2CDevice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Adafruit_I2CDevice.cpp b/Adafruit_I2CDevice.cpp index e25bf9f..f94b1ee 100644 --- a/Adafruit_I2CDevice.cpp +++ b/Adafruit_I2CDevice.cpp @@ -58,10 +58,12 @@ bool Adafruit_I2CDevice::detected(void) { /*! * @brief Write a buffer or two to the I2C device. Cannot be more than * maxBufferSize() bytes. - * @param buffer Pointer to buffer of data to write + * @param buffer Pointer to buffer of data to write. This is const to + * ensure the content of this buffer doesn't change. * @param len Number of bytes from buffer to write * @param prefix_buffer Pointer to optional array of data to write before - * buffer. Cannot be more than maxBufferSize() bytes. + * buffer. Cannot be more than maxBufferSize() bytes. This is const to + * ensure the content of this buffer doesn't change. * @param prefix_len Number of bytes from prefix buffer to write * @param stop Whether to send an I2C STOP signal on write * @return True if write was successful, otherwise false.