Browse Source

Merge branch 'macrocat' into master

pull/17490/head^2
李董睿煊 1 year ago
committed by GitHub
parent
commit
0d070ae304
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 26 deletions
  1. +0
    -5
      keyboards/macrocat/config.h
  2. +2
    -1
      keyboards/macrocat/info.json
  3. +1
    -0
      keyboards/macrocat/keymaps/oled/rules.mk
  4. +31
    -0
      keyboards/macrocat/keymaps/via/keymap.c
  5. +1
    -0
      keyboards/macrocat/keymaps/via/rules.mk
  6. +7
    -1
      keyboards/macrocat/macrocat.c
  7. +0
    -6
      keyboards/macrocat/macrocat.h
  8. +1
    -13
      keyboards/macrocat/rules.mk

+ 0
- 5
keyboards/macrocat/config.h View File

@ -9,8 +9,3 @@
#define ENCODERS_PAD_A { D3 }
#define ENCODERS_PAD_B { D2 }
#define ENCODER_SWITCH B7
#define VENDOR_ID 0x2022
#define PRODUCT_ID 0x8086
#define MANUFACTURER CatMunch
#define PRODUCT MacroCat Keyboard

+ 2
- 1
keyboards/macrocat/info.json View File

@ -10,7 +10,8 @@
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
"nkro": true,
"encoder": true
},
"matrix_pins": {
"cols": ["B5", "B6", "C6", "C7"],


+ 1
- 0
keyboards/macrocat/keymaps/oled/rules.mk View File

@ -1,2 +1,3 @@
VIA_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

+ 31
- 0
keyboards/macrocat/keymaps/via/keymap.c View File

@ -0,0 +1,31 @@
// Copyright 2022 catmunch (@catmunch)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = {
{KC_PPLS, KC_9, KC_8, KC_7 },
{KC_PMNS, KC_6, KC_5, KC_4 },
{KC_PDOT, KC_3, KC_2, KC_1 },
{KC_PENT, KC_SPACE, KC_P0, MO(1)}
},
[1] = {
{KC_PAST, KC_NO, KC_NO, KC_NO},
{KC_PSLS, KC_LPRN, KC_UP, KC_RPRN},
{KC_COMM, KC_LEFT, KC_DOWN,KC_RIGHT},
{KC_TAB, KC_BSPC, KC_P0, KC_TRNS}
},
[2] = {
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO}
},
[3] = {
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO},
{KC_NO, KC_NO, KC_NO, KC_NO}
}
};

+ 1
- 0
keyboards/macrocat/keymaps/via/rules.mk View File

@ -0,0 +1 @@
VIA_ENABLE = yes

+ 7
- 1
keyboards/macrocat/macrocat.c View File

@ -1,7 +1,7 @@
// Copyright 2022 catmunch (@catmunch)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "macrocat.h"
#include "quantum.h"
static bool encoder_pressed = 0;
static bool encoder_switched_layer = 0;
@ -70,6 +70,10 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}
char buffer[512];
if (key_pressed_l && key_pressed_r)
memcpy_P(buffer, bongo_press_lr, 512);
@ -123,6 +127,8 @@ void encoder_triple_click(void) {
tap_code(KC_MPRV);
}
void matrix_init_kb() {
matrix_init_user();
setPinInputHigh(ENCODER_SWITCH);
}
void matrix_scan_kb() {


+ 0
- 6
keyboards/macrocat/macrocat.h View File

@ -1,6 +0,0 @@
// Copyright 2022 catmunch (@catmunch)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "quantum.h"

+ 1
- 13
keyboards/macrocat/rules.mk View File

@ -1,13 +1 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = qmk-dfu
# Build Options
# change yes to no to disable
#
ENCODER_ENABLE = yes
VIA_ENABLE = yes
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
# This file intentionally left blank

Loading…
Cancel
Save