diff options
| author | Joshua Diamond <josh@windowoffire.com> | 2021-02-15 20:55:54 -0500 |
|---|---|---|
| committer | Joshua Diamond <josh@windowoffire.com> | 2021-02-15 20:55:54 -0500 |
| commit | d36dbe66e1b9146df85586b46c58e51a3dbb3653 (patch) | |
| tree | f1e8f2e518e7583b7fc4162c7f06c1193844d927 /keyboards/dc01/right/matrix.c | |
| parent | b0e161e33d8ec030c6965daa57a76ec70b1a1122 (diff) | |
| parent | 3fed8bced718e24e414c0d5736554d7988235b20 (diff) | |
| download | qmk_firmware-d36dbe66e1b9146df85586b46c58e51a3dbb3653.tar.gz qmk_firmware-d36dbe66e1b9146df85586b46c58e51a3dbb3653.zip | |
Merge branch 'master' into develop
Diffstat (limited to 'keyboards/dc01/right/matrix.c')
| -rw-r--r-- | keyboards/dc01/right/matrix.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c index 833845343..544c8dc53 100644 --- a/keyboards/dc01/right/matrix.c +++ b/keyboards/dc01/right/matrix.c | |||
| @@ -31,8 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 31 | #include "timer.h" | 31 | #include "timer.h" |
| 32 | #include "i2c_slave.h" | 32 | #include "i2c_slave.h" |
| 33 | #include "lufa.h" | 33 | #include "lufa.h" |
| 34 | #include "quantum.h" | ||
| 34 | 35 | ||
| 35 | #define SLAVE_I2C_ADDRESS 0x19 | 36 | #define SLAVE_I2C_ADDRESS 0x32 |
| 36 | 37 | ||
| 37 | /* Set 0 if debouncing isn't needed */ | 38 | /* Set 0 if debouncing isn't needed */ |
| 38 | 39 | ||
| @@ -196,12 +197,10 @@ uint8_t matrix_scan(void) | |||
| 196 | } | 197 | } |
| 197 | # endif | 198 | # endif |
| 198 | 199 | ||
| 199 | if (USB_DeviceState != DEVICE_STATE_Configured){ | 200 | i2c_slave_reg[1] = 0x55; |
| 200 | i2c_slave_reg[1] = 0x55; | 201 | for (uint8_t i = 0; i < MATRIX_ROWS; i++){ |
| 201 | for (uint8_t i = 0; i < MATRIX_ROWS; i++){ | 202 | i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c |
| 202 | i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c | 203 | } |
| 203 | } | ||
| 204 | } | ||
| 205 | 204 | ||
| 206 | matrix_scan_quantum(); | 205 | matrix_scan_quantum(); |
| 207 | return 1; | 206 | return 1; |
| @@ -396,9 +395,6 @@ static void unselect_cols(void) | |||
| 396 | 395 | ||
| 397 | //this replases tmk code | 396 | //this replases tmk code |
| 398 | void matrix_setup(void){ | 397 | void matrix_setup(void){ |
| 399 | 398 | i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c | |
| 400 | if (USB_DeviceState != DEVICE_STATE_Configured){ | 399 | sei(); //enable interupts |
| 401 | i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c | ||
| 402 | sei(); //enable interupts | ||
| 403 | } | ||
| 404 | } \ No newline at end of file | 400 | } \ No newline at end of file |
