2018-08-19 22:29:11 +02:00
|
|
|
/*
|
2021-06-20 04:03:11 +02:00
|
|
|
Copyright 2021
|
2018-08-19 22:29:11 +02:00
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
2021-06-20 04:03:11 +02:00
|
|
|
#pragma once
|
2018-08-19 22:29:11 +02:00
|
|
|
|
|
|
|
#include "config_common.h"
|
|
|
|
|
|
|
|
/* USB Device descriptor parameter */
|
2021-06-20 04:03:11 +02:00
|
|
|
#define VENDOR_ID 0xFEED
|
|
|
|
#define PRODUCT_ID 0x6060
|
|
|
|
#define DEVICE_VER 0x0001
|
|
|
|
#define MANUFACTURER unknown
|
|
|
|
#define PRODUCT Telophase
|
2018-08-19 22:29:11 +02:00
|
|
|
|
|
|
|
/* key matrix size */
|
|
|
|
#define MATRIX_ROWS 4
|
|
|
|
#define MATRIX_COLS 12
|
|
|
|
|
|
|
|
#define ONESHOT_TIMEOUT 500
|
|
|
|
|
2021-06-20 04:03:11 +02:00
|
|
|
/*
|
|
|
|
* Force NKRO
|
|
|
|
*
|
|
|
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
|
|
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
|
|
|
* makefile for this to work.)
|
|
|
|
*
|
|
|
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
|
|
|
* until the next keyboard reset.
|
|
|
|
*
|
|
|
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
|
|
|
* fully operational during normal computer usage.
|
|
|
|
*
|
|
|
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
|
|
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
|
|
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
|
|
|
* power-up.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
//#define FORCE_NKRO
|
|
|
|
|
2018-08-19 22:29:11 +02:00
|
|
|
/*
|
|
|
|
* Feature disable options
|
|
|
|
* These options are also useful to firmware size reduction.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* disable debug print */
|
|
|
|
//#define NO_DEBUG
|
|
|
|
|
|
|
|
/* disable print */
|
|
|
|
//#define NO_PRINT
|
|
|
|
|
|
|
|
/* disable action features */
|
|
|
|
//#define NO_ACTION_LAYER
|
|
|
|
//#define NO_ACTION_TAPPING
|
|
|
|
//#define NO_ACTION_ONESHOT
|
|
|
|
|
2021-06-20 04:03:11 +02:00
|
|
|
/* disable these deprecated features by default */
|
|
|
|
#define NO_ACTION_MACRO
|
|
|
|
#define NO_ACTION_FUNCTION
|
|
|
|
|
|
|
|
// UART settings for communication with the RF microcontroller
|
2018-08-19 22:29:11 +02:00
|
|
|
#define SERIAL_UART_BAUD 1000000
|
|
|
|
#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
|
2021-02-05 23:20:48 +01:00
|
|
|
#define SERIAL_UART_INIT_CUSTOM \
|
|
|
|
/* enable TX and RX */ \
|
|
|
|
UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
|
|
|
|
/* 8-bit data */ \
|
|
|
|
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10);
|