diff options
Diffstat (limited to 'keyboards/mechlovin/hex4b')
-rw-r--r-- | keyboards/mechlovin/hex4b/config.h | 5 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/info.json | 6 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c | 28 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev1/config.h | 5 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev1/info.json | 6 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev2/config.h | 7 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev2/info.json | 6 | ||||
-rw-r--r-- | keyboards/mechlovin/hex4b/rev2/readme.md | 2 |
8 files changed, 32 insertions, 33 deletions
diff --git a/keyboards/mechlovin/hex4b/config.h b/keyboards/mechlovin/hex4b/config.h index c8176d76b5..4126b720b7 100644 --- a/keyboards/mechlovin/hex4b/config.h +++ b/keyboards/mechlovin/hex4b/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4D4C -#define PRODUCT_ID 0x0675 //Hex-75 -#define MANUFACTURER Mechlovin Studio - /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 15 diff --git a/keyboards/mechlovin/hex4b/info.json b/keyboards/mechlovin/hex4b/info.json index 686d79cc0e..2edd39b3e2 100644 --- a/keyboards/mechlovin/hex4b/info.json +++ b/keyboards/mechlovin/hex4b/info.json @@ -1,7 +1,11 @@ { - "keyboard_name": "Hex4B", + "manufacturer": "Mechlovin Studio", "url": "", "maintainer": "Hex-Keyboard&Mechlovin", + "usb": { + "vid": "0x4D4C", + "pid": "0x0675" + }, "layout_aliases": { "LAYOUT": "LAYOUT_split_bs", "LAYOUT_all": "LAYOUT_split_bs" diff --git a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c index 437233be52..e0634d85dc 100644 --- a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c +++ b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c @@ -53,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - + // Toggle CAPS_LOCK LED normally - + # if LED_PIN_ON_STATE == 0 // invert the whole thing to avoid having to conditionally !led_state.x later led_state.raw = ~led_state.raw; @@ -69,30 +69,30 @@ bool led_update_user(led_t led_state) { } layer_state_t layer_state_set_user(layer_state_t state) { - - uint8_t layer = biton32(state); - + + uint8_t layer = get_highest_layer(state); + #if defined(LED_NUM_LOCK_PIN) && defined(LED_SCROLL_LOCK_PIN) switch (layer) { case 0: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 1: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 2: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; case 3: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; } #endif - return state; + return state; } diff --git a/keyboards/mechlovin/hex4b/rev1/config.h b/keyboards/mechlovin/hex4b/rev1/config.h index 014209cefd..8afeeaf593 100644 --- a/keyboards/mechlovin/hex4b/rev1/config.h +++ b/keyboards/mechlovin/hex4b/rev1/config.h @@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define DEVICE_VER 0x0001 -#define PRODUCT Hex-4B Rev.1 - /* * Keyboard Matrix Assignments * @@ -36,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B7, A2, A1, A3, A4, A5 } #define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, D1, D0 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN D6 #define LED_CAPS_LOCK_PIN D7 diff --git a/keyboards/mechlovin/hex4b/rev1/info.json b/keyboards/mechlovin/hex4b/rev1/info.json new file mode 100644 index 0000000000..b2dfdec696 --- /dev/null +++ b/keyboards/mechlovin/hex4b/rev1/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Hex-4B Rev.1", + "usb": { + "device_version": "0.0.1" + } +} diff --git a/keyboards/mechlovin/hex4b/rev2/config.h b/keyboards/mechlovin/hex4b/rev2/config.h index af956f3ec0..9eb4e03feb 100644 --- a/keyboards/mechlovin/hex4b/rev2/config.h +++ b/keyboards/mechlovin/hex4b/rev2/config.h @@ -19,12 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define DEVICE_VER 0x0002 -#define PRODUCT Hex-4B Rev.2 - - - /* * Keyboard Matrix Assignments * @@ -38,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, A3, C13, B7, B6, B5, B4, B3 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN C15 #define LED_CAPS_LOCK_PIN B9 diff --git a/keyboards/mechlovin/hex4b/rev2/info.json b/keyboards/mechlovin/hex4b/rev2/info.json new file mode 100644 index 0000000000..da18a2ce4b --- /dev/null +++ b/keyboards/mechlovin/hex4b/rev2/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Hex-4B Rev.2", + "usb": { + "device_version": "0.0.2" + } +} diff --git a/keyboards/mechlovin/hex4b/rev2/readme.md b/keyboards/mechlovin/hex4b/rev2/readme.md index 328c869704..01ae8ea724 100644 --- a/keyboards/mechlovin/hex4b/rev2/readme.md +++ b/keyboards/mechlovin/hex4b/rev2/readme.md @@ -24,5 +24,5 @@ Enter the bootloader in 3 ways: * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard * **Bootloader reset**: Hold down the key at (0,13) in the matrix (Backspace) and plug in the keyboard -* **Keycode in layout**: Press the key mapped to `RESET` if it is available +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available * **Hardware reset**: Press reset button (located on the top side of the PCB)
\ No newline at end of file |