mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-18 05:32:05 +00:00
Merge branch 'master' of https://github.com/qmk/qmk_firmware
This commit is contained in:
commit
6ed230d5fa
@ -261,12 +261,24 @@ void oled_task(void);
|
|||||||
// Called at the start of oled_task, weak function overridable by the user
|
// Called at the start of oled_task, weak function overridable by the user
|
||||||
void oled_task_user(void);
|
void oled_task_user(void);
|
||||||
|
|
||||||
// Scrolls the entire display right
|
// Set the specific 8 lines rows of the screen to scroll.
|
||||||
|
// 0 is the default for start, and 7 for end, which is the entire
|
||||||
|
// height of the screen. For 128x32 screens, rows 4-7 are not used.
|
||||||
|
void oled_scroll_set_area(uint8_t start_line, uint8_t end_line);
|
||||||
|
|
||||||
|
// Sets scroll speed, 0-7, fastest to slowest. Default is three.
|
||||||
|
// Does not take effect until scrolling is either started or restarted
|
||||||
|
// the ssd1306 supports 8 speeds with the delay
|
||||||
|
// listed below betwen each frame of the scrolling effect
|
||||||
|
// 0=2, 1=3, 2=4, 3=5, 4=25, 5=64, 6=128, 7=256
|
||||||
|
void oled_scroll_set_speed(uint8_t speed);
|
||||||
|
|
||||||
|
// Begin scrolling the entire display right
|
||||||
// Returns true if the screen was scrolling or starts scrolling
|
// Returns true if the screen was scrolling or starts scrolling
|
||||||
// NOTE: display contents cannot be changed while scrolling
|
// NOTE: display contents cannot be changed while scrolling
|
||||||
bool oled_scroll_right(void);
|
bool oled_scroll_right(void);
|
||||||
|
|
||||||
// Scrolls the entire display left
|
// Begin scrolling the entire display left
|
||||||
// Returns true if the screen was scrolling or starts scrolling
|
// Returns true if the screen was scrolling or starts scrolling
|
||||||
// NOTE: display contents cannot be changed while scrolling
|
// NOTE: display contents cannot be changed while scrolling
|
||||||
bool oled_scroll_left(void);
|
bool oled_scroll_left(void);
|
||||||
|
@ -17,7 +17,7 @@ Note that this set-up has been tested on Ubuntu 16.04 only for the moment.
|
|||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
## Build Environment
|
## Build Environment
|
||||||
Before starting, you must have followed the [Getting Started](news_getting_started.md) section of the Tutorial. In particular, you must have been able to build the firmware with [the `qmk compile` command](news_building_firmware#build-your-firmware).
|
Before starting, you must have followed the [Getting Started](newbs_getting_started.md) section of the Tutorial. In particular, you must have been able to build the firmware with [the `qmk compile` command](newbs_building_firmware.md#build-your-firmware).
|
||||||
|
|
||||||
## Java
|
## Java
|
||||||
Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
|
Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development.
|
||||||
|
@ -1,324 +0,0 @@
|
|||||||
/*
|
|
||||||
pins_arduino.h - Pin definition functions for Arduino
|
|
||||||
Part of Arduino - http://www.arduino.cc/
|
|
||||||
|
|
||||||
Copyright (c) 2007 David A. Mellis
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library 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
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General
|
|
||||||
Public License along with this library; if not, write to the
|
|
||||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
||||||
Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
$Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef Pins_Arduino_h
|
|
||||||
#define Pins_Arduino_h
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
// Workaround for wrong definitions in "iom32u4.h".
|
|
||||||
// This should be fixed in the AVR toolchain.
|
|
||||||
#undef UHCON
|
|
||||||
#undef UHINT
|
|
||||||
#undef UHIEN
|
|
||||||
#undef UHADDR
|
|
||||||
#undef UHFNUM
|
|
||||||
#undef UHFNUML
|
|
||||||
#undef UHFNUMH
|
|
||||||
#undef UHFLEN
|
|
||||||
#undef UPINRQX
|
|
||||||
#undef UPINTX
|
|
||||||
#undef UPNUM
|
|
||||||
#undef UPRST
|
|
||||||
#undef UPCONX
|
|
||||||
#undef UPCFG0X
|
|
||||||
#undef UPCFG1X
|
|
||||||
#undef UPSTAX
|
|
||||||
#undef UPCFG2X
|
|
||||||
#undef UPIENX
|
|
||||||
#undef UPDATX
|
|
||||||
#undef TCCR2A
|
|
||||||
#undef WGM20
|
|
||||||
#undef WGM21
|
|
||||||
#undef COM2B0
|
|
||||||
#undef COM2B1
|
|
||||||
#undef COM2A0
|
|
||||||
#undef COM2A1
|
|
||||||
#undef TCCR2B
|
|
||||||
#undef CS20
|
|
||||||
#undef CS21
|
|
||||||
#undef CS22
|
|
||||||
#undef WGM22
|
|
||||||
#undef FOC2B
|
|
||||||
#undef FOC2A
|
|
||||||
#undef TCNT2
|
|
||||||
#undef TCNT2_0
|
|
||||||
#undef TCNT2_1
|
|
||||||
#undef TCNT2_2
|
|
||||||
#undef TCNT2_3
|
|
||||||
#undef TCNT2_4
|
|
||||||
#undef TCNT2_5
|
|
||||||
#undef TCNT2_6
|
|
||||||
#undef TCNT2_7
|
|
||||||
#undef OCR2A
|
|
||||||
#undef OCR2_0
|
|
||||||
#undef OCR2_1
|
|
||||||
#undef OCR2_2
|
|
||||||
#undef OCR2_3
|
|
||||||
#undef OCR2_4
|
|
||||||
#undef OCR2_5
|
|
||||||
#undef OCR2_6
|
|
||||||
#undef OCR2_7
|
|
||||||
#undef OCR2B
|
|
||||||
#undef OCR2_0
|
|
||||||
#undef OCR2_1
|
|
||||||
#undef OCR2_2
|
|
||||||
#undef OCR2_3
|
|
||||||
#undef OCR2_4
|
|
||||||
#undef OCR2_5
|
|
||||||
#undef OCR2_6
|
|
||||||
#undef OCR2_7
|
|
||||||
|
|
||||||
#define NUM_DIGITAL_PINS 30
|
|
||||||
#define NUM_ANALOG_INPUTS 12
|
|
||||||
|
|
||||||
#define TX_RX_LED_INIT DDRD |= (1 << 5), DDRB |= (1 << 0)
|
|
||||||
#define TXLED0 PORTD |= (1 << 5)
|
|
||||||
#define TXLED1 PORTD &= ~(1 << 5)
|
|
||||||
#define RXLED0 PORTB |= (1 << 0)
|
|
||||||
#define RXLED1 PORTB &= ~(1 << 0)
|
|
||||||
|
|
||||||
static const uint8_t SDA = 2;
|
|
||||||
static const uint8_t SCL = 3;
|
|
||||||
#define LED_BUILTIN 13
|
|
||||||
|
|
||||||
// Map SPI port to 'new' pins D14..D17
|
|
||||||
static const uint8_t SS = 17;
|
|
||||||
static const uint8_t MOSI = 16;
|
|
||||||
static const uint8_t MISO = 14;
|
|
||||||
static const uint8_t SCK = 15;
|
|
||||||
|
|
||||||
// Mapping of analog pins as digital I/O
|
|
||||||
// A6-A11 share with digital pins
|
|
||||||
static const uint8_t ADC0 = 18;
|
|
||||||
static const uint8_t ADC1 = 19;
|
|
||||||
static const uint8_t ADC2 = 20;
|
|
||||||
static const uint8_t ADC3 = 21;
|
|
||||||
static const uint8_t ADC4 = 22;
|
|
||||||
static const uint8_t ADC5 = 23;
|
|
||||||
static const uint8_t ADC6 = 24; // D4
|
|
||||||
static const uint8_t ADC7 = 25; // D6
|
|
||||||
static const uint8_t ADC8 = 26; // D8
|
|
||||||
static const uint8_t ADC9 = 27; // D9
|
|
||||||
static const uint8_t ADC10 = 28; // D10
|
|
||||||
static const uint8_t ADC11 = 29; // D12
|
|
||||||
|
|
||||||
#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
|
|
||||||
#define digitalPinToPCICRbit(p) 0
|
|
||||||
#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
|
|
||||||
#define digitalPinToPCMSKbit(p) (((p) >= 8 && (p) <= 11) ? (p)-4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
|
|
||||||
|
|
||||||
// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
|
|
||||||
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
|
|
||||||
#define analogPinToChannel(P) (pgm_read_byte(analog_pin_to_channel_PGM + (P)))
|
|
||||||
|
|
||||||
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
|
|
||||||
|
|
||||||
#ifdef ARDUINO_MAIN
|
|
||||||
|
|
||||||
// On the Arduino board, digital pins are also used
|
|
||||||
// for the analog output (software PWM). Analog input
|
|
||||||
// pins are a separate set.
|
|
||||||
|
|
||||||
// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
|
|
||||||
//
|
|
||||||
// D0 PD2 RXD1/INT2
|
|
||||||
// D1 PD3 TXD1/INT3
|
|
||||||
// D2 PD1 SDA SDA/INT1
|
|
||||||
// D3# PD0 PWM8/SCL OC0B/SCL/INT0
|
|
||||||
// D4 A6 PD4 ADC8
|
|
||||||
// D5# PC6 ??? OC3A/#OC4A
|
|
||||||
// D6# A7 PD7 FastPWM #OC4D/ADC10
|
|
||||||
// D7 PE6 INT6/AIN0
|
|
||||||
//
|
|
||||||
// D8 A8 PB4 ADC11/PCINT4
|
|
||||||
// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
|
|
||||||
// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
|
|
||||||
// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
|
|
||||||
// D12 A11 PD6 T1/#OC4D/ADC9
|
|
||||||
// D13# PC7 PWM10 CLK0/OC4A
|
|
||||||
//
|
|
||||||
// A0 D18 PF7 ADC7
|
|
||||||
// A1 D19 PF6 ADC6
|
|
||||||
// A2 D20 PF5 ADC5
|
|
||||||
// A3 D21 PF4 ADC4
|
|
||||||
// A4 D22 PF1 ADC1
|
|
||||||
// A5 D23 PF0 ADC0
|
|
||||||
//
|
|
||||||
// New pins D14..D17 to map SPI port to digital pins
|
|
||||||
//
|
|
||||||
// MISO D14 PB3 MISO,PCINT3
|
|
||||||
// SCK D15 PB1 SCK,PCINT1
|
|
||||||
// MOSI D16 PB2 MOSI,PCINT2
|
|
||||||
// SS D17 PB0 RXLED,SS/PCINT0
|
|
||||||
//
|
|
||||||
// Connected LEDs on board for TX and RX
|
|
||||||
// TXLED D24 PD5 XCK1
|
|
||||||
// RXLED D17 PB0
|
|
||||||
// HWB PE2 HWB
|
|
||||||
|
|
||||||
// these arrays map port names (e.g. port B) to the
|
|
||||||
// appropriate addresses for various functions (e.g. reading
|
|
||||||
// and writing)
|
|
||||||
const uint16_t PROGMEM port_to_mode_PGM[] = {
|
|
||||||
NOT_A_PORT, NOT_A_PORT, (uint16_t)&DDRB, (uint16_t)&DDRC, (uint16_t)&DDRD, (uint16_t)&DDRE, (uint16_t)&DDRF,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_output_PGM[] = {
|
|
||||||
NOT_A_PORT, NOT_A_PORT, (uint16_t)&PORTB, (uint16_t)&PORTC, (uint16_t)&PORTD, (uint16_t)&PORTE, (uint16_t)&PORTF,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM port_to_input_PGM[] = {
|
|
||||||
NOT_A_PORT, NOT_A_PORT, (uint16_t)&PINB, (uint16_t)&PINC, (uint16_t)&PIND, (uint16_t)&PINE, (uint16_t)&PINF,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
|
|
||||||
PD, // D0 - PD2
|
|
||||||
PD, // D1 - PD3
|
|
||||||
PD, // D2 - PD1
|
|
||||||
PD, // D3 - PD0
|
|
||||||
PD, // D4 - PD4
|
|
||||||
PC, // D5 - PC6
|
|
||||||
PD, // D6 - PD7
|
|
||||||
PE, // D7 - PE6
|
|
||||||
|
|
||||||
PB, // D8 - PB4
|
|
||||||
PB, // D9 - PB5
|
|
||||||
PB, // D10 - PB6
|
|
||||||
PB, // D11 - PB7
|
|
||||||
PD, // D12 - PD6
|
|
||||||
PC, // D13 - PC7
|
|
||||||
|
|
||||||
PB, // D14 - MISO - PB3
|
|
||||||
PB, // D15 - SCK - PB1
|
|
||||||
PB, // D16 - MOSI - PB2
|
|
||||||
PB, // D17 - SS - PB0
|
|
||||||
|
|
||||||
PF, // D18 - A0 - PF7
|
|
||||||
PF, // D19 - A1 - PF6
|
|
||||||
PF, // D20 - A2 - PF5
|
|
||||||
PF, // D21 - A3 - PF4
|
|
||||||
PF, // D22 - A4 - PF1
|
|
||||||
PF, // D23 - A5 - PF0
|
|
||||||
|
|
||||||
PD, // D24 - PD5
|
|
||||||
PD, // D25 / D6 - A7 - PD7
|
|
||||||
PB, // D26 / D8 - A8 - PB4
|
|
||||||
PB, // D27 / D9 - A9 - PB5
|
|
||||||
PB, // D28 / D10 - A10 - PB6
|
|
||||||
PD, // D29 / D12 - A11 - PD6
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
|
|
||||||
_BV(2), // D0 - PD2
|
|
||||||
_BV(3), // D1 - PD3
|
|
||||||
_BV(1), // D2 - PD1
|
|
||||||
_BV(0), // D3 - PD0
|
|
||||||
_BV(4), // D4 - PD4
|
|
||||||
_BV(6), // D5 - PC6
|
|
||||||
_BV(7), // D6 - PD7
|
|
||||||
_BV(6), // D7 - PE6
|
|
||||||
|
|
||||||
_BV(4), // D8 - PB4
|
|
||||||
_BV(5), // D9 - PB5
|
|
||||||
_BV(6), // D10 - PB6
|
|
||||||
_BV(7), // D11 - PB7
|
|
||||||
_BV(6), // D12 - PD6
|
|
||||||
_BV(7), // D13 - PC7
|
|
||||||
|
|
||||||
_BV(3), // D14 - MISO - PB3
|
|
||||||
_BV(1), // D15 - SCK - PB1
|
|
||||||
_BV(2), // D16 - MOSI - PB2
|
|
||||||
_BV(0), // D17 - SS - PB0
|
|
||||||
|
|
||||||
_BV(7), // D18 - A0 - PF7
|
|
||||||
_BV(6), // D19 - A1 - PF6
|
|
||||||
_BV(5), // D20 - A2 - PF5
|
|
||||||
_BV(4), // D21 - A3 - PF4
|
|
||||||
_BV(1), // D22 - A4 - PF1
|
|
||||||
_BV(0), // D23 - A5 - PF0
|
|
||||||
|
|
||||||
_BV(5), // D24 - PD5
|
|
||||||
_BV(7), // D25 / D6 - A7 - PD7
|
|
||||||
_BV(4), // D26 / D8 - A8 - PB4
|
|
||||||
_BV(5), // D27 / D9 - A9 - PB5
|
|
||||||
_BV(6), // D28 / D10 - A10 - PB6
|
|
||||||
_BV(6), // D29 / D12 - A11 - PD6
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
|
||||||
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, TIMER0B, /* 3 */
|
|
||||||
NOT_ON_TIMER, TIMER3A, /* 5 */
|
|
||||||
TIMER4D, /* 6 */
|
|
||||||
NOT_ON_TIMER,
|
|
||||||
|
|
||||||
NOT_ON_TIMER, TIMER1A, /* 9 */
|
|
||||||
TIMER1B, /* 10 */
|
|
||||||
TIMER0A, /* 11 */
|
|
||||||
|
|
||||||
NOT_ON_TIMER, TIMER4A, /* 13 */
|
|
||||||
|
|
||||||
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER,
|
|
||||||
|
|
||||||
NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER,
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
|
|
||||||
7, // A0 PF7 ADC7
|
|
||||||
6, // A1 PF6 ADC6
|
|
||||||
5, // A2 PF5 ADC5
|
|
||||||
4, // A3 PF4 ADC4
|
|
||||||
1, // A4 PF1 ADC1
|
|
||||||
0, // A5 PF0 ADC0
|
|
||||||
8, // A6 D4 PD4 ADC8
|
|
||||||
10, // A7 D6 PD7 ADC10
|
|
||||||
11, // A8 D8 PB4 ADC11
|
|
||||||
12, // A9 D9 PB5 ADC12
|
|
||||||
13, // A10 D10 PB6 ADC13
|
|
||||||
9 // A11 D12 PD6 ADC9
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* ARDUINO_MAIN */
|
|
||||||
|
|
||||||
// These serial port names are intended to allow libraries and architecture-neutral
|
|
||||||
// sketches to automatically default to the correct port name for a particular type
|
|
||||||
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
|
|
||||||
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
|
|
||||||
//
|
|
||||||
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
|
|
||||||
//
|
|
||||||
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
|
|
||||||
//
|
|
||||||
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
|
|
||||||
//
|
|
||||||
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
|
|
||||||
//
|
|
||||||
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
|
|
||||||
// pins are NOT connected to anything by default.
|
|
||||||
#define SERIAL_PORT_MONITOR Serial
|
|
||||||
#define SERIAL_PORT_USBVIRTUAL Serial
|
|
||||||
#define SERIAL_PORT_HARDWARE Serial1
|
|
||||||
#define SERIAL_PORT_HARDWARE_OPEN Serial1
|
|
||||||
|
|
||||||
#endif /* Pins_Arduino_h */
|
|
@ -108,6 +108,9 @@ bool oled_active = false;
|
|||||||
bool oled_scrolling = false;
|
bool oled_scrolling = false;
|
||||||
uint8_t oled_rotation = 0;
|
uint8_t oled_rotation = 0;
|
||||||
uint8_t oled_rotation_width = 0;
|
uint8_t oled_rotation_width = 0;
|
||||||
|
uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values
|
||||||
|
uint8_t oled_scroll_start = 0;
|
||||||
|
uint8_t oled_scroll_end = 7;
|
||||||
#if OLED_TIMEOUT > 0
|
#if OLED_TIMEOUT > 0
|
||||||
uint32_t oled_timeout;
|
uint32_t oled_timeout;
|
||||||
#endif
|
#endif
|
||||||
@ -515,12 +518,37 @@ bool oled_off(void) {
|
|||||||
return !oled_active;
|
return !oled_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the specific 8 lines rows of the screen to scroll.
|
||||||
|
// 0 is the default for start, and 7 for end, which is the entire
|
||||||
|
// height of the screen. For 128x32 screens, rows 4-7 are not used.
|
||||||
|
void oled_scroll_set_area(uint8_t start_line, uint8_t end_line) {
|
||||||
|
oled_scroll_start = start_line;
|
||||||
|
oled_scroll_end = end_line;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_scroll_set_speed(uint8_t speed) {
|
||||||
|
// Sets the speed for scrolling... does not take effect
|
||||||
|
// until scrolling is either started or restarted
|
||||||
|
// the ssd1306 supports 8 speeds
|
||||||
|
// FrameRate2 speed = 7
|
||||||
|
// FrameRate3 speed = 4
|
||||||
|
// FrameRate4 speed = 5
|
||||||
|
// FrameRate5 speed = 0
|
||||||
|
// FrameRate25 speed = 6
|
||||||
|
// FrameRate64 speed = 1
|
||||||
|
// FrameRate128 speed = 2
|
||||||
|
// FrameRate256 speed = 3
|
||||||
|
// for ease of use these are remaped here to be in order
|
||||||
|
static const uint8_t scroll_remap[8] = {7, 4, 5, 0, 6, 1, 2, 3};
|
||||||
|
oled_scroll_speed = scroll_remap[speed];
|
||||||
|
}
|
||||||
|
|
||||||
bool oled_scroll_right(void) {
|
bool oled_scroll_right(void) {
|
||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL};
|
uint8_t display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL};
|
||||||
if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT(display_scroll_right) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_scroll_right cmd failed\n");
|
print("oled_scroll_right cmd failed\n");
|
||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
}
|
}
|
||||||
@ -533,8 +561,8 @@ bool oled_scroll_left(void) {
|
|||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL};
|
uint8_t display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL};
|
||||||
if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT(display_scroll_left) != I2C_STATUS_SUCCESS) {
|
||||||
print("oled_scroll_left cmd failed\n");
|
print("oled_scroll_left cmd failed\n");
|
||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,18 @@ void oled_task(void);
|
|||||||
// Called at the start of oled_task, weak function overridable by the user
|
// Called at the start of oled_task, weak function overridable by the user
|
||||||
void oled_task_user(void);
|
void oled_task_user(void);
|
||||||
|
|
||||||
|
// Set the specific 8 lines rows of the screen to scroll.
|
||||||
|
// 0 is the default for start, and 7 for end, which is the entire
|
||||||
|
// height of the screen. For 128x32 screens, rows 4-7 are not used.
|
||||||
|
void oled_scroll_set_area(uint8_t start_line, uint8_t end_line);
|
||||||
|
|
||||||
|
// Sets scroll speed, 0-7, fastest to slowest. Default is three.
|
||||||
|
// Does not take effect until scrolling is either started or restarted
|
||||||
|
// the ssd1306 supports 8 speeds with the delay
|
||||||
|
// listed below betwen each frame of the scrolling effect
|
||||||
|
// 0=2, 1=3, 2=4, 3=5, 4=25, 5=64, 6=128, 7=256
|
||||||
|
void oled_scroll_set_speed(uint8_t speed);
|
||||||
|
|
||||||
// Scrolls the entire display right
|
// Scrolls the entire display right
|
||||||
// Returns true if the screen was scrolling or starts scrolling
|
// Returns true if the screen was scrolling or starts scrolling
|
||||||
// NOTE: display contents cannot be changed while scrolling
|
// NOTE: display contents cannot be changed while scrolling
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -102,9 +102,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
||||||
return 0;
|
return 0;
|
||||||
@ -241,7 +242,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -254,7 +255,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -96,37 +96,38 @@ uint8_t matrix_cols(void)
|
|||||||
void tx_rx_leds_init(void)
|
void tx_rx_leds_init(void)
|
||||||
{
|
{
|
||||||
#ifndef NO_DEBUG_LEDS
|
#ifndef NO_DEBUG_LEDS
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void tx_led_on(void)
|
void tx_led_on(void)
|
||||||
{
|
{
|
||||||
#ifndef NO_DEBUG_LEDS
|
#ifndef NO_DEBUG_LEDS
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void tx_led_off(void)
|
void tx_led_off(void)
|
||||||
{
|
{
|
||||||
#ifndef NO_DEBUG_LEDS
|
#ifndef NO_DEBUG_LEDS
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void rx_led_on(void)
|
void rx_led_on(void)
|
||||||
{
|
{
|
||||||
#ifndef NO_DEBUG_LEDS
|
#ifndef NO_DEBUG_LEDS
|
||||||
RXLED1;
|
writePinLow(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void rx_led_off(void)
|
void rx_led_off(void)
|
||||||
{
|
{
|
||||||
#ifndef NO_DEBUG_LEDS
|
#ifndef NO_DEBUG_LEDS
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4250 // BP for Backprop
|
||||||
#define PRODUCT_ID 0xD070
|
#define PRODUCT_ID 0x4D4C // ML for Multi
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Backprop Studio
|
#define MANUFACTURER Backprop Studio
|
||||||
#define PRODUCT Doro67 Multi PCB
|
#define PRODUCT Doro67 Multi PCB
|
||||||
|
76
keyboards/doro67/multi/keymaps/via/keymap.c
Normal file
76
keyboards/doro67/multi/keymaps/via/keymap.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/* Copyright 2019 ShadeDream
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_65_ansi_blocker(
|
||||||
|
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_BSPC, KC_INS,
|
||||||
|
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_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Fn layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_65_ansi_blocker(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
43
keyboards/doro67/multi/keymaps/via/readme.md
Normal file
43
keyboards/doro67/multi/keymaps/via/readme.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Default Doro67 ANSI layout.
|
||||||
|
|
||||||
|
**THIS IS THE DEFAULT ANSI KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||||
|
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
|
||||||
|
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
|
||||||
|
|
||||||
|
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||||
|
If you purchased an RGB PCB, please see the 'rgb' directory.
|
||||||
|
|
||||||
|
This is the default ANSI layout that comes flashed on the Doro67 multi PCB with
|
||||||
|
the exception of adding backtick as it was not mapped.
|
||||||
|
|
||||||
|
Default layer:
|
||||||
|
|
||||||
|
```
|
||||||
|
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
│Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│
|
||||||
|
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│
|
||||||
|
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
│ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│
|
||||||
|
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
│ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│
|
||||||
|
├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
│LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │
|
||||||
|
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
```
|
||||||
|
|
||||||
|
Fn layer:
|
||||||
|
|
||||||
|
```
|
||||||
|
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
│ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │
|
||||||
|
├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
│BLTog│BLS│BL-│BL+│Rst│ │ │ │ │ │ │ │ │ │ │
|
||||||
|
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
│ │ │ │ │ │ │ │ │ │ │
|
||||||
|
└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
```
|
2
keyboards/doro67/multi/keymaps/via/rules.mk
Normal file
2
keyboards/doro67/multi/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
@ -3,8 +3,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4250 // BP for Backprop
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x5245 // RE for Regular
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Backprop Studio
|
#define MANUFACTURER Backprop Studio
|
||||||
#define PRODUCT Doro67 Regular PCB
|
#define PRODUCT Doro67 Regular PCB
|
||||||
@ -28,4 +28,3 @@
|
|||||||
#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
|
#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
|
||||||
|
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
76
keyboards/doro67/regular/keymaps/via/keymap.c
Normal file
76
keyboards/doro67/regular/keymaps/via/keymap.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_65_ansi_blocker(
|
||||||
|
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_BSPC, KC_INS,
|
||||||
|
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_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Fn layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ │ │ │ │Rst│ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_65_ansi_blocker(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
5
keyboards/doro67/regular/keymaps/via/readme.md
Normal file
5
keyboards/doro67/regular/keymaps/via/readme.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# The default keymap for doro67
|
||||||
|
|
||||||
|
**THIS IS THE DEFAULT KEYMAP DIRECTORY (AVAILABILITY: CHINA GB ONLY)**
|
||||||
|
If you are a non-china buyer, you probably have the multi PCB or rgb PCB.
|
||||||
|
Please look at the "multi" and "rgb" readme files.
|
2
keyboards/doro67/regular/keymaps/via/rules.mk
Normal file
2
keyboards/doro67/regular/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4250 // BP for Backprop
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x5247 // RG for RGB
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Backprop Studio
|
#define MANUFACTURER Backprop Studio
|
||||||
#define PRODUCT Doro67 RGB PCB
|
#define PRODUCT Doro67 RGB PCB
|
||||||
|
77
keyboards/doro67/rgb/keymaps/via/keymap.c
Normal file
77
keyboards/doro67/rgb/keymaps/via/keymap.c
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/* Copyright 2019 MechMerlin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace │Ins│
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │LCtl│LGui│LAlt│ Space │RAlt│ Fn │ │ ← │ ↓ │ → │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_65_ansi_blocker(
|
||||||
|
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_BSPC, KC_INS,
|
||||||
|
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_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Fn layer
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐
|
||||||
|
* │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤
|
||||||
|
* │BEST │URL│ │ │Rst│ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │ RGB │Mo+│Hu+│Sa+│Va+│Sp+│ │ │ │ │ │ │ │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │ │Mo-│Hu-│Sa-│Va-│Sp-│ │ │ │ │ │ │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT_65_ansi_blocker(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
7
keyboards/doro67/rgb/keymaps/via/readme.md
Normal file
7
keyboards/doro67/rgb/keymaps/via/readme.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# The default keymap for rgb
|
||||||
|
|
||||||
|
**RGB PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||||
|
The "rgb" directory includes the keymap for the RGB PCB.
|
||||||
|
|
||||||
|
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||||
|
If you purchased a non-rgb PCB, please see the 'multi' directory.
|
2
keyboards/doro67/rgb/keymaps/via/rules.mk
Normal file
2
keyboards/doro67/rgb/keymaps/via/rules.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
@ -29,24 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
// from pro_micro.h
|
|
||||||
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
|
|
||||||
|
|
||||||
#ifndef DISABLE_PROMICRO_LEDs
|
|
||||||
#define TXLED0 PORTD |= (1<<5)
|
|
||||||
#define TXLED1 PORTD &= ~(1<<5)
|
|
||||||
#define RXLED0 PORTB |= (1<<0)
|
|
||||||
#define RXLED1 PORTB &= ~(1<<0)
|
|
||||||
#else
|
|
||||||
#define TXLED0
|
|
||||||
#define TXLED1
|
|
||||||
#define RXLED0
|
|
||||||
#define RXLED1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DEBOUNCE
|
#ifndef DEBOUNCE
|
||||||
# define DEBOUNCE 5
|
# define DEBOUNCE 5
|
||||||
#endif
|
#endif
|
||||||
@ -108,11 +94,12 @@ void matrix_init(void) {
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
|
setPinOutput(D5);
|
||||||
|
|
||||||
#ifdef DISABLE_PROMICRO_LEDs
|
#ifdef DISABLE_PROMICRO_LEDs
|
||||||
PORTD |= (1<<5);
|
writePinHigh(B0);
|
||||||
PORTB |= (1<<0);
|
writePinHigh(D5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
@ -158,10 +145,14 @@ int serial_transaction(void) {
|
|||||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2)RXLED1;
|
#ifndef DISABLE_PROMICRO_LEDs
|
||||||
|
if(ret==2) writePinLow(B0);
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
#ifndef DISABLE_PROMICRO_LEDs
|
||||||
|
writePinHigh(B0);
|
||||||
|
#endif
|
||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||||
}
|
}
|
||||||
@ -197,8 +188,10 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( serial_transaction() ) {
|
if( serial_transaction() ) {
|
||||||
|
#ifndef DISABLE_PROMICRO_LEDs
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
#endif
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -210,8 +203,10 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#ifndef DISABLE_PROMICRO_LEDs
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
|
#endif
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_I2C
|
#ifdef USE_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -100,7 +100,8 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
|
setPinOutput(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -201,7 +202,7 @@ uint8_t matrix_scan(void)
|
|||||||
if( serial_transaction() ) {
|
if( serial_transaction() ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -214,7 +215,7 @@ uint8_t matrix_scan(void)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -99,9 +99,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -180,10 +181,10 @@ int serial_transaction(void) {
|
|||||||
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
|
||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2)RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
matrix[slaveOffset+i] = serial_slave_buffer[i];
|
||||||
}
|
}
|
||||||
@ -235,7 +236,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction() ) {
|
if( serial_transaction() ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -248,7 +249,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -100,7 +100,8 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
|
setPinOutput(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -201,7 +202,7 @@ uint8_t matrix_scan(void)
|
|||||||
if( serial_transaction() ) {
|
if( serial_transaction() ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -214,7 +215,7 @@ uint8_t matrix_scan(void)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -100,9 +100,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -185,10 +186,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
||||||
return 0;
|
return 0;
|
||||||
@ -239,7 +240,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -252,7 +253,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -101,9 +101,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -188,10 +189,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
||||||
return 0;
|
return 0;
|
||||||
@ -240,7 +241,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -253,7 +254,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
127
keyboards/xd75/keymaps/neothefox/keymap.c
Normal file
127
keyboards/xd75/keymaps/neothefox/keymap.c
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
/* Copyright 2017 Wunder
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define SYSTEM MO(_SYSTEM)
|
||||||
|
#define MPASTE LSFT(KC_INSERT)
|
||||||
|
|
||||||
|
enum xd75_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_SYSTEM
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | INSERT | HOME | PG UP | H | J | K | L | ; | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | DEL | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | LCTRL | GUI | MENU | ALT | LOWER | SPACE | SPACE | SPACE | SPACE | SPACE | RAISE | LEFT | DOWN | UP | RIGHT |
|
||||||
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, 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_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_INS, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* SYSTEM
|
||||||
|
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | RESET | DEBUG | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | |RGB_TOG |RGB_VAI |RGB VAD | | | PASTE | PR SCR | SCR LK | PAUSE |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | |RGB_MOD |RGB_SAI |RGB_HUI | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | | |RGB_SAD |RGB_HUD | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_SYSTEM] = LAYOUT_ortho_5x15( /* FUNCTION */
|
||||||
|
RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, RGB_VAD, _______, _______, MPASTE, KC_PSCR, KC_SLCK, KC_PAUSE,
|
||||||
|
_______, _______, _______, _______, _______, _______, RGB_MOD, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* LOWER
|
||||||
|
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | DELETE | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 | ISO ~ | ISO | | Home | End | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_ortho_5x15( /* LOWER */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME,KC_END, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* RAISE
|
||||||
|
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | - | = | [ | ] | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 | ISO # | ISO / | Pg Up | Pg Dn | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_ortho_5x15( /* QWERTY */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINUS,KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
// SYSTEM layer toggle
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _SYSTEM);
|
||||||
|
}
|
||||||
|
|
1
keyboards/xd75/keymaps/neothefox/readme.md
Normal file
1
keyboards/xd75/keymaps/neothefox/readme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# A OLKB-like layout for XD75
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -102,9 +102,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(D5);
|
||||||
|
writePinHigh(B0);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
|
||||||
return 0;
|
return 0;
|
||||||
@ -241,7 +242,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -254,7 +255,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -102,9 +102,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(D5);
|
||||||
|
writePinHigh(B0);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
||||||
return 0;
|
return 0;
|
||||||
@ -240,7 +241,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -253,7 +254,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "pro_micro.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
# include "i2c.h"
|
# include "i2c.h"
|
||||||
@ -102,9 +102,10 @@ void matrix_init(void)
|
|||||||
unselect_rows();
|
unselect_rows();
|
||||||
init_cols();
|
init_cols();
|
||||||
|
|
||||||
TX_RX_LED_INIT;
|
setPinOutput(B0);
|
||||||
TXLED0;
|
setPinOutput(D5);
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
|
writePinHigh(D5);
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||||
@ -189,10 +190,10 @@ int serial_transaction(int master_changed) {
|
|||||||
int ret=serial_update_buffers();
|
int ret=serial_update_buffers();
|
||||||
#endif
|
#endif
|
||||||
if (ret ) {
|
if (ret ) {
|
||||||
if(ret==2) RXLED1;
|
if(ret==2) writePinLow(B0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
RXLED0;
|
writePinHigh(B0);
|
||||||
memcpy(&matrix[slaveOffset],
|
memcpy(&matrix[slaveOffset],
|
||||||
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
(void *)serial_slave_buffer, sizeof(serial_slave_buffer));
|
||||||
return 0;
|
return 0;
|
||||||
@ -240,7 +241,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
if( serial_transaction(mchanged) ) {
|
if( serial_transaction(mchanged) ) {
|
||||||
#endif
|
#endif
|
||||||
// turn on the indicator led when halves are disconnected
|
// turn on the indicator led when halves are disconnected
|
||||||
TXLED1;
|
writePinLow(D5);
|
||||||
|
|
||||||
error_count++;
|
error_count++;
|
||||||
|
|
||||||
@ -253,7 +254,7 @@ uint8_t matrix_master_scan(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// turn off the indicator led on no error
|
// turn off the indicator led on no error
|
||||||
TXLED0;
|
writePinHigh(D5);
|
||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
@ -210,9 +210,9 @@ void dynamic_keymap_macro_send(uint8_t id) {
|
|||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the macro string one or two chars at a time
|
// Send the macro string one or three chars at a time
|
||||||
// by making temporary 1 or 2 char strings
|
// by making temporary 1 or 3 char strings
|
||||||
char data[3] = {0, 0, 0};
|
char data[4] = {0, 0, 0, 0};
|
||||||
// We already checked there was a null at the end of
|
// We already checked there was a null at the end of
|
||||||
// the buffer, so this cannot go past the end
|
// the buffer, so this cannot go past the end
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -223,10 +223,12 @@ void dynamic_keymap_macro_send(uint8_t id) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// If the char is magic (tap, down, up),
|
// If the char is magic (tap, down, up),
|
||||||
// add the next char (key to use) and send a 2 char string.
|
// add the next char (key to use) and send a 3 char string.
|
||||||
if (data[0] == SS_TAP_CODE || data[0] == SS_DOWN_CODE || data[0] == SS_UP_CODE) {
|
if (data[0] == SS_TAP_CODE || data[0] == SS_DOWN_CODE || data[0] == SS_UP_CODE) {
|
||||||
data[1] = eeprom_read_byte(p++);
|
data[1] = data[0];
|
||||||
if (data[1] == 0) {
|
data[0] = SS_QMK_PREFIX;
|
||||||
|
data[2] = eeprom_read_byte(p++);
|
||||||
|
if (data[2] == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user