aboutsummaryrefslogtreecommitdiff
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 3fda7f8c0..1c3b9ecc0 100755
--- a/drivers/avr/i2c_slave.h
+++ b/drivers/avr/i2c_slave.h
@@ -8,12 +8,16 @@
8#ifndef I2C_SLAVE_H 8#ifndef I2C_SLAVE_H
9#define I2C_SLAVE_H 9#define I2C_SLAVE_H
10 10
11#define TX_BUFFER_SIZE 30
12#define RX_BUFFER_SIZE 30
13
11volatile uint8_t buffer_address; 14volatile uint8_t buffer_address;
12volatile uint8_t txbuffer[0xFF]; 15static volatile bool slave_has_register_set = false;
13volatile uint8_t rxbuffer[0xFF]; 16volatile uint8_t txbuffer[TX_BUFFER_SIZE];
17volatile uint8_t rxbuffer[RX_BUFFER_SIZE];
14 18
15void i2c_init(uint8_t address); 19void i2c_init(uint8_t address);
16void i2c_stop(void); 20void i2c_stop(void);
17ISR(TWI_vect); 21ISR(TWI_vect);
18 22
19#endif // I2C_SLAVE_H 23#endif // I2C_SLAVE_H \ No newline at end of file