cornucopia: bump SRCREV
[openembedded.git] / recipes / i2c-tools / picodlp-control / i2c-io-api.h
blob35ab45865c16db24c9fd8337cdd6415cb14ef9c2
1 /****************************************************************************
3 * Copyright (c) 2006 Dave Hylands <dhylands@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
14 ****************************************************************************/
15 /**
17 * @file i2c-io-api.h
19 * @brief This file contains definitions for performing i2c-io operations
20 * on the gumstix.
22 ****************************************************************************/
24 #if !defined( I2C_IO_API_H )
25 #define I2C_IO_API_H
27 // ---- Include Files -------------------------------------------------------
29 #include <inttypes.h>
30 #include "i2c-io.h"
32 // ---- Constants and Types -------------------------------------------------
34 // ---- Variable Externs ----------------------------------------------------
36 // ---- Function Prototypes -------------------------------------------------
38 int I2C_IO_CheckVersion( const I2C_IO_Info_t *info );
40 int I2C_IO_GetInfo( int i2cDev, I2C_IO_Info_t *info );
41 int I2C_IO_GetGPIO( int i2cDev, uint8_t portNum, uint8_t *pinVal );
42 int I2C_IO_SetGPIO( int i2cDev, uint8_t portNum, uint8_t pinMask, uint8_t pinVal );
43 int I2C_IO_GetGPIODir( int i2cDev, uint8_t portNum, uint8_t *pinVal );
44 int I2C_IO_SetGPIODir( int i2cDev, uint8_t portNum, uint8_t pinMask, uint8_t pinVal );
45 int I2C_IO_GetADC( int i2cDev, uint8_t mux, uint16_t *adcVal );
46 int I2C_IO_ReadReg8( int i2cDev, uint8_t reg, uint8_t *regVal );
47 int I2C_IO_ReadReg16( int i2cDev, uint8_t reg, uint16_t *regVal );
48 int I2C_IO_WriteReg8( int i2cDev, uint8_t reg, uint8_t regVal );
49 int I2C_IO_WriteReg16( int i2cDev, uint8_t reg, uint16_t regVal );
51 #endif // I2C_IO_API_H