Initial commit

This commit is contained in:
2019-09-21 14:41:54 +02:00
commit b76b9fbbf7
156 changed files with 962832 additions and 0 deletions

22
code/inc/i2c.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef _I2C_h
#define _I2C_h
/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_READ 1
/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
#define I2C_WRITE 0
#define SCL_CLOCK 96000L //i2c clockspeed
void i2c_init(void);
unsigned char i2c_start(unsigned char address);
/*
void i2c_stop(void);
unsigned char i2c_write( unsigned char data );
unsigned char i2c_readAck(void);
unsigned char i2c_readNak(void);
*/
#endif