diff options
author | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-11-21 15:55:03 +0100 |
---|---|---|
committer | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-11-21 15:55:03 +0100 |
commit | 6d4ad089c5b758ad8af4f68bf385a26ec4e9653a (patch) | |
tree | 2fd65006b57d646b53e121aef42bba5ee5852840 /include/i2c.h |
Initial commit
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 24 |
1 files changed, 24 insertions, 0 deletions
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 <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 |