aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/api.c
diff options
context:
space:
mode:
authorGravatar Jack Humbert <jack.humb@gmail.com>2016-12-19 11:18:18 -0500
committerGravatar Jack Humbert <jack.humb@gmail.com>2016-12-19 11:18:18 -0500
commit06c64bbff3e228df542149acde64eadaf59b9b0f (patch)
tree9bda86e11116ba8f66de345fd4ce940c2698d630 /quantum/api.c
parentae95834f5af7404c04e6fe3446019046278d814b (diff)
downloadqmk_firmware-06c64bbff3e228df542149acde64eadaf59b9b0f.tar.gz
rgb clean-up, api clean-up
Diffstat (limited to 'quantum/api.c')
-rw-r--r--quantum/api.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/quantum/api.c b/quantum/api.c
index 4ca3b9676..6a7c0a433 100644
--- a/quantum/api.c
+++ b/quantum/api.c
@@ -116,28 +116,29 @@ void process_api(uint16_t length, uint8_t * data) {
MT_GET_DATA_ACK(DT_KEYMAP_SIZE, keymap_size, 2);
break;
}
- case DT_KEYMAP: {
- uint8_t keymap_data[MATRIX_ROWS * MATRIX_COLS * 4 + 3];
- keymap_data[0] = data[2];
- keymap_data[1] = MATRIX_ROWS;
- keymap_data[2] = MATRIX_COLS;
- for (int i = 0; i < MATRIX_ROWS; i++) {
- for (int j = 0; j < MATRIX_COLS; j++) {
- keymap_data[3 + (i*MATRIX_COLS*2) + (j*2)] = pgm_read_word(&keymaps[data[2]][i][j]) >> 8;
- keymap_data[3 + (i*MATRIX_COLS*2) + (j*2) + 1] = pgm_read_word(&keymaps[data[2]][i][j]) & 0xFF;
- }
- }
- MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, MATRIX_ROWS * MATRIX_COLS * 4 + 3);
- // uint8_t keymap_data[5];
- // keymap_data[0] = data[2];
- // keymap_data[1] = data[3];
- // keymap_data[2] = data[4];
- // keymap_data[3] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) >> 8;
- // keymap_data[4] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) & 0xFF;
+ // This may be too much
+ // case DT_KEYMAP: {
+ // uint8_t keymap_data[MATRIX_ROWS * MATRIX_COLS * 4 + 3];
+ // keymap_data[0] = data[2];
+ // keymap_data[1] = MATRIX_ROWS;
+ // keymap_data[2] = MATRIX_COLS;
+ // for (int i = 0; i < MATRIX_ROWS; i++) {
+ // for (int j = 0; j < MATRIX_COLS; j++) {
+ // keymap_data[3 + (i*MATRIX_COLS*2) + (j*2)] = pgm_read_word(&keymaps[data[2]][i][j]) >> 8;
+ // keymap_data[3 + (i*MATRIX_COLS*2) + (j*2) + 1] = pgm_read_word(&keymaps[data[2]][i][j]) & 0xFF;
+ // }
+ // }
+ // MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, MATRIX_ROWS * MATRIX_COLS * 4 + 3);
+ // // uint8_t keymap_data[5];
+ // // keymap_data[0] = data[2];
+ // // keymap_data[1] = data[3];
+ // // keymap_data[2] = data[4];
+ // // keymap_data[3] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) >> 8;
+ // // keymap_data[4] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) & 0xFF;
- // MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, 5);
- break;
- }
+ // // MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, 5);
+ // break;
+ // }
default:
break;
}