From ba42a5ae68a59ad514027d819c6b58ee86944e75 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 16 Jul 2019 17:26:38 +1000 Subject: Remove commented out MCUs in rules.mk (#5884) --- keyboards/jc65/v32u4/rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index c2c02b614..cc905fb18 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. -- cgit v1.2.3 From 0bd03150e5952978e0a7044dcfea1bb617c2390d Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 27 Jul 2019 10:37:33 +1000 Subject: Remove NO_BACKLIGHT_CLOCK (#6418) --- keyboards/jc65/v32a/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index a5ec23ae4..e91f46aeb 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -28,7 +28,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 16 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS -- cgit v1.2.3 From de4a47f1cc28c4ef66e7560eac2a50f717070ae2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 21 Sep 2019 15:06:32 +1000 Subject: Cleanup rules.mk for 32A and 328P keyboards (#6767) --- keyboards/jc65/v32a/rules.mk | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index fac85172e..ee6efb3fa 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -15,19 +15,15 @@ # MCU name MCU = atmega32a -PROTOCOL = VUSB -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -45,6 +41,3 @@ OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup CUSTOM_MATRIX = yes SRC = matrix.c i2c.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex -- cgit v1.2.3 From 2ee961c9e873d577e711431ae0960aa21629525e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 22 Oct 2019 15:43:18 +1100 Subject: Cleanup rules.mk for 32U4 keyboards, I-K (#7097) * Cleanup rules.mk for 32U4 keyboards, I-K * Clean up ivy rules.mk --- keyboards/jc65/v32u4/keymaps/default/rules.mk | 0 keyboards/jc65/v32u4/rules.mk | 54 +++++---------------------- 2 files changed, 9 insertions(+), 45 deletions(-) delete mode 100644 keyboards/jc65/v32u4/keymaps/default/rules.mk (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32u4/keymaps/default/rules.mk b/keyboards/jc65/v32u4/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb..000000000 diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index cc905fb18..e1498325c 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -1,51 +1,15 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -- cgit v1.2.3 From 38353688f2cf2d077a0e16b9a3f2b054fffc74c0 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sun, 3 Nov 2019 17:46:13 +0000 Subject: [Keymap] Add personal JC65 v32a layout (#7244) * Add personal JC65 v32a layout * Update keyboards/jc65/v32a/keymaps/rys/keymap.c Co-Authored-By: fauxpark --- keyboards/jc65/v32a/keymaps/rys/keymap.c | 23 +++++++++++++++++++++++ keyboards/jc65/v32a/keymaps/rys/rules.mk | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 keyboards/jc65/v32a/keymaps/rys/keymap.c create mode 100644 keyboards/jc65/v32a/keymaps/rys/rules.mk (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/keymaps/rys/keymap.c b/keyboards/jc65/v32a/keymaps/rys/keymap.c new file mode 100644 index 000000000..f946c8eeb --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_NUBS, KC_DEL, KC_GRV, + 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_BSPC, KC_PGUP, + KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_PGDN, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FUNC), + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC] = LAYOUT( + RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, RESET, + RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD + ) +}; diff --git a/keyboards/jc65/v32a/keymaps/rys/rules.mk b/keyboards/jc65/v32a/keymaps/rys/rules.mk new file mode 100644 index 000000000..d7463419b --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/rys/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes -- cgit v1.2.3 From 3a215195ed3a12464df7169e7b68bfe0763e95b1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 4 Nov 2019 09:43:13 +1100 Subject: Convert remaining PS2AVRGB boards to I2C WS2812 driver (#7245) * Convert remaining PS2AVRGB boards to I2C WS2812 driver * Add back functions to make the custom matrices happy --- keyboards/jc65/v32a/i2c.c | 106 ------------------------------------------- keyboards/jc65/v32a/i2c.h | 27 ----------- keyboards/jc65/v32a/rules.mk | 19 +------- keyboards/jc65/v32a/v32a.c | 56 ++++++++--------------- 4 files changed, 20 insertions(+), 188 deletions(-) delete mode 100644 keyboards/jc65/v32a/i2c.c delete mode 100644 keyboards/jc65/v32a/i2c.h (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/i2c.c b/keyboards/jc65/v32a/i2c.c deleted file mode 100644 index a4f952135..000000000 --- a/keyboards/jc65/v32a/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#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< - -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 . -*/ - -// 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/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index ee6efb3fa..18e7f1de9 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a @@ -34,10 +19,10 @@ 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 CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 8176ade0a..9b1e07274 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -16,56 +16,36 @@ along with this program. If not, see . */ #include "v32a.h" -#ifdef BACKLIGHT_ENABLE -#include "backlight.h" -#endif -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -#include - -#include "action_layer.h" -#include "i2c.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_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); -} -#endif __attribute__ ((weak)) -void matrix_scan_user(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif -} +void matrix_scan_user(void) {} #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { - DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } void backlight_set(uint8_t level) { if (level == 0) { // Turn out the lights - PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); } else { // Turn on the lights - PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); } } #endif -- cgit v1.2.3 From 30473357290747be06e9200a7d9c751738a3b0a1 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Nov 2019 10:21:22 +1100 Subject: =?UTF-8?q?Add=20support=20for=20configurable=20polling=20interval?= =?UTF-8?q?=20and=20power=20usage=20o=E2=80=A6=20(#7336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add support for custom polling interval and power usage on V-USB boards * Use 1ms as default for now --- keyboards/jc65/v32a/usbconfig.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/usbconfig.h b/keyboards/jc65/v32a/usbconfig.h index d2d848fcd..f6c85cc69 100644 --- a/keyboards/jc65/v32a/usbconfig.h +++ b/keyboards/jc65/v32a/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 -- cgit v1.2.3 From 519df78cdbf7211b9e1ac6b961b0e10bb5164914 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 15 Nov 2019 10:21:53 +1100 Subject: Set device version from config.h for V-USB boards (#7316) --- keyboards/jc65/v32a/config.h | 1 + keyboards/jc65/v32a/usbconfig.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards/jc65') diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index e91f46aeb..444ebad07 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -21,6 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x1234 #define PRODUCT_ID 0x5679 +#define DEVICE_VER 0x0200 #define MANUFACTURER winkeyless.kr #define PRODUCT JC65 PS2AVRGB diff --git a/keyboards/jc65/v32a/usbconfig.h b/keyboards/jc65/v32a/usbconfig.h index f6c85cc69..85a915bb4 100644 --- a/keyboards/jc65/v32a/usbconfig.h +++ b/keyboards/jc65/v32a/usbconfig.h @@ -228,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' -- cgit v1.2.3