summaryrefslogtreecommitdiff
path: root/keyboards/handwired/tractyl_manuform/5x6_right/f411
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-12-14 20:53:36 -0800
committerGitHub <noreply@github.com>2021-12-14 20:53:36 -0800
commit3fa592a4024a24a636fa0c562e6761667a94f565 (patch)
tree4ce826128e29e36dfe606fa2b5a3d25b3bd0afcc /keyboards/handwired/tractyl_manuform/5x6_right/f411
parentc10bc9f91e737dd3675b2e4492daa09092655af9 (diff)
[Keymap] Unicode and Pointing Device and Autocorect for drashna keymaps (#15415)
Diffstat (limited to 'keyboards/handwired/tractyl_manuform/5x6_right/f411')
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c29
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md5
2 files changed, 31 insertions, 3 deletions
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
index 700b0685f2..5cd269e311 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c
@@ -16,7 +16,7 @@
#include "f411.h"
-void matrix_init_sub_kb(void) { setPinInputHigh(A0); }
+void keyboard_pre_init_sub(void) { setPinInputHigh(A0); }
void matrix_scan_sub_kb(void) {
if (!readPin(A0)) {
@@ -24,6 +24,33 @@ void matrix_scan_sub_kb(void) {
}
}
+void bootmagic_lite(void) {
+ // We need multiple scans because debouncing can't be turned off.
+ matrix_scan();
+#if defined(DEBOUNCE) && DEBOUNCE > 0
+ wait_ms(DEBOUNCE * 2);
+#else
+ wait_ms(30);
+#endif
+ matrix_scan();
+
+ uint8_t row = BOOTMAGIC_LITE_ROW;
+ uint8_t col = BOOTMAGIC_LITE_COLUMN;
+
+#if defined(SPLIT_KEYBOARD) && defined(BOOTMAGIC_LITE_ROW_RIGHT) && defined(BOOTMAGIC_LITE_COLUMN_RIGHT)
+ if (!is_keyboard_left()) {
+ row = BOOTMAGIC_LITE_ROW_RIGHT;
+ col = BOOTMAGIC_LITE_COLUMN_RIGHT;
+ }
+#endif
+
+ if (matrix_get_row(row) & (1 << col) || !readPin(A0)) {
+ eeconfig_disable();
+ bootloader_jump();
+ }
+}
+
+
#ifdef USB_VBUS_PIN
bool usb_vbus_state(void) {
setPinInputLow(USB_VBUS_PIN);
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md b/keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md
index b387435122..f732295ba3 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md
@@ -1,7 +1,7 @@
# Drashna's Blackpill Tractyl Manuform (5x6) with a right side trackball
* System Timer on TIM5
-* ~~VBUS mod, using PB10~~ (*doesn't seem to work for me*)
+* VBUS mod, using PB10 -- does work, but not on my tractyl... bad soldering probably
* Split Hand Pin, using PC14
* Full Duplex Serial/USART using PA2 and PA3 on USART2
* PWM Audio using PB1 and TIM3 and GPT on TIM4
@@ -12,7 +12,8 @@
* SSD1306 OLED display (128x64) using PB8-PB9 on I2C1
* Pull-up resistor (22k) on PA10 to fix reset issue.
* Pull-up resistor (5.1k) on PA1 for WS2812 LED support, and wire it's VCC to the 5V pin.
-* Pins PA9, PA11, A12 are not useable because they're used for USB connection, and can't be shared.
+* Pins PA9 is meant for VBUS sense, and has an internal pulldown resistor. A 5.1k pullup resistor can work (but should be avoided)
+* Pins PA11 and A12 are not useable because they're used for USB connection, and can't be shared.
* Pin PB2 is used by BOOT1, and is unusable
## Keyboard Info