aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-01-25 18:59:18 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-01-25 18:59:18 +0000
commit063c6e138d59529b911235fe537bdefe60e0cfb8 (patch)
treece7e9d60ba590ab5884f66c998f5690615401f29 /os/hal/include
parenta1b70ed3012d499f25ba94ee2c53f1ce2c89809f (diff)
downloadChibiOS-063c6e138d59529b911235fe537bdefe60e0cfb8.tar.gz
ChibiOS-063c6e138d59529b911235fe537bdefe60e0cfb8.tar.bz2
ChibiOS-063c6e138d59529b911235fe537bdefe60e0cfb8.zip
Initial commit of I2C driver code
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@2684 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/i2c.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index 01d3739e8..273c9f57a 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -34,6 +34,7 @@
/* Driver constants. */
/*===========================================================================*/
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -112,23 +113,20 @@ typedef enum {
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
-
#ifdef __cplusplus
extern "C" {
#endif
void i2cInit(void);
void i2cObjectInit(I2CDriver *i2cp);
- void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
+ void i2cStart(I2CDriver *i2cp, I2CConfig *config);
void i2cStop(I2CDriver *i2cp);
- void i2cMasterStartI(I2CDriver *i2cp,
- uint16_t header,
- i2ccallback_t callback);
+ void i2cMasterTransmit(I2CDriver *i2cp, uint8_t slave_addr1, uint8_t slave_addr2, size_t n, const void *txbuf);
+ void i2cMasterReceive(I2CDriver *i2cp, uint8_t slave_addr1, uint8_t slave_addr2, size_t n, void *rxbuf);
+ void i2cMasterStartI(I2CDriver *i2cp,uint16_t header,i2ccallback_t callback);
void i2cMasterStopI(I2CDriver *i2cp, i2ccallback_t callback);
void i2cMasterRestartI(I2CDriver *i2cp, i2ccallback_t callback);
- void i2cMasterTransmitI(I2CDriver *i2cp, size_t n, const uint8_t *txbuf,
- i2ccallback_t callback);
- void i2cMasterReceiveI(I2CDriver *i2cp, size_t n, uint8_t *rxbuf,
- i2ccallback_t callback);
+ void i2cMasterTransmitI(I2CDriver *i2cp, size_t n, const uint8_t *txbuf, i2ccallback_t callback);
+ void i2cMasterReceiveI(I2CDriver *i2cp, size_t n, uint8_t *rxbuf, i2ccallback_t callback);
#if I2C_USE_MUTUAL_EXCLUSION
void i2cAcquireBus(I2CDriver *i2cp);
void i2cReleaseBus(I2CDriver *i2cp);