Wixel SDK
i2c.h
Go to the documentation of this file.
1 
11 #ifndef _I2C_H
12 #define _I2C_H
13 
14 #include <cc2511_types.h>
15 
19 extern uint8 DATA i2cPinScl;
20 
24 extern uint8 DATA i2cPinSda;
25 
31 extern BIT i2cTimeoutOccurred;
32 
41 void i2cSetFrequency(uint16 freqKHz);
42 
49 void i2cSetTimeout(uint16 timeoutMs);
50 
53 void i2cStart(void);
54 
57 void i2cStop(void);
58 
68 BIT i2cWriteByte(uint8 byte);
69 
80 uint8 i2cReadByte(BIT nack);
81 
82 #endif
#define DATA
Definition: cc2511_types.h:52
uint8 DATA i2cPinSda
Definition: i2c.c:17
void i2cStart(void)
Definition: i2c.c:111
void i2cSetTimeout(uint16 timeoutMs)
Definition: i2c.c:48
BIT i2cTimeoutOccurred
Definition: i2c.c:29
uint8 DATA i2cPinScl
Definition: i2c.c:16
void i2cSetFrequency(uint16 freqKHz)
Definition: i2c.c:35
uint8 i2cReadByte(BIT nack)
Definition: i2c.c:217
__bit BIT
Definition: cc2511_types.h:32
unsigned short uint16
Definition: cc2511_types.h:15
BIT i2cWriteByte(uint8 byte)
Definition: i2c.c:190
unsigned char uint8
Definition: cc2511_types.h:9
void i2cStop(void)
Definition: i2c.c:93