Skip to content

Commit

Permalink
[Keyboard] add ‘soda/pocket’ (#19838)
Browse files Browse the repository at this point in the history
Co-authored-by: Drashna Jaelre <[email protected]>
Co-authored-by: jack <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2023
1 parent 7d0358c commit 7ae9dbc
Show file tree
Hide file tree
Showing 11 changed files with 531 additions and 0 deletions.
25 changes: 25 additions & 0 deletions keyboards/soda/pocket/chconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2020 QMK
*
* 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

#define CH_CFG_ST_FREQUENCY 10000

#define CH_CFG_OPTIMIZE_SPEED FALSE

#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE

#include_next <chconf.h>

88 changes: 88 additions & 0 deletions keyboards/soda/pocket/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
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


#define MATRIX_COL_PINS { A2, A1, B14, B4, B5, B6, B7}
#define MATRIX_ROW_PINS { A7, B0, B1, B2, B10, B11 }
#define DIODE_DIRECTION ROW2COL

#define LED_NUM_LOCK_PIN B15

/* 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
// enable NKRO_ENABLE
#define FORCE_NKRO
// The pin connected to the data pin of the LEDs
#define RGB_DI_PIN C15
// The number of LEDs connected

#define RGB_MATRIX_LED_COUNT 34

#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_KEYPRESSES
# define ENABLE_RGB_MATRIX_ALPHAS_MODS
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
# define ENABLE_RGB_MATRIX_CYCLE_ALL
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
# define ENABLE_RGB_MATRIX_DUAL_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define ENABLE_RGB_MATRIX_RAINDROPS
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
# define ENABLE_RGB_MATRIX_HUE_WAVE
# define ENABLE_RGB_MATRIX_PIXEL_RAIN
# define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define ENABLE_RGB_MATRIX_SPLASH
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

// rgb EFFCET --end
192 changes: 192 additions & 0 deletions keyboards/soda/pocket/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
{
"keyboard_name": "Pocket",
"url": "",
"maintainer": "qmk",
"manufacturer": "gezhaoyou",
"usb": {
"vid": "0x1A53",
"pid": "0x4F51",
"device_version": "1.0.2"
},
"processor": "STM32F072",
"bootloader": "stm32-dfu",
"layouts": {
"LAYOUT": {
"layout": [
{
"label": "PrtSc",
"x": 0,
"y": 0.25
},
{
"label": "Scroll Lock",
"x": 1,
"y": 0.25
},
{
"label": "Pause",
"x": 2,
"y": 0.25
},
{
"label": "Num Lock",
"x": 3.25,
"y": 0.25
},
{
"label": "/",
"x": 4.25,
"y": 0.25
},
{
"label": "*",
"x": 5.25,
"y": 0.25
},
{
"label": "-",
"x": 6.25,
"y": 0.25
},
{
"label": "Insert",
"x": 0,
"y": 1.5
},
{
"label": "Home",
"x": 1,
"y": 1.5
},
{
"label": "PgUp",
"x": 2,
"y": 1.5
},
{
"label": "Num Lock",
"x": 3.25,
"y": 1.5
},
{
"label": "/",
"x": 4.25,
"y": 1.5
},
{
"label": "*",
"x": 5.25,
"y": 1.5
},
{
"label": "-",
"x": 6.25,
"y": 1.5
},
{
"label": "Delete",
"x": 0,
"y": 2.5
},
{
"label": "End",
"x": 1,
"y": 2.5
},
{
"label": "PgDn",
"x": 2,
"y": 2.5
},
{
"label": "7",
"x": 3.25,
"y": 2.5
},
{
"label": "8",
"x": 4.25,
"y": 2.5
},
{
"label": "9",
"x": 5.25,
"y": 2.5
},
{
"label": "+",
"x": 6.25,
"y": 2.5,
"h": 2
},
{
"label": "4",
"x": 3.25,
"y": 3.5
},
{
"label": "5",
"x": 4.25,
"y": 3.5
},
{
"label": "6",
"x": 5.25,
"y": 3.5
},
{
"label": "\u2191",
"x": 1,
"y": 4.5
},
{
"label": "1",
"x": 3.25,
"y": 4.5
},
{
"label": "2",
"x": 4.25,
"y": 4.5
},
{
"label": "3",
"x": 5.25,
"y": 4.5
},
{
"label": "Enter",
"x": 6.25,
"y": 4.5,
"h": 2
},
{
"label": "\u2190",
"x": 0,
"y": 5.5
},
{
"label": "\u2193",
"x": 1,
"y": 5.5
},
{
"label": "\u2192",
"x": 2,
"y": 5.5
},
{
"label": "0",
"x": 3.25,
"y": 5.5,
"w": 2
},
{
"label": ".",
"x": 5.25,
"y": 5.5
}
]
}
}
}
39 changes: 39 additions & 0 deletions keyboards/soda/pocket/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright 2012,2013 gezhaoyou <[email protected]>
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
enum layer_names {
_BASE,
_FN
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC, MO(1), KC_EQL, KC_LPRN, KC_RPRN, KC_CALCULATOR, KC_BSPC,
KC_INSERT, KC_HOME, KC_PGUP, KC_NUM_LOCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_UP, KC_P1, KC_P2, KC_P3,
KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
[_FN] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOTLOADER,
RGB_TOG, RGB_HUI, RGB_MODE_FORWARD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_HUD, RGB_MODE_REVERSE, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_SPD, RGB_VAD, RGB_SPI, KC_TRNS, KC_TRNS, QK_CLEAR_EEPROM),
};

39 changes: 39 additions & 0 deletions keyboards/soda/pocket/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright 2012,2013 gezhaoyou <[email protected]>
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
enum layer_names {
_BASE,
_FN
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC, MO(1), KC_EQL, KC_LPRN, KC_RPRN, KC_CALCULATOR, KC_BSPC,
KC_INSERT, KC_HOME, KC_PGUP, KC_NUM_LOCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_UP, KC_P1, KC_P2, KC_P3,
KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
[_FN] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOTLOADER,
RGB_TOG, RGB_HUI, RGB_MODE_FORWARD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_HUD, RGB_MODE_REVERSE, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_SPD, RGB_VAD, RGB_SPI, KC_TRNS, KC_TRNS, QK_CLEAR_EEPROM),
};

1 change: 1 addition & 0 deletions keyboards/soda/pocket/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
Loading

0 comments on commit 7ae9dbc

Please sign in to comment.