summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/config.h136
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk2
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/config.h140
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk2
-rw-r--r--keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c4
-rw-r--r--keyboards/handwired/myskeeb/oled.c2
-rw-r--r--keyboards/handwired/nicekey/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c4
-rw-r--r--keyboards/handwired/promethium/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c2
-rw-r--r--keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c2
11 files changed, 29 insertions, 269 deletions
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h
index 1f07965555..0bff14a28d 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h
@@ -15,137 +15,25 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
+#undef VENDOR_ID
+#undef PRODUCT_ID
+#undef DEVICE_VER
+#undef MANUFACTURER
+#undef PRODUCT
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x4097
#define DEVICE_VER 0x0001
-#define MANUFACTURER Nobody
-#define PRODUCT Arrow Pad 21
+#define MANUFACTURER "Nobody"
+#define PRODUCT "Arrow Pad 21"
-/* key matrix size */
+#undef MATRIX_ROWS
+#undef MATRIX_COLS
#define MATRIX_ROWS 2
#define MATRIX_COLS 11
-/*
- * Keyboard Matrix Assignments
- *
- * Change this to how you wired your keyboard
- * COLS: AVR pins used for columns, left to right
- * ROWS: AVR pins used for rows, top to bottom
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
- * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
- *
-*/
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
#define MATRIX_ROW_PINS { D3, D5 }
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 5
-
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-//#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-//#define LOCKING_RESYNC_ENABLE
-
-/*
- * Force NKRO
- *
- * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
- * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
- * makefile for this to work.)
- *
- * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
- * until the next keyboard reset.
- *
- * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
- * fully operational during normal computer usage.
- *
- * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
- * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
- * bootmagic, NKRO mode will always be enabled until it is toggled again during a
- * power-up.
- *
- */
-#define FORCE_NKRO
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1 H
-//#define MAGIC_KEY_HELP2 SLASH
-//#define MAGIC_KEY_DEBUG D
-//#define MAGIC_KEY_DEBUG_MATRIX X
-//#define MAGIC_KEY_DEBUG_KBD K
-//#define MAGIC_KEY_DEBUG_MOUSE M
-//#define MAGIC_KEY_VERSION V
-//#define MAGIC_KEY_STATUS S
-//#define MAGIC_KEY_CONSOLE C
-//#define MAGIC_KEY_LAYER0_ALT1 ESC
-//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
-//#define MAGIC_KEY_LAYER0 0
-//#define MAGIC_KEY_LAYER1 1
-//#define MAGIC_KEY_LAYER2 2
-//#define MAGIC_KEY_LAYER3 3
-//#define MAGIC_KEY_LAYER4 4
-//#define MAGIC_KEY_LAYER5 5
-//#define MAGIC_KEY_LAYER6 6
-//#define MAGIC_KEY_LAYER7 7
-//#define MAGIC_KEY_LAYER8 8
-//#define MAGIC_KEY_LAYER9 9
-//#define MAGIC_KEY_BOOTLOADER PAUSE
-//#define MAGIC_KEY_LOCK CAPS
-//#define MAGIC_KEY_EEPROM E
-//#define MAGIC_KEY_NKRO N
-//#define MAGIC_KEY_SLEEP_LED Z
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk
index 6fae940a50..d3e5864916 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk
@@ -10,5 +10,3 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-
-CONFIG_H = keymaps/$(KEYMAP)/config.h \ No newline at end of file
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h
index 4bc89f5ce7..3f9997b380 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h
@@ -15,139 +15,15 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
+#undef VENDOR_ID
+#undef PRODUCT_ID
+#undef DEVICE_VER
+#undef MANUFACTURER
+#undef PRODUCT
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x4096
#define DEVICE_VER 0x0001
-#define MANUFACTURER Nobody
-#define PRODUCT Arrow Pad 24
-
-/* key matrix size */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 4
-
-/*
- * Keyboard Matrix Assignments
- *
- * Change this to how you wired your keyboard
- * COLS: AVR pins used for columns, left to right
- * ROWS: AVR pins used for rows, top to bottom
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
- * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
- *
-*/
-#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 }
-#define MATRIX_COL_PINS { B0, B1, B2, B3 }
-
-#define BACKLIGHT_PIN B7
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 5
-
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-//#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-//#define LOCKING_RESYNC_ENABLE
-
-/*
- * Force NKRO
- *
- * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
- * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
- * makefile for this to work.)
- *
- * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
- * until the next keyboard reset.
- *
- * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
- * fully operational during normal computer usage.
- *
- * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
- * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
- * bootmagic, NKRO mode will always be enabled until it is toggled again during a
- * power-up.
- *
- */
-#define FORCE_NKRO
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1 H
-//#define MAGIC_KEY_HELP2 SLASH
-//#define MAGIC_KEY_DEBUG D
-//#define MAGIC_KEY_DEBUG_MATRIX X
-//#define MAGIC_KEY_DEBUG_KBD K
-//#define MAGIC_KEY_DEBUG_MOUSE M
-//#define MAGIC_KEY_VERSION V
-//#define MAGIC_KEY_STATUS S
-//#define MAGIC_KEY_CONSOLE C
-//#define MAGIC_KEY_LAYER0_ALT1 ESC
-//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
-//#define MAGIC_KEY_LAYER0 0
-//#define MAGIC_KEY_LAYER1 1
-//#define MAGIC_KEY_LAYER2 2
-//#define MAGIC_KEY_LAYER3 3
-//#define MAGIC_KEY_LAYER4 4
-//#define MAGIC_KEY_LAYER5 5
-//#define MAGIC_KEY_LAYER6 6
-//#define MAGIC_KEY_LAYER7 7
-//#define MAGIC_KEY_LAYER8 8
-//#define MAGIC_KEY_LAYER9 9
-//#define MAGIC_KEY_BOOTLOADER PAUSE
-//#define MAGIC_KEY_LOCK CAPS
-//#define MAGIC_KEY_EEPROM E
-//#define MAGIC_KEY_NKRO N
-//#define MAGIC_KEY_SLEEP_LED Z
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
+#define MANUFACTURER "Nobody"
+#define PRODUCT "Arrow Pad 24"
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk
index 1cf01b79e4..d7fdd82dfe 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk
@@ -10,5 +10,3 @@ AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-
-CONFIG_H = keymaps/$(KEYMAP)/config.h \ No newline at end of file
diff --git a/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c b/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c
index c2eb4406d1..bc5b025b48 100644
--- a/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c
+++ b/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c
@@ -191,8 +191,8 @@ void keyboard_post_init_user(void) {
const pin_t pins[] = {D0, D1, D2};
uint8_t i, j;
- for (i = 0 ; i < sizeof(pins) / sizeof(pins[0]) + 2 ; i += 1) {
- for (j = 0 ; j < sizeof(pins) / sizeof(pins[0]) ; j += 1) {
+ for (i = 0 ; i < ARRAY_SIZE(pins) + 2 ; i += 1) {
+ for (j = 0 ; j < ARRAY_SIZE(pins); j += 1) {
setPinOutput(pins[j]);
writePin(pins[j], (j == i || j == i - 1));
}
diff --git a/keyboards/handwired/myskeeb/oled.c b/keyboards/handwired/myskeeb/oled.c
index 081ca8395a..3f43590b8e 100644
--- a/keyboards/handwired/myskeeb/oled.c
+++ b/keyboards/handwired/myskeeb/oled.c
@@ -183,7 +183,7 @@ void add_keylog(uint16_t keycode) {
keylog_str[i] = keylog_str[i - 1];
}
- if (keycode < (sizeof(code_to_name) / sizeof(char))) {
+ if (keycode < ARRAY_SIZE(code_to_name)) {
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
}
}
diff --git a/keyboards/handwired/nicekey/keymaps/default/keymap.c b/keyboards/handwired/nicekey/keymaps/default/keymap.c
index d7539a5c17..a4391eaa30 100644
--- a/keyboards/handwired/nicekey/keymaps/default/keymap.c
+++ b/keyboards/handwired/nicekey/keymaps/default/keymap.c
@@ -116,7 +116,7 @@ PGM_P const sentences[] PROGMEM = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
- int sentences_size = sizeof(sentences) / sizeof(sentences[0]);
+ int sentences_size = ARRAY_SIZE(sentences);
int i = rand() % sentences_size;
switch (keycode) {
diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
index ecf67d3b3c..65983c8dd8 100644
--- a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
@@ -34,11 +34,11 @@ static const uint32_t waiting_values[] = {0, 1, 5, 10, 25, 50, 100, 150, 200, 50
void housekeeping_task_user(void) {
static uint32_t last_bench = 0;
if (timer_elapsed32(last_bench) > 500) {
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
+ for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) {
wait_us_polling_with_strobe(waiting_values[i]);
wait_us(10);
}
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
+ for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) {
wait_us_yield_with_strobe(waiting_values[i]);
wait_us(10);
}
diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c
index 77f83361e6..fcfcf51f24 100644
--- a/keyboards/handwired/promethium/keymaps/default/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/default/keymap.c
@@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#include "outputselect.h"
#include "led.h"
-#define COUNT(x) (sizeof (x) / sizeof (*(x)))
+#define COUNT(x) ARRAY_SIZE((x))
#define KC_WWWB KC_WWW_BACK
#define KC_WWWF KC_WWW_FORWARD
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 31ce811e53..4df95111a7 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "outputselect.h"
#endif
#include "led.h"
-#define COUNT(x) (sizeof (x) / sizeof (*(x)))
+#define COUNT(x) ARRAY_SIZE((x))
#define KC_WWWB KC_WWW_BACK
#define KC_WWWF KC_WWW_FORWARD
diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
index ba0018a70f..7e15761a98 100644
--- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
+++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
@@ -159,7 +159,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
do {
MATRIX_DEBUG_DELAY_START();
is_pressed = false;
- for (uint8_t i = 0; i < sizeof(delay_ports) / sizeof(pin_t); i++) {
+ for (uint8_t i = 0; i < ARRAY_SIZE(delay_ports); i++) {
# ifdef MATRIX_IO_DELAY_MULSEL
writePin(MATRIX_MUL_SELECT, delay_sel[i]);
waitInputPinDelay();