aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/pearl
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/pearl')
-rw-r--r--keyboards/pearl/config.h1
-rw-r--r--keyboards/pearl/pearl.c52
-rw-r--r--keyboards/pearl/readme.md43
-rw-r--r--keyboards/pearl/rules.mk20
-rw-r--r--keyboards/pearl/usbconfig.h12
5 files changed, 16 insertions, 112 deletions
diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h
index 3dbe5ee03..0ae69e8e2 100644
--- a/keyboards/pearl/config.h
+++ b/keyboards/pearl/config.h
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0348
+#define DEVICE_VER 0x0200
#define MANUFACTURER Pearl Boards
#define PRODUCT Pearl
#define DESCRIPTION 40% keyboard
diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c
index c8cd8a860..093b5fdd9 100644
--- a/keyboards/pearl/pearl.c
+++ b/keyboards/pearl/pearl.c
@@ -15,49 +15,7 @@ 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 "rgblight.h"
-#include "i2c_master.h"
-#include "quantum.h"
-
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-
-void rgblight_set(void) {
- if (!rgblight_config.enable) {
- for (uint8_t i = 0; i < RGBLED_NUM; i++) {
- led[i].r = 0;
- led[i].g = 0;
- led[i].b = 0;
- }
- }
-
- i2c_init();
- i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
-}
-#endif
-
-void matrix_init_kb(void) {
-#ifdef RGBLIGHT_ENABLE
- if (rgblight_config.enable) {
- i2c_init();
- i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
- }
-#endif
- // call user level keymaps, if any
- matrix_init_user();
-}
-
-void matrix_scan_kb(void) {
-#ifdef RGBLIGHT_ENABLE
- rgblight_task();
-#endif
- matrix_scan_user();
- /* Nothing else for now. */
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
+#include "pearl.h"
void backlight_init_ports(void) {
// initialize pins D0, D1, D4 and D6 as output
@@ -74,17 +32,17 @@ void backlight_init_ports(void) {
}
void backlight_set(uint8_t level) {
- if (level == 0) {
+ if (level == 0) {
// turn backlight LEDs off
writePinLow(D0);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
- } else {
+ } else {
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
- }
-} \ No newline at end of file
+ }
+}
diff --git a/keyboards/pearl/readme.md b/keyboards/pearl/readme.md
index c39d86cf3..1f78a5540 100644
--- a/keyboards/pearl/readme.md
+++ b/keyboards/pearl/readme.md
@@ -3,45 +3,18 @@
Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel
ATMEGA32A MCU.
-Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo)
-Hardware Supported: Pearl
-Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=92259.0)
+* Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo)
+* Hardware Supported: Pearl
+* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=92259.0)
Make example for this keyboard (after setting up your build environment):
make pearl:default
-Flashing
-
-ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-
-**Reset Key:** Hold down the key located at `K00`.
-
-Windows:
-1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
-2. Place your keyboard into reset.
-3. Press the `Find Device` button and ensure that your keyboard is found.
-4. Press the `Open .hex File` button and locate the `.hex` file you created.
-5. Press the `Flash Device` button and wait for the process to complete.
-
-macOS:
-1. Install homebrew by typing the following:
- ```
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- ```
-2. Install `crosspack-avr`.
- ```
- brew cask install crosspack-avr
- ```
-3. Install the following packages:
- ```
- brew install python3
- pip3 install pyusb
- brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
- ```
-4. Place your keyboard into reset.
-5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-
-**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work.
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+
+ make pearl:default:flash
+
+**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.
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).
diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk
index eacf8bb2c..79b783e42 100644
--- a/keyboards/pearl/rules.mk
+++ b/keyboards/pearl/rules.mk
@@ -1,18 +1,3 @@
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-#
-# 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/>.
-
# MCU name
MCU = atmega32a
@@ -34,9 +19,6 @@ CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
+WS2812_DRIVER = i2c
OPT_DEFS = -DDEBUG_LEVEL=0
-
-# custom matrix setup
-SRC = i2c_master.c
diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h
index 54a7d20f1..e65d210ac 100644
--- a/keyboards/pearl/usbconfig.h
+++ b/keyboards/pearl/usbconfig.h
@@ -108,20 +108,10 @@ section at the end of this file).
* (e.g. HID), but never want to send any data. This option saves a couple
* of bytes in flash memory and the transmit buffers in RAM.
*/
-#define USB_CFG_INTR_POLL_INTERVAL 1
-/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
- * interval. The value is in milliseconds and must not be less than 10 ms for
- * low speed devices.
- */
#define USB_CFG_IS_SELF_POWERED 0
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
* device is powered from the USB bus.
*/
-#define USB_CFG_MAX_BUS_POWER 500
-/* Set this variable to the maximum USB bus power consumption of your device.
- * The value is in milliamperes. [It will be divided by two since USB
- * communicates power requirements in units of 2 mA.]
- */
#define USB_CFG_IMPLEMENT_FN_WRITE 1
/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
* transfers. Set it to 0 if you don't need it and want to save a couple of
@@ -237,7 +227,7 @@ section at the end of this file).
* with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
* the implications!
*/
-#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF)
/* Version number of the device: Minor number first, then major number.
*/
#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'