bcmi2c.h (1108B)
1 /* 2 * 3 * 4 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 5 * 6 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 7 * 8 * DO NOT EDIT THIS FILE! 9 * This file is auto-generated. 10 * Edits to this file will be lost when it is regenerated. 11 */ 12 13 #ifndef __BCM_BCMI2C_H__ 14 #define __BCM_BCMI2C_H__ 15 16 #if defined(INCLUDE_I2C) 17 18 #include <bcm/types.h> 19 20 #ifndef BCM_HIDE_DISPATCHABLE 21 22 /* Open I2C device. */ 23 extern int bcm_i2c_open( 24 int unit, 25 char *devname, 26 uint32 flags, 27 int speed); 28 29 /* Write to I2C device. */ 30 extern int bcm_i2c_write( 31 int unit, 32 int fd, 33 uint32 addr, 34 uint8 *data, 35 uint32 nbytes); 36 37 /* Read from I2C device. */ 38 extern int bcm_i2c_read( 39 int unit, 40 int fd, 41 uint32 addr, 42 uint8 *data, 43 uint32 *nbytes); 44 45 /* Perform IOCTL access on I2C driver. */ 46 extern int bcm_i2c_ioctl( 47 int unit, 48 int fd, 49 int opcode, 50 void *data, 51 int len); 52 53 #endif /* defined(INCLUDE_I2C) */ 54 55 #endif /* BCM_HIDE_DISPATCHABLE */ 56 57 #endif /* __BCM_BCMI2C_H__ */