1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#ifndef I2C_H #define I2C_H #include <stdint.h> #define NACK 0 #define ACK 1 void i2c_start_condition(void); void i2c_restart_condition(void); void i2c_stop_condition(void); void i2c_send(uint8_t b); uint8_t i2c_recv(uint8_t ack); #endif // I2C_H