diff options
Diffstat (limited to 'keyboards/redox_w')
-rw-r--r-- | keyboards/redox_w/config.h | 11 | ||||
-rw-r--r-- | keyboards/redox_w/keymaps/default/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/redox_w/keymaps/dvorak/keymap.c | 128 | ||||
-rw-r--r-- | keyboards/redox_w/keymaps/dvorak/readme.md | 38 | ||||
-rw-r--r-- | keyboards/redox_w/keymaps/via/keymap.c | 2 | ||||
-rw-r--r-- | keyboards/redox_w/matrix.c | 142 | ||||
-rw-r--r-- | keyboards/redox_w/redox_w.c | 13 | ||||
-rw-r--r-- | keyboards/redox_w/redox_w.h | 27 | ||||
-rw-r--r-- | keyboards/redox_w/rules.mk | 25 |
9 files changed, 228 insertions, 160 deletions
diff --git a/keyboards/redox_w/config.h b/keyboards/redox_w/config.h index b480b072f9..4fe2447b06 100644 --- a/keyboards/redox_w/config.h +++ b/keyboards/redox_w/config.h @@ -53,14 +53,3 @@ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -//UART settings for communication with the RF microcontroller -#define SERIAL_UART_BAUD 1000000 -#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) -#define SERIAL_UART_INIT_CUSTOM \ - /* enable TX and RX */ \ - UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ - /* 8-bit data */ \ - UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); diff --git a/keyboards/redox_w/keymaps/default/keymap.c b/keyboards/redox_w/keymaps/default/keymap.c index 91fc7afa97..a91d3725f4 100644 --- a/keyboards/redox_w/keymaps/default/keymap.c +++ b/keyboards/redox_w/keymaps/default/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,QK_BOOT ,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 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/redox_w/keymaps/dvorak/keymap.c b/keyboards/redox_w/keymaps/dvorak/keymap.c new file mode 100644 index 0000000000..f2c2d85f04 --- /dev/null +++ b/keyboards/redox_w/keymaps/dvorak/keymap.c @@ -0,0 +1,128 @@ +/* Copyright 2021 66f94eae(66f94eae@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/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _DVORAK, + _SYMB, + _QWERTY, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC, KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_SLSH , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I ,KC_MINS, KC_EQL ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_SCLN ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_PGUP ,KC_HOME , KC_END ,KC_PGDN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_RSFT , +//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CAPS ,KC_APP ,KC_LALT ,KC_LGUI , LT(3,KC_MUTE), KC_SPC ,KC_INS , KC_DEL ,KC_ENT , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT +//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ +), + +[_SYMB] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_BSPC , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB , KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_WH_U ,KC_COPY ,KC_F6 , KC_F7 ,KC_COPY ,KC_P7 ,KC_P8 ,KC_P9 ,KC_MPRV ,KC_PPLS , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,KC_CUT ,KC_VOLD , KC_VOLU ,KC_CUT ,KC_P4 ,KC_P5 ,KC_P6 ,KC_MNXT ,KC_PMNS , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_WH_L ,KC_UP ,KC_WH_R ,KC_LGUI ,KC_PSTE ,KC_WH_U ,KC_SLCK , KC_NLCK ,KC_WH_D ,KC_PSTE ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PEQL ,KC_PAST , +//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CAPS ,KC_LEFT ,KC_DOWN ,KC_RGHT, LT(3,KC_MUTE) ,KC_SPC ,KC_ESC , KC_DEL ,KC_ENT , KC_APP , KC_P0 ,KC_PDOT ,KC_PENT ,KC_PSLS +//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ +), + +[_QWERTY] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC, +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_MINS , KC_EQL ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_HOME ,KC_PGUP , KC_PGDN ,KC_END ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , +//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CAPS ,KC_LGUI ,KC_LALT , KC_APP ,LT(3,KC_MUTE) , KC_SPC ,KC_INS , KC_DEL ,KC_ENT , KC_APP , KC_LEFT ,KC_UP ,KC_DOWN ,KC_RGHT +//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ +), + +[_ADJUST] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC ,TO(0) ,TO(1) ,TO(2) ,KC_NO ,KC_NO , KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO , KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO , KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO , +//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_RSFT , +//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_NO ,KC_NO ,KC_NO ,KC_LGUI ,LT(3,KC_MUTE), KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_APP ,KC_NO ,KC_NO ,KC_NO ,KC_NO +//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) +{ + switch (get_highest_layer(state)) { + case _DVORAK: + blu_led_off; + grn_led_off; + break; + case _SYMB: + blu_led_on; + grn_led_off; + break; + case _QWERTY: + blu_led_off; + grn_led_on; + break; + case _ADJUST: + blu_led_on; + grn_led_on; + break; + default: + break; + } + return state; +} + +bool led_update_user(led_t led_state) +{ + if (led_state.caps_lock) { + red_led_on; + } else { + red_led_off; + } + if (led_state.num_lock) { + wht_led_on; + } else { + wht_led_off; + } + return false; +} diff --git a/keyboards/redox_w/keymaps/dvorak/readme.md b/keyboards/redox_w/keymaps/dvorak/readme.md new file mode 100644 index 0000000000..cdc90976a7 --- /dev/null +++ b/keyboards/redox_w/keymaps/dvorak/readme.md @@ -0,0 +1,38 @@ +### fork from default layout,and support dvorak layout[defalut layer] + +##### only use 3 layers + +``` +Keymap: 3 Layers +----------------- +stack of layers + ____________ precedence + / / | high + 31 /___________// | + : _:_:_:_:_:__ | + 3 /___________// | --- adjust + 2 /___________// | --- qwerty + 1 /___________// | --- symb + 0 /___________/ | --- dvorak[default] +``` + +defalut LED indicators + +RED --------- CAPS LOCK + +BLUE ------- SYMB layer + +GREEN----- QWERTY layer + +WHITE------ NUM LOCK *in my test case,this is inefficient on mac os* + +> BLUE and GREEN as a bit flag +> +> 0 0 + +| BLUE(0) | GREEN(0) | STATUS | DESCRIBE | +|:-------:|:--------:|:------:|:--------------------------------------------------- | +| 0 | 0 | 0 | layer 0[dvorak] is active,and blue,green led is off | +| 1 | 0 | 1 | layer1[symb] is active, and blue led is on | +| 0 | 1 | 2 | layer 2[qwerty] is active,and green led is on | +| 1 | 1 | 3 | layer 3[adjust] is active,and blue,green led is on | diff --git a/keyboards/redox_w/keymaps/via/keymap.c b/keyboards/redox_w/keymaps/via/keymap.c index 406bc1b8e1..b9af344a46 100644 --- a/keyboards/redox_w/keymaps/via/keymap.c +++ b/keyboards/redox_w/keymaps/via/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,QK_BOOT ,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 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/redox_w/matrix.c b/keyboards/redox_w/matrix.c index 703987a939..9c50c9cece 100644 --- a/keyboards/redox_w/matrix.c +++ b/keyboards/redox_w/matrix.c @@ -13,150 +13,58 @@ * 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 <stdint.h> -#include <stdbool.h> -#if defined(__AVR__) -#include <avr/io.h> -#endif -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "timer.h" -#include "protocol/serial.h" - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#elif (MATRIX_COLS <= 16) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop16(matrix[i]) -# define ROW_SHIFTER ((uint16_t)1) -#elif (MATRIX_COLS <= 32) -# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") -# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop32(matrix[i]) -# define ROW_SHIFTER ((uint32_t)1) -#endif - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} +#include "quantum.h" +#include "matrix.h" +#include "uart.h" -void matrix_init(void) { +#define UART_MATRIX_RESPONSE_TIMEOUT 10000 - matrix_init_quantum(); - serial_init(); +void matrix_init_custom(void) { + uart_init(1000000); } -uint8_t matrix_scan(void) -{ +bool matrix_scan_custom(matrix_row_t current_matrix[]) { uint32_t timeout = 0; + bool changed = false; //the s character requests the RF slave to send the matrix - SERIAL_UART_DATA = 's'; + uart_write('s'); //trust the external keystates entirely, erase the last data uint8_t uart_data[11] = {0}; - //there are 14 bytes corresponding to 14 columns, and an end byte + //there are 10 bytes corresponding to 10 columns, and then an end byte for (uint8_t i = 0; i < 11; i++) { //wait for the serial data, timeout if it's been too long //this only happened in testing with a loose wire, but does no //harm to leave it in here - while(!SERIAL_UART_RXD_PRESENT){ + while (!uart_available()) { timeout++; - if (timeout > 10000){ + if (timeout > UART_MATRIX_RESPONSE_TIMEOUT) { break; } } - uart_data[i] = SERIAL_UART_DATA; + + if (timeout < UART_MATRIX_RESPONSE_TIMEOUT) { + uart_data[i] = uart_read(); + } else { + uart_data[i] = 0x00; + } } //check for the end packet, the key state bytes use the LSBs, so 0xE0 //will only show up here if the correct bytes were recieved - if (uart_data[10] == 0xE0) - { + if (uart_data[10] == 0xE0) { //shifting and transferring the keystates to the QMK matrix variable for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 7; + matrix_row_t current_row = (uint16_t) uart_data[i * 2] | (uint16_t) uart_data[i * 2 + 1] << 7; + if (current_matrix[i] != current_row) { + changed = true; + } + current_matrix[i] = current_row; } } - - matrix_scan_quantum(); - return 1; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print_matrix_header(); - - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); - print_matrix_row(row); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += matrix_bitpop(i); - } - return count; + return changed; } diff --git a/keyboards/redox_w/redox_w.c b/keyboards/redox_w/redox_w.c index 5b86344536..48ea7d3bed 100644 --- a/keyboards/redox_w/redox_w.c +++ b/keyboards/redox_w/redox_w.c @@ -1,10 +1,15 @@ #include "redox_w.h" void led_init(void) { - DDRD |= (1<<1); - PORTD |= (1<<1); - DDRF |= (1<<4) | (1<<5); - PORTF |= (1<<4) | (1<<5); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(F4); + setPinOutput(F5); + + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(F4); + writePinHigh(F5); } diff --git a/keyboards/redox_w/redox_w.h b/keyboards/redox_w/redox_w.h index 727c3050dc..1ed42c8458 100644 --- a/keyboards/redox_w/redox_w.h +++ b/keyboards/redox_w/redox_w.h @@ -2,21 +2,20 @@ #include "quantum.h" -#define red_led_off PORTF |= (1<<5) -#define red_led_on PORTF &= ~(1<<5) -#define blu_led_off PORTF |= (1<<4) -#define blu_led_on PORTF &= ~(1<<4) -#define grn_led_off PORTD |= (1<<1) -#define grn_led_on PORTD &= ~(1<<1) +#define red_led_off writePinHigh(F5) +#define red_led_on writePinLow(F5) +#define blu_led_off writePinHigh(F4) +#define blu_led_on writePinLow(F4) +#define grn_led_off writePinHigh(D1) +#define grn_led_on writePinLow(D1) +#define wht_led_off writePinHigh(D0) +#define wht_led_on writePinLow(D0) -#define set_led_off red_led_off; grn_led_off; blu_led_off -#define set_led_red red_led_on; grn_led_off; blu_led_off -#define set_led_blue red_led_off; grn_led_off; blu_led_on -#define set_led_green red_led_off; grn_led_on; blu_led_off -#define set_led_yellow red_led_on; grn_led_on; blu_led_off -#define set_led_magenta red_led_on; grn_led_off; blu_led_on -#define set_led_cyan red_led_off; grn_led_on; blu_led_on -#define set_led_white red_led_on; grn_led_on; blu_led_on +#define set_led_off red_led_off; grn_led_off; blu_led_off; wht_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off; wht_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on; wht_led_off +#define set_led_green red_led_off; grn_led_on; blu_led_off; wht_led_off +#define set_led_white red_led_off; grn_led_off; blu_led_off; wht_led_on // This a shortcut to help you visually see your layout. // The first section contains all of the arguements diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk index 56e3af6227..8cb1736147 100644 --- a/keyboards/redox_w/rules.mk +++ b/keyboards/redox_w/rules.mk @@ -5,18 +5,19 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -# comment out to disable the options. +# change yes to no to disable # BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +CUSTOM_MATRIX = lite -# # project specific files -SRC += matrix.c serial_uart.c +# project specific files +SRC += matrix.c +QUANTUM_LIB_SRC += uart.c |