Эх сурвалжийг харах

Keyboard: bface update (#3702)

* add configurator support

* update bface code to more modern QMK standards

* update readme

* update readme

* Make changes thanks to noroadsleft's PR comments
MechMerlin 6 жил өмнө
parent
commit
d0b55b59f9

+ 33 - 50
keyboards/bface/README.md

@@ -1,61 +1,44 @@
-ps2avrGB keyboard firmware
-==========================
+# B.face
 
-This is a port of the QMK firmware for boards that are based on the
-ps2avrGB firmware, like the [ps2avrGB
-keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold
-by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/).
+A 60% keyboard with RGB that runs ps2avrgb natively. Please note that the B.face and B.fake have different switch matrices. Firmware on one, will not work on the other. 
 
-Note that this is a complete replacement for the firmware, so you won't be
-using Bootmapper Client to change any keyboard settings, since not all the
-USB report options are supported.
+Keyboard Maintainer: QMK Community  
+Hardware Supported: B.face PCB   
+Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/)   
 
-## Supported Boards
+Make example for this keyboard (after setting up your build environment):
 
-Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
-tested so far (since it's the only one I own). But other boards that use
-the ps2avrGB firmware should work as well.
+    make bface:default
 
-## Installing
+Flashing
 
-First, install the requirements. These commands are for OSX, but all you
-need is the AVR toolchain and `bootloadHID` for flashing:
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. 
 
-```
-$ brew cask install crosspack-avr
-$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
-```
+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. 
 
-In order to use the `./program` script, which can reboot the board into
-the bootloader, you'll need Python 2 with PyUSB installed:
+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 python
+    brew install pyusb
+    brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+    ```
 
-```
-$ pip install pyusb
-```
+4. Place your keyboard into reset. 
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. 
 
-Then, with the keyboard plugged in, simply run this command from the
-`qmk_firmware` directory:
 
-```
-$ make ps2avrGB-program
-```
-
-If you prefer, you can just build it and flash the firmware directly with
-`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it
-in the bootloader:
-
-```
-$ make ps2avrGB
-$ bootloadHID -r ps2avrGB_default.hex
-```
-
-## Troubleshooting
-
-From my experience, it's really hard to brick these boards. But these
-tricks have been useful when it got stuck in a weird scenario.
-
-1. Try plugging the board in while pressing `L_Ctrl`. This will force it
-   to boot only the bootloader without loading the firmware. Once this is
-   done, just reflash the board with the original firmware.
-2. Sometimes USB hubs can act weird, so try connecting the board directly
-   to your computer or plugging/unplugging the USB hub.
+See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.

+ 1 - 1
keyboards/bface/bface.h

@@ -23,7 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "keycode.h"
 #include "action.h"
 
-#define KEYMAP( \
+#define LAYOUT_60_ansi( \
   K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, \
   K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, \
   K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2,      KD2, \

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 8 - 0
keyboards/bface/info.json


+ 5 - 7
keyboards/bface/keymaps/default/keymap.c

@@ -15,19 +15,17 @@ 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 "bface.h"
-#include "action_layer.h"
-#include "rgblight.h"
+#include QMK_KEYBOARD_H
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [0] = KEYMAP(
+    [0] = LAYOUT_60_ansi(
         KC_ESC, KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_MINS,KC_EQL, KC_BSPC,
         KC_TAB, KC_Q,   KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,   KC_LBRC,KC_RBRC,KC_BSLS,
         KC_F1,  KC_A,   KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,   KC_SCLN,KC_QUOT,KC_ENT,
         KC_LSFT,KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM,KC_DOT, KC_SLSH,        KC_RSFT,
-        KC_LCTL,KC_LALT,KC_LGUI,                KC_SPC,                         KC_RALT,KC_RGUI,KC_FN0, KC_RCTL
+        KC_LCTL,KC_LALT,KC_LGUI,                KC_SPC,                         KC_RALT,KC_RGUI,MO(1), KC_RCTL
     ),
-    [1] = KEYMAP(
+    [1] = LAYOUT_60_ansi(
         KC_TRNS,KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_F6,  KC_F7,  KC_F8,  KC_F9,  KC_F10, KC_F11, KC_F12, KC_TRNS,
         KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
         KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_INC, BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
@@ -35,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         KC_TRNS,KC_TRNS,KC_TRNS,                KC_TRNS,                        KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
     ),
     /* You can copy this layer as base for a new fn layer * /
-	[n] = KEYMAP(
+	[n] = LAYOUT_60_ansi(
         KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
         KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
         KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,

+ 2 - 0
keyboards/bface/rules.mk

@@ -45,3 +45,5 @@ SRC = matrix.c i2c.c backlight_ps2avrGB.c
 
 # programming options
 PROGRAM_CMD = ./keyboards/bface/program .build/$(TARGET).hex
+
+LAYOUTS = 60_ansi

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно