diff --git a/czmao/a17_ds17r3/keyboard.json b/czmao/a17_ds17r3/keyboard.json new file mode 100644 index 00000000000..958235156ed --- /dev/null +++ b/czmao/a17_ds17r3/keyboard.json @@ -0,0 +1,128 @@ +{ + "keyboard_name": "mao_DS17R3_R", + "manufacturer": "CZMAO", + "url": "https://github.com/micahyy/czmao/tree/main/ds17_solder", + "maintainer": "MAOKB", + "diode_direction": "COL2ROW", + "processor": "STM32F103", + "bootloader": "stm32duino", + "usb": { + "vid": "0x4A17", + "pid": "0x4A18", + "device_version": "1.0.0" + }, + "host": { + "default": { + "nkro": true + } + }, + "features": { + "bootmagic":true, + "commands":true, + "console":true, + "extrakey":true, + "mousekey":true, + "nkro":true, + "rgb_matrix":true + }, + "dynamic_keymap": { + "layer_count":8 + }, + "matrix_pins": { + "cols": ["B12", "B14", "B15", "A8"], + "rows": ["A9", "A10", "A15", "B3", "B4"] + }, + "ws2812": { + "pin": "B13" + }, + "rgb_matrix": { + "animations": { + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "typing_heatmap": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "driver": "ws2812", + "max_brightness":180, + "default":{ + "animation":"cycle_up_down" + }, + "layout": [ + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 }, + { "flags": 4, "matrix": [0, 1], "x": 75, "y": 0 }, + { "flags": 4, "matrix": [0, 2], "x": 150, "y": 0 }, + { "flags": 4, "matrix": [0, 3], "x": 224, "y": 0 }, + { "flags": 4, "matrix": [1, 0], "x": 0, "y": 16 }, + { "flags": 4, "matrix": [1, 1], "x": 75, "y": 16 }, + { "flags": 4, "matrix": [1, 2], "x": 150, "y": 16 }, + { "flags": 4, "matrix": [1, 3], "x": 224, "y": 24 }, + { "flags": 4, "matrix": [2, 0], "x": 0, "y": 32 }, + { "flags": 4, "matrix": [2, 1], "x": 75, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 150, "y": 32 }, + { "flags": 4, "matrix": [3, 0], "x": 0, "y": 48 }, + { "flags": 4, "matrix": [3, 1], "x": 75, "y": 48 }, + { "flags": 4, "matrix": [3, 2], "x": 150, "y": 48 }, + { "flags": 4, "matrix": [3, 3], "x": 224, "y": 56 }, + { "flags": 4, "matrix": [4, 0], "x": 75, "y": 64 }, + { "flags": 4, "matrix": [4, 2], "x": 150, "y": 64 } + ], + "sleep": true + }, + "community_layouts": ["numpad_5x4"], + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"label":"FN", "matrix": [0,0],"x":0,"y":0}, + {"label":"PSLS", "matrix": [0,1],"x":1,"y":0}, + {"label":"PAST", "matrix": [0,2],"x":2,"y":0}, + {"label":"PMNS", "matrix": [0,3],"x":3,"y":0}, + {"label":"P7", "matrix": [1,0],"x":0,"y":1}, + {"label":"P8", "matrix": [1,1],"x":1,"y":1}, + {"label":"P9", "matrix": [1,2],"x":2,"y":1}, + {"label":"P4", "matrix": [2,0],"x":0,"y":2}, + {"label":"P5", "matrix": [2,1],"x":1,"y":2}, + {"label":"P6", "matrix": [2,2],"x":2,"y":2}, + {"label":"PPLS", "matrix": [1,3],"x":3,"y":1,"h":2}, + {"label":"P1", "matrix": [3,0],"x":0,"y":3}, + {"label":"P2", "matrix": [3,1],"x":1,"y":3}, + {"label":"P3", "matrix": [3,2],"x":2,"y":3}, + {"label":"P0", "matrix": [4,0],"x":0,"y":4, "w": 2}, + {"label":"PDOT", "matrix": [4,2],"x":2,"y":4}, + {"label":"PENT", "matrix": [3,3],"x":3,"y":3,"h":2} + ] + } + } +} diff --git a/czmao/a17_ds17r3/keymaps/default/keymap.c b/czmao/a17_ds17r3/keymaps/default/keymap.c new file mode 100644 index 00000000000..b17e76e28cf --- /dev/null +++ b/czmao/a17_ds17r3/keymaps/default/keymap.c @@ -0,0 +1,80 @@ +/* +Copyright 2012,2013 Jun Wako + +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] = { + [0] = LAYOUT_numpad_5x4( +//1 2 3 4 +LT(1,KC_NUM), LT(2,KC_PSLS), LT(3,KC_PAST), LT(4,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 + ), + [1] = LAYOUT_numpad_5x4( +KC_TRNS, KC_NUM, MO(2), KC_CALC, +KC_HOME, KC_UP, KC_PGUP, +KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, +KC_END, KC_DOWN, KC_PGDN, +KC_LSFT, KC_RSFT, KC_N + ), + [2] = LAYOUT_numpad_5x4( +KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, +RGB_TOG, RGB_SAI, KC_TRNS, +RGB_HUD, EE_CLR, RGB_HUI, RGB_VAD, +KC_TRNS, RGB_SAD, KC_TRNS, +RGB_MOD, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_numpad_5x4( +KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, +KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS + ) +}; +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // num lock cyan + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(0, 255, 255, 255); + } + // layer state + switch (get_highest_layer(layer_state)) { + case 1: + RGB_MATRIX_INDICATOR_SET_COLOR(11, 255, 255, 255); + break; + case 2: + RGB_MATRIX_INDICATOR_SET_COLOR(12, 255, 255, 255); + break; + case 3: + RGB_MATRIX_INDICATOR_SET_COLOR(13, 255, 255, 255); + break; + case 4: + RGB_MATRIX_INDICATOR_SET_COLOR(8, 255, 255, 255); + break; + case 5: + RGB_MATRIX_INDICATOR_SET_COLOR(9, 255, 255, 255); + break; + case 6: + RGB_MATRIX_INDICATOR_SET_COLOR(10, 255, 255, 255); + break; + case 7: + RGB_MATRIX_INDICATOR_SET_COLOR(4, 255, 255, 255); + break; + } + return false; +} + diff --git a/czmao/a17_ds17r3/readme.md b/czmao/a17_ds17r3/readme.md new file mode 100644 index 00000000000..527d5afb314 --- /dev/null +++ b/czmao/a17_ds17r3/readme.md @@ -0,0 +1,30 @@ +# mao ds 17r3 Righthand + +A 17keys numberpad keyboard with RGB backlight. +This keyboard use APM32F103CBT6(STM32F103CBT6) as MCU. + +- Keyboard Maintainer: https://github.com/micahyy +- Hardware Supported: CZMAO +- Hardware Availability: [TaoBao](https://item.taobao.com/item.htm?ft=t&id=819874589305) + + make czmao/a17_ds17r3:default + +- Flashing example for this keyboard: + make czmao/a17_ds17r3:default:flash + + + + +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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Bootmagic reset**: Hold down the key Number Lock and plug in the keyboard +* **Physical reset button**: Briefly short the reset keys on the back of the PCB + + + + +