aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/planck/rev6_drop/halconf.h1
-rw-r--r--keyboards/planck/rev6_drop/matrix.c12
-rw-r--r--keyboards/planck/rev6_drop/mcuconf.h5
-rw-r--r--keyboards/preonic/rev3_drop/halconf.h1
-rw-r--r--keyboards/preonic/rev3_drop/matrix.c12
-rw-r--r--keyboards/preonic/rev3_drop/mcuconf.h4
6 files changed, 23 insertions, 12 deletions
diff --git a/keyboards/planck/rev6_drop/halconf.h b/keyboards/planck/rev6_drop/halconf.h
index 48b76d2f4..153eacb21 100644
--- a/keyboards/planck/rev6_drop/halconf.h
+++ b/keyboards/planck/rev6_drop/halconf.h
@@ -18,5 +18,6 @@
18#define HAL_USE_PWM TRUE 18#define HAL_USE_PWM TRUE
19#define HAL_USE_GPT TRUE 19#define HAL_USE_GPT TRUE
20#define HAL_USE_DAC TRUE 20#define HAL_USE_DAC TRUE
21#define HAL_USE_I2C TRUE
21 22
22#include_next <halconf.h> 23#include_next <halconf.h>
diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c
index 1fb6ba0d4..49e115d02 100644
--- a/keyboards/planck/rev6_drop/matrix.c
+++ b/keyboards/planck/rev6_drop/matrix.c
@@ -43,7 +43,7 @@ __attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
43__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } 43__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
44 44
45void matrix_init(void) { 45void matrix_init(void) {
46 printf("matrix init\n"); 46 dprintf("matrix init\n");
47 // debug_matrix = true; 47 // debug_matrix = true;
48 48
49 // actual matrix setup 49 // actual matrix setup
@@ -151,16 +151,16 @@ bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col));
151matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } 151matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
152 152
153void matrix_print(void) { 153void matrix_print(void) {
154 printf("\nr/c 01234567\n"); 154 dprintf("\nr/c 01234567\n");
155 for (uint8_t row = 0; row < MATRIX_ROWS; row++) { 155 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
156 printf("%X0: ", row); 156 dprintf("%X0: ", row);
157 matrix_row_t data = matrix_get_row(row); 157 matrix_row_t data = matrix_get_row(row);
158 for (int col = 0; col < MATRIX_COLS; col++) { 158 for (int col = 0; col < MATRIX_COLS; col++) {
159 if (data & (1 << col)) 159 if (data & (1 << col))
160 printf("1"); 160 dprintf("1");
161 else 161 else
162 printf("0"); 162 dprintf("0");
163 } 163 }
164 printf("\n"); 164 dprintf("\n");
165 } 165 }
166} 166}
diff --git a/keyboards/planck/rev6_drop/mcuconf.h b/keyboards/planck/rev6_drop/mcuconf.h
index 31abf13b6..d7c29fcf6 100644
--- a/keyboards/planck/rev6_drop/mcuconf.h
+++ b/keyboards/planck/rev6_drop/mcuconf.h
@@ -37,3 +37,8 @@
37// TIM2 to TIM3. 37// TIM2 to TIM3.
38#undef STM32_ST_USE_TIMER 38#undef STM32_ST_USE_TIMER
39#define STM32_ST_USE_TIMER 3 39#define STM32_ST_USE_TIMER 3
40
41// enable i2c
42#undef STM32_I2C_USE_I2C1
43#define STM32_I2C_USE_I2C1 TRUE
44
diff --git a/keyboards/preonic/rev3_drop/halconf.h b/keyboards/preonic/rev3_drop/halconf.h
index 48b76d2f4..153eacb21 100644
--- a/keyboards/preonic/rev3_drop/halconf.h
+++ b/keyboards/preonic/rev3_drop/halconf.h
@@ -18,5 +18,6 @@
18#define HAL_USE_PWM TRUE 18#define HAL_USE_PWM TRUE
19#define HAL_USE_GPT TRUE 19#define HAL_USE_GPT TRUE
20#define HAL_USE_DAC TRUE 20#define HAL_USE_DAC TRUE
21#define HAL_USE_I2C TRUE
21 22
22#include_next <halconf.h> 23#include_next <halconf.h>
diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c
index b094d28cd..392997e0a 100644
--- a/keyboards/preonic/rev3_drop/matrix.c
+++ b/keyboards/preonic/rev3_drop/matrix.c
@@ -43,7 +43,7 @@ __attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
43__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } 43__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
44 44
45void matrix_init(void) { 45void matrix_init(void) {
46 printf("matrix init\n"); 46 dprintf("matrix init\n");
47 // debug_matrix = true; 47 // debug_matrix = true;
48 48
49 // actual matrix setup 49 // actual matrix setup
@@ -153,16 +153,16 @@ bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col));
153matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } 153matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
154 154
155void matrix_print(void) { 155void matrix_print(void) {
156 printf("\nr/c 01234567\n"); 156 dprintf("\nr/c 01234567\n");
157 for (uint8_t row = 0; row < MATRIX_ROWS; row++) { 157 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
158 printf("%X0: ", row); 158 dprintf("%X0: ", row);
159 matrix_row_t data = matrix_get_row(row); 159 matrix_row_t data = matrix_get_row(row);
160 for (int col = 0; col < MATRIX_COLS; col++) { 160 for (int col = 0; col < MATRIX_COLS; col++) {
161 if (data & (1 << col)) 161 if (data & (1 << col))
162 printf("1"); 162 dprintf("1");
163 else 163 else
164 printf("0"); 164 dprintf("0");
165 } 165 }
166 printf("\n"); 166 dprintf("\n");
167 } 167 }
168} 168}
diff --git a/keyboards/preonic/rev3_drop/mcuconf.h b/keyboards/preonic/rev3_drop/mcuconf.h
index 31abf13b6..b51bf6708 100644
--- a/keyboards/preonic/rev3_drop/mcuconf.h
+++ b/keyboards/preonic/rev3_drop/mcuconf.h
@@ -37,3 +37,7 @@
37// TIM2 to TIM3. 37// TIM2 to TIM3.
38#undef STM32_ST_USE_TIMER 38#undef STM32_ST_USE_TIMER
39#define STM32_ST_USE_TIMER 3 39#define STM32_ST_USE_TIMER 3
40
41// enable i2c
42#undef STM32_I2C_USE_I2C1
43#define STM32_I2C_USE_I2C1 TRUE \ No newline at end of file