aboutsummaryrefslogtreecommitdiff
path: root/keyboards/redox_w/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/redox_w/config.h')
-rw-r--r--keyboards/redox_w/config.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/keyboards/redox_w/config.h b/keyboards/redox_w/config.h
new file mode 100644
index 000000000..810a236d9
--- /dev/null
+++ b/keyboards/redox_w/config.h
@@ -0,0 +1,81 @@
1/* Copyright 2017 Mattia Dal Ben
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0x6060
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Mattia Dal Ben
27#define PRODUCT Redox_wireless
28#define DESCRIPTION q.m.k. keyboard firmware for Redox-w
29
30/* key matrix size */
31#define MATRIX_ROWS 5
32#define MATRIX_COLS 14
33
34/* define if matrix has ghost */
35//#define MATRIX_HAS_GHOST
36
37/* number of backlight levels */
38//#define BACKLIGHT_LEVELS 3
39
40#define ONESHOT_TIMEOUT 500
41
42
43/* key combination for command */
44#define IS_COMMAND() ( \
45 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
46)
47
48/*
49 * Feature disable options
50 * These options are also useful to firmware size reduction.
51 */
52
53/* disable debug print */
54//#define NO_DEBUG
55
56/* disable print */
57//#define NO_PRINT
58
59/* disable action features */
60//#define NO_ACTION_LAYER
61//#define NO_ACTION_TAPPING
62//#define NO_ACTION_ONESHOT
63//#define NO_ACTION_MACRO
64//#define NO_ACTION_FUNCTION
65
66//UART settings for communication with the RF microcontroller
67#define SERIAL_UART_BAUD 1000000
68#define SERIAL_UART_DATA UDR1
69#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
70#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
71#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
72#define SERIAL_UART_INIT() do { \
73 /* baud rate */ \
74 UBRR1L = SERIAL_UART_UBRR; \
75 /* baud rate */ \
76 UBRR1H = SERIAL_UART_UBRR >> 8; \
77 /* enable TX and RX */ \
78 UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
79 /* 8-bit data */ \
80 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
81 } while(0)