aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/winkeyless
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/winkeyless')
-rw-r--r--keyboards/winkeyless/bface/README.md41
-rw-r--r--keyboards/winkeyless/bface/bface.c49
-rw-r--r--keyboards/winkeyless/bface/bface.h4
-rw-r--r--keyboards/winkeyless/bface/config.h1
-rw-r--r--keyboards/winkeyless/bface/rules.mk20
-rw-r--r--keyboards/winkeyless/bface/usbconfig.h12
-rw-r--r--keyboards/winkeyless/bmini/bmini.c26
-rw-r--r--keyboards/winkeyless/bmini/config.h1
-rw-r--r--keyboards/winkeyless/bmini/i2c.c106
-rw-r--r--keyboards/winkeyless/bmini/i2c.h27
-rw-r--r--keyboards/winkeyless/bmini/readme.md38
-rw-r--r--keyboards/winkeyless/bmini/rules.mk19
-rw-r--r--keyboards/winkeyless/bmini/usbconfig.h12
-rw-r--r--keyboards/winkeyless/bminiex/bminiex.c61
-rw-r--r--keyboards/winkeyless/bminiex/config.h1
-rw-r--r--keyboards/winkeyless/bminiex/i2c.c106
-rw-r--r--keyboards/winkeyless/bminiex/i2c.h25
-rw-r--r--keyboards/winkeyless/bminiex/readme.md10
-rw-r--r--keyboards/winkeyless/bminiex/rules.mk19
-rw-r--r--keyboards/winkeyless/bminiex/usbconfig.h12
20 files changed, 38 insertions, 552 deletions
diff --git a/keyboards/winkeyless/bface/README.md b/keyboards/winkeyless/bface/README.md
index da0eb8088..ab39a97db 100644
--- a/keyboards/winkeyless/bface/README.md
+++ b/keyboards/winkeyless/bface/README.md
@@ -2,45 +2,18 @@
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.
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.face PCB
-Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/)
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: B.face PCB
+* Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/)
Make example for this keyboard (after setting up your build environment):
make winkeyless/bface: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, commonly programmed as left control while plugging in the keyboard.
-
-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 python
- 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.
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+ make winkeyless/bface:default:flash
+
+**Reset Key**: Hold down the key located at *K00*, commonly programmed as *left control* 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/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c
index 1c83be4b8..8cb5b600c 100644
--- a/keyboards/winkeyless/bface/bface.c
+++ b/keyboards/winkeyless/bface/bface.c
@@ -13,49 +13,8 @@
* 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 "bface.h"
void backlight_init_ports(void) {
// initialize pins D0, D1, D4 and D6 as output
@@ -72,17 +31,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);
- }
+ }
}
diff --git a/keyboards/winkeyless/bface/bface.h b/keyboards/winkeyless/bface/bface.h
index f7a3b9521..bca0c24c1 100644
--- a/keyboards/winkeyless/bface/bface.h
+++ b/keyboards/winkeyless/bface/bface.h
@@ -18,9 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include "quantum_keycodes.h"
-#include "keycode.h"
-#include "action.h"
+#include "quantum.h"
#define LAYOUT_60_ansi( \
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, \
diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h
index 20f3642dc..9d90e16a3 100644
--- a/keyboards/winkeyless/bface/config.h
+++ b/keyboards/winkeyless/bface/config.h
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
+#define DEVICE_VER 0x0200
// You can edit those at usbconfig.h about line 250. These values will
// unforunatly be ignored so far
#define MANUFACTURER winkeyless.kr
diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk
index 12b502785..506e37ac9 100644
--- a/keyboards/winkeyless/bface/rules.mk
+++ b/keyboards/winkeyless/bface/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
@@ -36,9 +21,6 @@ BACKLIGHT_ENABLE = yes
BACKLIGHT_CUSTOM_DRIVER = yes
BACKLIGHT_BREATHING = no
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/winkeyless/bface/usbconfig.h b/keyboards/winkeyless/bface/usbconfig.h
index 192d80d91..5ff26399b 100644
--- a/keyboards/winkeyless/bface/usbconfig.h
+++ b/keyboards/winkeyless/bface/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'
diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c
index 35800358c..87a31d052 100644
--- a/keyboards/winkeyless/bmini/bmini.c
+++ b/keyboards/winkeyless/bmini/bmini.c
@@ -16,30 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bmini.h"
-#include "rgblight.h"
-
-#include <avr/pgmspace.h>
-
-#include "action_layer.h"
-#include "i2c.h"
-#include "quantum.h"
-
-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_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
-}
__attribute__ ((weak))
-void matrix_scan_user(void) {
- rgblight_task();
-}
+void matrix_scan_user(void) {}
diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h
index 96acd9bf1..37df80f80 100644
--- a/keyboards/winkeyless/bmini/config.h
+++ b/keyboards/winkeyless/bmini/config.h
@@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
+#define DEVICE_VER 0x0200
#define MANUFACTURER winkeyless.kr
#define PRODUCT B.mini
diff --git a/keyboards/winkeyless/bmini/i2c.c b/keyboards/winkeyless/bmini/i2c.c
deleted file mode 100644
index a4f952135..000000000
--- a/keyboards/winkeyless/bmini/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/keyboards/winkeyless/bmini/i2c.h b/keyboards/winkeyless/bmini/i2c.h
deleted file mode 100644
index 93a69c94d..000000000
--- a/keyboards/winkeyless/bmini/i2c.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2016 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/>.
-*/
-
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
diff --git a/keyboards/winkeyless/bmini/readme.md b/keyboards/winkeyless/bmini/readme.md
index 3401b9744..b8cc85495 100644
--- a/keyboards/winkeyless/bmini/readme.md
+++ b/keyboards/winkeyless/bmini/readme.md
@@ -2,42 +2,18 @@
A 75% keyboard with RGB
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.mini PCB
-Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: B.mini PCB
+* Hardware Availability: <http://winkeyless.kr/product/b-mini-x2-pcb/>
Make example for this keyboard (after setting up your build environment):
make winkeyless/bmini:default
-Flashing
-
-ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-
-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 python
- brew 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.
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+ make winkeyless/bmini:default:flash
+
+**Reset Key**: Hold down the key located at *LOCATION*, commonly programmed as *KEY* 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/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk
index 8cfc81056..7822bd830 100644
--- a/keyboards/winkeyless/bmini/rules.mk
+++ b/keyboards/winkeyless/bmini/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,10 +19,10 @@ CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
+WS2812_DRIVER = i2c
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = matrix.c
diff --git a/keyboards/winkeyless/bmini/usbconfig.h b/keyboards/winkeyless/bmini/usbconfig.h
index d2d848fcd..85a915bb4 100644
--- a/keyboards/winkeyless/bmini/usbconfig.h
+++ b/keyboards/winkeyless/bmini/usbconfig.h
@@ -109,20 +109,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
@@ -238,7 +228,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'
diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c
index d9b05aba5..11315b921 100644
--- a/keyboards/winkeyless/bminiex/bminiex.c
+++ b/keyboards/winkeyless/bminiex/bminiex.c
@@ -16,24 +16,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bminiex.h"
-#include "rgblight.h"
-
-#include <avr/pgmspace.h>
-
-#include "action_layer.h"
-#include "i2c.h"
-#include "quantum.h"
#include "backlight.h"
#include "backlight_custom.h"
-// for keyboard subdirectory level init functions
-// @Override
-void matrix_init_kb(void) {
- // call user level keymaps, if any
- matrix_init_user();
-}
-
#ifdef BACKLIGHT_ENABLE
/// Overrides functions in `quantum.c`
void backlight_init_ports(void) {
@@ -48,50 +34,3 @@ void backlight_set(uint8_t level) {
b_led_set(level);
}
#endif
-
-#ifdef RGBLIGHT_ENABLE
-extern rgblight_config_t rgblight_config;
-
-// custom RGB driver
-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_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
-}
-
-bool rgb_init = false;
-
-void matrix_scan_kb(void) {
- // if LEDs were previously on before poweroff, turn them back on
- if (rgb_init == false && rgblight_config.enable) {
- i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
- rgb_init = true;
- }
-
- rgblight_task();
-#else
-void matrix_scan_kb(void) {
-#endif
- matrix_scan_user();
- /* Nothing else for now. */
-}
-
-__attribute__((weak)) // overridable
-void matrix_init_user(void) {
-
-}
-
-__attribute__((weak)) // overridable
-void matrix_scan_user(void) {
-
-}
-
-
diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h
index ebd33ad61..35c8ce933 100644
--- a/keyboards/winkeyless/bminiex/config.h
+++ b/keyboards/winkeyless/bminiex/config.h
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422E
+#define DEVICE_VER 0x0200
#define MANUFACTURER winkeyless.kr
#define PRODUCT B.mini Ex
diff --git a/keyboards/winkeyless/bminiex/i2c.c b/keyboards/winkeyless/bminiex/i2c.c
deleted file mode 100644
index a4f952135..000000000
--- a/keyboards/winkeyless/bminiex/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/keyboards/winkeyless/bminiex/i2c.h b/keyboards/winkeyless/bminiex/i2c.h
deleted file mode 100644
index ada8cc7bf..000000000
--- a/keyboards/winkeyless/bminiex/i2c.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-Copyright 2016 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/>.
-*/
-
-// Please do not modify this file
-
-#pragma once
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
diff --git a/keyboards/winkeyless/bminiex/readme.md b/keyboards/winkeyless/bminiex/readme.md
index 7dbabedba..31a9e2608 100644
--- a/keyboards/winkeyless/bminiex/readme.md
+++ b/keyboards/winkeyless/bminiex/readme.md
@@ -2,12 +2,16 @@
A compact fullsize keyboard with RGB
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.mini EX PCB
-Hardware Availability: https://winkeyless.kr/product/b-mini-ex-x2-pcb/
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: B.mini EX PCB
+* Hardware Availability: <https://winkeyless.kr/product/b-mini-ex-x2-pcb/>
Make example for this keyboard (after setting up your build environment):
make winkeyless/bminiex:default
+Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
+
+ make winkeyless/bminiex: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).
diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk
index 24e434879..39a77bda1 100644
--- a/keyboards/winkeyless/bminiex/rules.mk
+++ b/keyboards/winkeyless/bminiex/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
@@ -36,7 +21,7 @@ COMMAND_ENABLE = no
BACKLIGHT_ENABLE = yes
BACKLIGHT_CUSTOM_DRIVER = yes
RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
+WS2812_DRIVER = i2c
TAP_DANCE_ENABLE = no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
@@ -46,4 +31,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c backlight.c
+SRC = matrix.c backlight.c
diff --git a/keyboards/winkeyless/bminiex/usbconfig.h b/keyboards/winkeyless/bminiex/usbconfig.h
index d2d848fcd..85a915bb4 100644
--- a/keyboards/winkeyless/bminiex/usbconfig.h
+++ b/keyboards/winkeyless/bminiex/usbconfig.h
@@ -109,20 +109,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
@@ -238,7 +228,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'