From feb5e4aaebb78842c090230f68ea9de80a5c17e6 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Sat, 11 Aug 2018 00:22:09 +0900 Subject: Keyboard: Helix serial improvements (#3608) * add change_reciver2sender()/change_sender2reciver() This is a change to improve readability. * txled, rxled off in matrix_init() * add serial_send_packet() / serial_recive_packet() This is a change to reduce object size. * add serial_low() at ISR() top * add __attribute__((always_inline)) to some functions * modify serial_send_packet()/serial_recive_packet() A little, object size reduction. A little, speedup. * add debug code to helix/serial.c * Adjust sampling timing of serial signal being received * add split_scomm.c/split_scomm.h and change serial.c/serial.h serial.c was divided into 2 layers, split_scom.c and serial.c. The upper layer split_scomm.c is called from matrix.c. The lower layer serial.c accesses the hardware. * add split_scomm.c/split_scomm.h into helix/rev1 * reduce object size helix/rev2/matrix.c * remove checksum check, add parity check * force occur parity error for test * parity test ok. remove test code * change some comment & add skip code when buffer_size == 0 * serial.c: multiple types of transaction support Add 4 bits transaction-type field at packet top. Select Transaction Descriptor Table entry by transaction-type. * helix serial master-slave transaction optimize Using multi-type transaction feature of serial.c, communication contents between master slaves were optimized. * add debug code for retry * add comment into each config.h * fix ISR status drop * add a debug macro 'debug_retry_chg()' * reduce led_test size * remove debug code from helix/serial.c and etc. * helix:five_rows change TAPPING_TERM value 140 * Improved compatibility with let's split of serial.c. Finish helix/serial.c improvement. - The difference with the original let's split's serial.c - It's high-speed about 4 times. - Stable bi-directional data transfer. (Helix need master to slave transfer) - serial.h was divided 2 files, serial_config.h and sereial.h - With multiple types of transaction support, communication contents can be optimized. (NEW flexible API) - USE OLD Simple APIs (compatible with let's split serial.c) - files : - serial_config.h -- hardware configuration (need include by config.h) - serial.c/serial.h -- serial communication - USE NEW flexible APIs. (Support multi-type transaction function.) serial.c was divided into 2 layers, split_scom.c and serial.c. The upper layer split_scomm.c is called from matrix.c. The lower layer serial.c accesses the hardware. - files - split_scomm.c -- communication buffer is defined in here. call by matrix.c. - split_scomm.h -- buffer size is defined in here. include by matrix.c, split_util.c - serial_config.h -- hardware configuration (need include by config.h) To use the NEW API, specify #define SERIAL_USE_MULTI_TRANSACTION - serial.c/serial.h -- serial communication lower layer - NEW APIs for serial.c / serial.h (The lower layer) // Soft Serial Transaction Descriptor typedef struct _SSTD_t { uint8_t *status; uint8_t initiator2target_buffer_size; uint8_t *initiator2target_buffer; uint8_t target2initiator_buffer_size; uint8_t *target2initiator_buffer; } SSTD_t; // initiator is transaction start side void soft_serial_initiator_init(SSTD_t *sstd_table); // target is interrupt accept side void soft_serial_target_init(SSTD_t *sstd_table); int soft_serial_transaction(int sstd_index); int soft_serial_get_and_clean_target_status(int sstd_index); - NEW APIs for split_scomm.c / split_scomm.h (The upper layer) move from old serial.c the following buffer and functions serial_slave_buffer[] serial_master_buffer[] void serial_master_init(void) void serial_slave_init(void) int serial_update_buffers(void) define SERIAL_xxxxx_BUFFER_LENGTH move from serial_config.h to split_scomm.h --- keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h b/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h index be2e7cb8b..b991b874b 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h +++ b/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h @@ -9,7 +9,7 @@ #define SERIAL_PIN_INTERRUPT INT2_vect #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 +#define SERIAL_MASTER_BUFFER_LENGTH 0 //// #error rev1/keymaps/OLED_sample serial config -- cgit v1.2.3 From 743449472e58651ec8111e6f70811103fb0a28bd Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 17 Sep 2018 10:48:02 -0700 Subject: Make `PREVENT_STUCK_MODIFIERS` the default (#3107) * Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps. --- keyboards/helix/rev1/keymaps/OLED_sample/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/config.h b/keyboards/helix/rev1/keymaps/OLED_sample/config.h index 0e1b787a5..5e8989d96 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/config.h +++ b/keyboards/helix/rev1/keymaps/OLED_sample/config.h @@ -35,7 +35,8 @@ along with this program. If not, see . #define SSD1306OLED -#define PREVENT_STUCK_MODIFIERS +#define USE_SERIAL_PD2 + #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 -- cgit v1.2.3 From 79bff502471d8fd534e9266954a184aa0f7d55c3 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Thu, 11 Oct 2018 04:53:18 +0900 Subject: Keymaps: Helix rgblight mode update (#4091) * Helix each keymap's using rgblight mode symbol instead magic number No change in build result. * Helix pico keymaps: make rgblight modes selectable. No change in build result. * Helix rev2 keymaps: make rgblight modes selectable. No change in build result. * fixed Helix froggy/keymap.c: invalid rgblight mode value 0 to 1 (=RGBLIGHT_MODE_STATIC_LIGHT) * Deselect RGB_TEST and ALTERNATING in Helix rev2,pico keymaps config.h. --- keyboards/helix/rev1/keymaps/OLED_sample/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c index fa51501e6..9b81979ff 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c +++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c @@ -368,7 +368,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false } else { TOG_STATUS = !TOG_STATUS; - rgblight_mode(16); + rgblight_mode(RGBLIGHT_MODE_SNAKE + 1); } layer_on(_LOWER); update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); @@ -387,7 +387,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false } else { TOG_STATUS = !TOG_STATUS; - rgblight_mode(15); + rgblight_mode(RGBLIGHT_MODE_SNAKE); } layer_on(_RAISE); update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); -- cgit v1.2.3 From 4665e4ffffcdfc6fe6f498928963adc64f6fefd7 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 23 Oct 2018 03:38:05 +0900 Subject: Keyboard: Helix serial.c, split_scom.c bug fix and update (#4191) * helix/serial.c add support PD1,PD3,PE6 and configuration simplify * Add comment about ATmega32U4 I2C * Add compile time check for ATmega32U4 I2C * change TAB code to 8 SPACE code * Helix serial.c PORTD,PD0 test. OK OK PD0 - PD1 OK PD2 - PD3 - PE6 * Helix serial.c PORTD,PD1 test. OK OK PD0 OK PD1 OK PD2 - PD3 - PE6 * Helix serial.c PORTD,PD3 test. OK OK PD0 OK PD1 OK PD2 OK PD3 - PE6 * Helix serial.c PORTE,PD6 test. OK OK PD0 OK PD1 OK PD2 OK PD3 OK PE6 * Helix serial.c: PD0,PD1,PD3,PE6 all test end * Helix serial.c: rename SOFT_SERIAL_PORT to SOFT_SERIAL_PIN * Helix serial.c add debug code * Helix serial.c: add transaction ID range check * Helix serial.c debug code update * Helix serial.c debug code update * Helix serial.c: Strict checking of the value of tid. * adjust the delay of serial.c * Helix serial.c: remove debug code * remove EXTRAFLAGS += -DCONSOLE_ENABLE from five_rows/rules.mk tmk_core/common.mk has >ifeq ($(strip $(CONSOLE_ENABLE)), yes) > TMK_COMMON_DEFS += -DCONSOLE_ENABLE * Fix error handling in split_scomm.c * add some comment to serial.c * add some comment about SELECT_SOFT_SERIAL_SPEED --- keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h b/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h index b991b874b..f56951e70 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h +++ b/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h @@ -1,16 +1,9 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H +//// #error rev1/keymaps/OLED_sample serial config +#ifndef SOFT_SERIAL_PIN /* Soft Serial defines */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect +#define SOFT_SERIAL_PIN D2 #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 #define SERIAL_MASTER_BUFFER_LENGTH 0 - -//// #error rev1/keymaps/OLED_sample serial config - -#endif /* SOFT_SERIAL_CONFIG_H */ +#endif -- cgit v1.2.3 From 00b6f14821f44ead75504e28d7fed26791cb2875 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Oct 2018 08:57:37 -0700 Subject: Replace outdated RGB/Audio information --- keyboards/helix/rev1/keymaps/OLED_sample/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk index 3f8fd5dc6..c56d6f37e 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk +++ b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk @@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -- cgit v1.2.3 From 4099536c0e7a099b181a80e483b4b95f389b5a7e Mon Sep 17 00:00:00 2001 From: ishtob Date: Tue, 4 Dec 2018 11:04:57 -0500 Subject: adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice --- keyboards/helix/rev1/keymaps/OLED_sample/rules.mk | 25 ----------------------- 1 file changed, 25 deletions(-) delete mode 100644 keyboards/helix/rev1/keymaps/OLED_sample/rules.mk (limited to 'keyboards/helix/rev1/keymaps') diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk deleted file mode 100644 index c56d6f37e..000000000 --- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif -- cgit v1.2.3