Skip to content

Commit

Permalink
[Keyboard] Refactor HB85 to get rid of custom i2c code (qmk#5570)
Browse files Browse the repository at this point in the history
* remove dependency on custom i2c code

* missed a pragma once

* fix readme install instructions

* config.h cleanup

* make the bootmagic key not the same bmc reset key

* disable bootmagic functionality as it doesn't seem to work on atmega32a bmc boards
  • Loading branch information
mechmerlin authored and drashna committed Apr 7, 2019
1 parent a8e3462 commit b262f20
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 151 deletions.
5 changes: 0 additions & 5 deletions keyboards/gray_studio/hb85/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422F
// TODO: share these strings with usbconfig.h
// Edit usbconfig.h to change these.
#define MANUFACTURER Gray Studio
#define PRODUCT HB85

Expand All @@ -34,6 +32,3 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#define RGBLED_NUM 5
#define RGBLIGHT_ANIMATIONS

#define NO_UART 1
#define BOOTLOADHID_BOOTLOADER 1
6 changes: 3 additions & 3 deletions keyboards/gray_studio/hb85/hb85.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2017 Luiz Ribeiro <[email protected]>,
Copyright 2017 Luiz Ribeiro <[email protected]>,
2019 fcoury <[email protected]>
This program is free software: you can redistribute it and/or modify
Expand All @@ -20,7 +20,7 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.

#include "rgblight.h"

#include "i2c.h"
#include "i2c_master.h"
#include "quantum.h"

#ifdef RGBLIGHT_ENABLE
Expand All @@ -36,7 +36,7 @@ void rgblight_set(void) {
}

i2c_init();
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif

Expand Down
106 changes: 0 additions & 106 deletions keyboards/gray_studio/hb85/i2c.c

This file was deleted.

27 changes: 0 additions & 27 deletions keyboards/gray_studio/hb85/i2c.h

This file was deleted.

8 changes: 4 additions & 4 deletions keyboards/gray_studio/hb85/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Flashing

ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.

**Reset Key:** To put the HB85 into reset, hold F3 (`K00`) while plugging in.
**Reset Key:** Hold down the key located at `K00`, commonly programmed as F3 while plugging in the keyboard.

Windows:
1. Download [HIDBootFlash](http:https://vusb.wikidot.com/project:hidbootflash).
Expand All @@ -36,13 +36,13 @@ macOS:
```
3. Install the following packages:
```
brew install python
brew install python3
pip3 install pyusb
brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
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.
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).
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).
4 changes: 2 additions & 2 deletions keyboards/gray_studio/hb85/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID

# build options
BOOTMAGIC_ENABLE = lite
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
Expand All @@ -42,7 +42,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes

OPT_DEFS = -DDEBUG_LEVEL=0

SRC += i2c.c
SRC += i2c_master.c

# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
5 changes: 1 addition & 4 deletions keyboards/gray_studio/hb85/usbconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/

#ifndef __usbconfig_h_included__
#define __usbconfig_h_included__
#pragma once

#include "config.h"

Expand Down Expand Up @@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect

#endif /* __usbconfig_h_included__ */

0 comments on commit b262f20

Please sign in to comment.