summaryrefslogtreecommitdiffstats
path: root/drivers/avr/i2c_slave.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/avr/i2c_slave.h')
-rwxr-xr-xdrivers/avr/i2c_slave.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h
index 3fda7f8c09..1c3b9ecc00 100755
--- a/drivers/avr/i2c_slave.h
+++ b/drivers/avr/i2c_slave.h
@@ -8,12 +8,16 @@
#ifndef I2C_SLAVE_H
#define I2C_SLAVE_H
+#define TX_BUFFER_SIZE 30
+#define RX_BUFFER_SIZE 30
+
volatile uint8_t buffer_address;
-volatile uint8_t txbuffer[0xFF];
-volatile uint8_t rxbuffer[0xFF];
+static volatile bool slave_has_register_set = false;
+volatile uint8_t txbuffer[TX_BUFFER_SIZE];
+volatile uint8_t rxbuffer[RX_BUFFER_SIZE];
void i2c_init(uint8_t address);
void i2c_stop(void);
ISR(TWI_vect);
-#endif // I2C_SLAVE_H
+#endif // I2C_SLAVE_H \ No newline at end of file