From e999ade1003359d7b2a2d95036cd8de848726047 Mon Sep 17 00:00:00 2001
From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com>
Date: Mon, 27 Jul 2020 22:03:54 -0400
Subject: [PATCH] [Keyboard] Numeros macropad (#9725)
* First Push
* Update config.h
* Update numeros.c
* Update numeros.h
* Update rules.mk
* Update keyboards/clawsome/numeros/keymaps/default/keymap.c
* Update keyboards/clawsome/numeros/readme.md
* Update keyboards/clawsome/numeros/rules.mk
* Update keyboards/clawsome/numeros/info.json
* Update keyboards/clawsome/numeros/info.json
* Update keyboards/clawsome/numeros/rules.mk
* Update keyboards/clawsome/numeros/numeros.h
* Update keyboards/clawsome/numeros/info.json
* Update keyboards/clawsome/numeros/keymaps/default/keymap.c
* Update keyboards/clawsome/numeros/numeros.h
* Update keyboards/clawsome/numeros/keymaps/default/keymap.c
* Update keyboards/clawsome/numeros/numeros.c
* Update keyboards/clawsome/numeros/config.h
* Update keyboards/clawsome/numeros/rules.mk
* Update keyboards/clawsome/numeros/readme.md
* Update keyboards/clawsome/numeros/readme.md
---
keyboards/clawsome/numeros/config.h | 46 +++++++++++++++++++
keyboards/clawsome/numeros/info.json | 35 ++++++++++++++
.../clawsome/numeros/keymaps/default/keymap.c | 40 ++++++++++++++++
keyboards/clawsome/numeros/numeros.c | 16 +++++++
keyboards/clawsome/numeros/numeros.h | 32 +++++++++++++
keyboards/clawsome/numeros/readme.md | 13 ++++++
keyboards/clawsome/numeros/rules.mk | 24 ++++++++++
7 files changed, 206 insertions(+)
create mode 100644 keyboards/clawsome/numeros/config.h
create mode 100644 keyboards/clawsome/numeros/info.json
create mode 100644 keyboards/clawsome/numeros/keymaps/default/keymap.c
create mode 100644 keyboards/clawsome/numeros/numeros.c
create mode 100644 keyboards/clawsome/numeros/numeros.h
create mode 100644 keyboards/clawsome/numeros/readme.md
create mode 100644 keyboards/clawsome/numeros/rules.mk
diff --git a/keyboards/clawsome/numeros/config.h b/keyboards/clawsome/numeros/config.h
new file mode 100644
index 0000000000..4c873ffb8d
--- /dev/null
+++ b/keyboards/clawsome/numeros/config.h
@@ -0,0 +1,46 @@
+/*
+Copyright 2020 AAClawson (AlisGraveNil)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x7767
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER AlisGraveNil
+#define PRODUCT Los Numeros
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#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 { D0, C6, B2, B6, B5 }
+#define MATRIX_COL_PINS { B3, E6, D7, D4 }
+
+#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/clawsome/numeros/info.json b/keyboards/clawsome/numeros/info.json
new file mode 100644
index 0000000000..9576e62218
--- /dev/null
+++ b/keyboards/clawsome/numeros/info.json
@@ -0,0 +1,35 @@
+{
+ "keyboard_name": "numeros",
+ "url": "www.clawboards.xyz",
+ "maintainer": "AAClawson (AlisGraveNil)",
+ "width": 4,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_numpad_5x4": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":3, "y":1, "h":2},
+
+ {"x":0, "y":3},
+ {"x":1, "y":3},
+ {"x":2, "y":3},
+
+ {"x":0, "y":4, "w":2},
+ {"x":2, "y":4},
+ {"x":3, "y":3, "h":2}
+ ]
+ }
+ }
+ ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
+}
diff --git a/keyboards/clawsome/numeros/keymaps/default/keymap.c b/keyboards/clawsome/numeros/keymaps/default/keymap.c
new file mode 100644
index 0000000000..6862913ca0
--- /dev/null
+++ b/keyboards/clawsome/numeros/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
+/* Copyright 2020 AAClawson (AlisGraveNil)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /*
+ * ---------------------
+ * |NUM | / | * | - |
+ * ---------------------
+ * | 7 | 8 | 9 | + |
+ * ---------------| |
+ * | 4 | 5 | 6 | |
+ * ---------------------
+ * | 1 | 2 | 3 |ENT |
+ * ---------------| |
+ * | 0 | . | |
+ * ---------------------
+ */
+ [0] = LAYOUT_numpad_5x4(
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3,
+ KC_P0, KC_PDOT, KC_PENT
+ ),
+
+};
diff --git a/keyboards/clawsome/numeros/numeros.c b/keyboards/clawsome/numeros/numeros.c
new file mode 100644
index 0000000000..daa7fb1b8d
--- /dev/null
+++ b/keyboards/clawsome/numeros/numeros.c
@@ -0,0 +1,16 @@
+/* Copyright 2020 AAClawson (AlisGraveNil)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+#include "numeros.h"
diff --git a/keyboards/clawsome/numeros/numeros.h b/keyboards/clawsome/numeros/numeros.h
new file mode 100644
index 0000000000..a7a8ee1e09
--- /dev/null
+++ b/keyboards/clawsome/numeros/numeros.h
@@ -0,0 +1,32 @@
+/* Copyright 2020 AAClawson (AlisGraveNil)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_numpad_5x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, \
+ K20, K21, K22, K13, \
+ K30, K31, K32, \
+ K40, K42, K33 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, KC_NO }, \
+ { K30, K31, K32, K33 }, \
+ { K40, KC_NO, K42, KC_NO }, \
+}
diff --git a/keyboards/clawsome/numeros/readme.md b/keyboards/clawsome/numeros/readme.md
new file mode 100644
index 0000000000..897f013043
--- /dev/null
+++ b/keyboards/clawsome/numeros/readme.md
@@ -0,0 +1,13 @@
+# Numeros
+
+This is a 5x4 numberpad.
+
+* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil)
+* Hardware Supported: Los Numeros, Pro Micro, Elite-C
+* Hardware Availability: www.clawboards.xyz
+
+Make example for this keyboard (after setting up your build environment):
+
+ make clawsome/numeros:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/clawsome/numeros/rules.mk b/keyboards/clawsome/numeros/rules.mk
new file mode 100644
index 0000000000..c0d663b113
--- /dev/null
+++ b/keyboards/clawsome/numeros/rules.mk
@@ -0,0 +1,24 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
+
+LAYOUTS = numpad_5x4