Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add akb/vero #18652

Merged
merged 11 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
arnstadm committed Oct 9, 2022
commit d49b0166d5639f0da90b435d4ec589a1765fb790
108 changes: 108 additions & 0 deletions keyboards/treasure/type9/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
Copyright 2018 MechMerlin

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 <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "config_common.h"

/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 3

/*
* 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 { E6, D7, C6 }
#define MATRIX_COL_PINS { D1, D0, D4 }

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL

#define BACKLIGHT_PIN B5
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 10

// #define RGB_DI_PIN E2
// #ifdef RGB_DI_PIN
// #define RGBLIGHT_ANIMATIONS
// #define RGBLED_NUM 16
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// #endif

/* 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 */

/* 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

/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE

/*
* 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

/*
* 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
16 changes: 16 additions & 0 deletions keyboards/treasure/type9/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"keyboard_name": "Type-9",
"manufacturer": "Treasure",
"url": "",
"maintainer": "qmk",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "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}]
}
}
}
52 changes: 52 additions & 0 deletions keyboards/treasure/type9/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Copyright 2018 MechMerlin
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H

// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
KC_0, KC_1, KC_2,
KC_3, KC_4, KC_5,
KC_6, KC_7, KC_8
),
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
1 change: 1 addition & 0 deletions keyboards/treasure/type9/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# The default keymap for Type-9
13 changes: 13 additions & 0 deletions keyboards/treasure/type9/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Type-9

3x3 Macropad.

Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Treasure Macropad Type-9
Hardware Availability: [Treasure](http://macropad.co/)

Make example for this keyboard (after setting up your build environment):

make treasure/type9: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).
18 changes: 18 additions & 0 deletions keyboards/treasure/type9/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
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
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
16 changes: 16 additions & 0 deletions keyboards/treasure/type9/type9.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright 2018 MechMerlin
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "type9.h"
37 changes: 37 additions & 0 deletions keyboards/treasure/type9/type9.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Copyright 2018 MechMerlin
*
* 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 <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "quantum.h"

/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
k00, k01, k02, \
k10, k11, k12, \
k20, k21, k22 \
) { \
{ k00, k01, k02 }, \
{ k10, k11, k12 }, \
{ k20, k21, k22 } \
}
42 changes: 42 additions & 0 deletions keyboards/treasure/type9s2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* Copyright 2021 Treasure

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 <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "config_common.h"

/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 3

/* Keyboard Matrix Assignments*/
#define MATRIX_ROW_PINS { B4, B5, D2 }
#define MATRIX_COL_PINS { B2, B3, C5 }

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define BACKLIGHT_PIN B7

/* 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

26 changes: 26 additions & 0 deletions keyboards/treasure/type9s2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"keyboard_name": "Type-9 Series II",
"manufacturer": "Treasure",
"url": "http://treasuretypes.com",
"maintainer": "Treasure",
"usb": {
"vid": "0x5452",
"pid": "0x5492",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{"label": "7", "x": 0, "y": 0},
{"label": "8", "x": 1, "y": 0},
{"label": "9", "x": 2, "y": 0},
{"label": "4", "x": 0, "y": 1},
{"label": "5", "x": 1, "y": 1},
{"label": "6", "x": 2, "y": 1},
{"label": "1", "x": 0, "y": 2},
{"label": "2", "x": 1, "y": 2},
{"label": "3", "x": 2, "y": 2}
]
}
}
}
43 changes: 43 additions & 0 deletions keyboards/treasure/type9s2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* Copyright 2021 Treasure
*
* 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 <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_3x3(
MO(1), KC_MPLY, BL_STEP,
KC_VOLD, KC_MUTE, KC_VOLU,
KC_KP_1, KC_KP_2, KC_KP_3
),

[1] = LAYOUT_ortho_3x3(
_______, _______, MO(2),
_______, _______, _______,
_______, _______, _______
),

[2] = LAYOUT_ortho_3x3(
_______, _______, _______,
_______, _______, _______,
_______, _______, MO(3)
),

[3] = LAYOUT_ortho_3x3(
_______, _______, _______,
_______, _______, _______,
QK_BOOT, _______, _______
)
};
1 change: 1 addition & 0 deletions keyboards/treasure/type9s2/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# The default keymap for Type-9 Series II
Loading