From 6d4ad089c5b758ad8af4f68bf385a26ec4e9653a Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Thu, 21 Nov 2024 15:55:03 +0100 Subject: Initial commit --- include/i2c.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/i2c.h (limited to 'include/i2c.h') diff --git a/include/i2c.h b/include/i2c.h new file mode 100644 index 0000000..18fa5e9 --- /dev/null +++ b/include/i2c.h @@ -0,0 +1,24 @@ +#ifndef I2C_H +#define I2C_H + +#include + +#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 -- cgit v1.2.3