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

[keyboard] add jacky_studio/piggy60/rev2 #20297

Merged
merged 1 commit into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 18 additions & 5 deletions keyboards/jacky_studio/piggy60/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,37 @@
A gasket-mounted 60% in the style of the S7 Elephant.

* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
* Hardware Supported: Piggy60 PCB "rev1" (atmega32u4)
* **Make sure your PCB uses an `atmega32u4` before flashing!** A PCB that uses an `APM32F103CBT6` with `uf2boot` has been shipped with some extras purchases and to replace some defective units. Flashing that PCB with "rev1" firmware may result in a non-functional PCB which can only be recovered using a hardware programmer (e.g. an ST-Link V2)
* Hardware Availability: Group Buy took place between 2021-05-22 1600 UTC and 2021-05-25 1600 UTC on [https://jackylab.com/](https://jackylab.com/).
* Hardware Supported:
* Piggy60 PCB rev 1 (atmega32u4, atmel-dfu)
* Piggy60 PCB rev 2 (APM32F103CBT6, uf2boot)
**Check your PCB before flashing!** Loading rev1 firmware on a rev2 PCB may result in a non-functional PCB which can only be recovered using a hardware programmer (e.g. an ST-Link V2)
* Hardware Availability: Group Buy took place between 2021-05-22 1600 UTC and 2021-05-25 1600 UTC on [https://jackylab.com/](https://jackylab.com/). Rev 2 PCBs were provided during extras sales and as replacements.

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

make jacky_studio/piggy60/rev1:default
make jacky_studio/piggy60/rev2:default

Flashing example for this keyboard:

make jacky_studio/piggy60/rev1:default:flash
make jacky_studio/piggy60/rev2: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 3 ways:

* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving.
* **Physical reset**: Short the set of vertical holes on the third row, to the right of Caps Lock. These can be reached with tweezers after the board has been assembled.
* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. This will also clear EEPROM/emulated EEPROM, so it is a good first step if the keyboard is misbehaving.
* **Physical reset**:
- Rev 1: Short the set of vertical holes on the third row, to the right of Caps Lock. These can be reached with tweezers after the board has been assembled.
- Rev 2: Near the MCU there are two square pads with a circle in the middle. This is an unpopulated footprint for a reset button. Short these two pads twice in quick succession.
* **Keycode in layout**: There is no key mapped to `QK_BOOT` in the pre-created keymaps, but you may assign this key in any keymaps you create.

## Flashing

After entering the bootloader through one of the three methods above:

- Rev 1: The keyboard will appear as an Atmel DFU device. It can be flashed using the QMK CLI or QMK Toolbox.
- Rev 2: The keyboard will appear as a USB mass storage device named `MT.KEY`. If the CLI is unable to find this device, the compiled `.uf2` file can be manually copied to it. The keyboard will reboot on completion with the new firmware loaded.
21 changes: 21 additions & 0 deletions keyboards/jacky_studio/piggy60/rev2/board.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2022 JasonRen(biu)
*
* 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_next <board.h>

#undef STM32_HSECLK
#define STM32_HSECLK 16000000
30 changes: 30 additions & 0 deletions keyboards/jacky_studio/piggy60/rev2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright 2022 MT
*
* 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 RGB_DI_PIN B9
#define RGB_MATRIX_LED_COUNT 14

#define RGB_DISABLE_WHEN_USB_SUSPENDED

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#define WS2812_PWM_DRIVER PWMD4
#define WS2812_PWM_CHANNEL 4
#define WS2812_PWM_PAL_MODE 2
#define WS2812_DMA_STREAM STM32_DMA1_STREAM7
#define WS2812_DMA_CHANNEL 7
21 changes: 21 additions & 0 deletions keyboards/jacky_studio/piggy60/rev2/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* 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 HAL_USE_PWM TRUE

#include_next <halconf.h>
Loading