i2c_slave.h 466 B

12345678910111213141516171819
  1. /* Library made by: g4lvanix
  2. * Github repository: https://github.com/g4lvanix/I2C-slave-lib
  3. Info: Inititate the library by giving the required address.
  4. Read or write to the necessary buffer according to the opperation.
  5. */
  6. #ifndef I2C_SLAVE_H
  7. #define I2C_SLAVE_H
  8. volatile uint8_t buffer_address;
  9. volatile uint8_t txbuffer[0xFF];
  10. volatile uint8_t rxbuffer[0xFF];
  11. void i2c_init(uint8_t address);
  12. void i2c_stop(void);
  13. ISR(TWI_vect);
  14. #endif // I2C_SLAVE_H