i2c: Change the type of the data parameter to uint8_t.
Data is intended to be a byte array, so it should be described by a type which has a fixed size equal to an 8 bit byte. Also, the data passed to write shouldn't be modified and can be const. BUG=chrome-os-partner:19420 TEST=Built and booted into depthcharge on pit. Built and booted into ChromeOS on snow. BRANCH=None Change-Id: Ib01c0218b95d8660418fea2181f6f38bc0675159 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/60601 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Ronald G. Minnich <rminnich@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
0423d5be7d
commit
8cdf79cfeb
3 changed files with 14 additions and 11 deletions
|
|
@ -20,10 +20,12 @@
|
|||
#ifndef _DEVICE_I2C_H_
|
||||
#define _DEVICE_I2C_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* note: chip is the 7-bit I2C address */
|
||||
int i2c_read(unsigned bus, unsigned chip, unsigned addr,
|
||||
unsigned alen, unsigned char *buf, unsigned len);
|
||||
unsigned alen, uint8_t *buf, unsigned len);
|
||||
int i2c_write(unsigned bus, unsigned chip, unsigned addr,
|
||||
unsigned alen, unsigned char *buf, unsigned len);
|
||||
unsigned alen, const uint8_t *buf, unsigned len);
|
||||
|
||||
#endif /* _DEVICE_I2C_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue