diff options
Diffstat (limited to 'keyboards/dc01/numpad/matrix.c')
| -rw-r--r-- | keyboards/dc01/numpad/matrix.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c index f8b725adc..a56c338ec 100644 --- a/keyboards/dc01/numpad/matrix.c +++ b/keyboards/dc01/numpad/matrix.c | |||
| @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 32 | #include "i2c_slave.h" | 32 | #include "i2c_slave.h" |
| 33 | #include "lufa.h" | 33 | #include "lufa.h" |
| 34 | 34 | ||
| 35 | #define SLAVE_I2C_ADDRESS 0x21 | 35 | #define SLAVE_I2C_ADDRESS 0x36 |
| 36 | 36 | ||
| 37 | /* Set 0 if debouncing isn't needed */ | 37 | /* Set 0 if debouncing isn't needed */ |
| 38 | 38 | ||
| @@ -196,12 +196,10 @@ uint8_t matrix_scan(void) | |||
| 196 | } | 196 | } |
| 197 | # endif | 197 | # endif |
| 198 | 198 | ||
| 199 | if (USB_DeviceState != DEVICE_STATE_Configured){ | 199 | i2c_slave_reg[1] = 0x55; |
| 200 | i2c_slave_reg[1] = 0x55; | 200 | for (uint8_t i = 0; i < MATRIX_ROWS; i++){ |
| 201 | for (uint8_t i = 0; i < MATRIX_ROWS; i++){ | 201 | i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c |
| 202 | i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c | 202 | } |
| 203 | } | ||
| 204 | } | ||
| 205 | 203 | ||
| 206 | matrix_scan_quantum(); | 204 | matrix_scan_quantum(); |
| 207 | return 1; | 205 | return 1; |
| @@ -396,9 +394,6 @@ static void unselect_cols(void) | |||
| 396 | 394 | ||
| 397 | //this replases tmk code | 395 | //this replases tmk code |
| 398 | void matrix_setup(void){ | 396 | void matrix_setup(void){ |
| 399 | 397 | i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c | |
| 400 | if (USB_DeviceState != DEVICE_STATE_Configured){ | 398 | 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 | 399 | } \ No newline at end of file |
