diff options
Diffstat (limited to 'keyboards/lets_split/i2c.c')
| -rw-r--r-- | keyboards/lets_split/i2c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index c72789403..084c890c4 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | #include <stdbool.h> | 6 | #include <stdbool.h> |
| 7 | #include "i2c.h" | 7 | #include "i2c.h" |
| 8 | 8 | ||
| 9 | #ifdef USE_I2C | ||
| 10 | |||
| 9 | // Limits the amount of we wait for any one i2c transaction. | 11 | // Limits the amount of we wait for any one i2c transaction. |
| 10 | // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is | 12 | // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is |
| 11 | // 9 bits, a single transaction will take around 90μs to complete. | 13 | // 9 bits, a single transaction will take around 90μs to complete. |
| @@ -157,3 +159,4 @@ ISR(TWI_vect) { | |||
| 157 | // Reset everything, so we are ready for the next TWI interrupt | 159 | // Reset everything, so we are ready for the next TWI interrupt |
| 158 | TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); | 160 | TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); |
| 159 | } | 161 | } |
| 162 | #endif | ||
