diff options
author | yiancar <yiangosyiangou@cytanet.com.cy> | 2018-07-18 19:55:57 +0300 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-07-18 12:55:57 -0400 |
commit | 72fd49b1468d6bbfa59e1c6334866d7aa34f31c1 (patch) | |
tree | d9d5d7a66eebd37765e2ff103e09ed57d787eae9 /drivers/avr/i2c_slave.h | |
parent | 7e9a7af672ab226cc57f05f362d6b1e965ac56e6 (diff) | |
download | qmk_firmware-72fd49b1468d6bbfa59e1c6334866d7aa34f31c1.tar.gz qmk_firmware-72fd49b1468d6bbfa59e1c6334866d7aa34f31c1.zip |
DC01 keyboard addition (#3428)
* DC01 initial commit
- Addition of directories
- Left readme
* Initial commit of left half
* Initial files for right half
* arrow
* i2c adjustments
* I2C slave and DC01 refractoring
- Cleaned up state machine of I2C slave driver
- Modified DC01 left to use already pressent I2C master driver
- Modified DC01 matrixes
* Fixed tabs to spaces
* Addition of Numpad
* Add keymaps
- Orthopad keymap for numpad module
- Numpad keymap for numpad module
- ISO, ANSI and HHKB version of keymap for right module
* Minor matrix.c fixes
* Update Readmes
Diffstat (limited to 'drivers/avr/i2c_slave.h')
-rwxr-xr-x | drivers/avr/i2c_slave.h | 10 |
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 | |||
11 | volatile uint8_t buffer_address; | 14 | volatile uint8_t buffer_address; |
12 | volatile uint8_t txbuffer[0xFF]; | 15 | static volatile bool slave_has_register_set = false; |
13 | volatile uint8_t rxbuffer[0xFF]; | 16 | volatile uint8_t txbuffer[TX_BUFFER_SIZE]; |
17 | volatile uint8_t rxbuffer[RX_BUFFER_SIZE]; | ||
14 | 18 | ||
15 | void i2c_init(uint8_t address); | 19 | void i2c_init(uint8_t address); |
16 | void i2c_stop(void); | 20 | void i2c_stop(void); |
17 | ISR(TWI_vect); | 21 | ISR(TWI_vect); |
18 | 22 | ||
19 | #endif // I2C_SLAVE_H | 23 | #endif // I2C_SLAVE_H \ No newline at end of file |