From 715fbf209ec0c11203ec3e2eb8eaba2fb8acf267 Mon Sep 17 00:00:00 2001 From: htx_studio Date: Wed, 30 Apr 2025 19:47:42 +0800 Subject: [PATCH 1/7] =?UTF-8?q?htx=5Fstudio=5Fkeyboard=E5=9B=BA=E4=BB=B6?= =?UTF-8?q?=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../htx_studio/one_handed_keyboard_ml/adns.c | 254 ++ .../htx_studio/one_handed_keyboard_ml/adns.h | 38 + .../one_handed_keyboard_ml/adns9800_srom_A6.h | 3081 +++++++++++++++++ .../one_handed_keyboard_ml/config.h | 23 + .../one_handed_keyboard_ml/halconf.h | 25 + .../one_handed_keyboard_ml/keyboard.json | 231 ++ .../keymaps/default/keymap.c | 63 + .../keymaps/default/rules.mk | 8 + .../one_handed_keyboard_ml/mcuconf.h | 26 + .../one_handed_keyboard_ml/readme.md | 29 + .../htx_studio/one_handed_keyboard_mr/adns.c | 254 ++ .../htx_studio/one_handed_keyboard_mr/adns.h | 38 + .../one_handed_keyboard_mr/adns9800_srom_A6.h | 3081 +++++++++++++++++ .../one_handed_keyboard_mr/config.h | 25 + .../one_handed_keyboard_mr/halconf.h | 25 + .../one_handed_keyboard_mr/keyboard.json | 232 ++ .../keymaps/default/keymap.c | 59 + .../keymaps/default/rules.mk | 8 + .../one_handed_keyboard_mr/mcuconf.h | 27 + .../one_handed_keyboard_mr/readme.md | 29 + .../htx_studio/one_handed_keyboard_sl/adns.c | 254 ++ .../htx_studio/one_handed_keyboard_sl/adns.h | 38 + .../one_handed_keyboard_sl/adns9800_srom_A6.h | 3081 +++++++++++++++++ .../one_handed_keyboard_sl/config.h | 13 + .../one_handed_keyboard_sl/halconf.h | 24 + .../one_handed_keyboard_sl/keyboard.json | 112 + .../keymaps/default/keymap.c | 43 + .../keymaps/default/rules.mk | 5 + .../one_handed_keyboard_sl/mcuconf.h | 23 + .../one_handed_keyboard_sl/readme.md | 29 + 30 files changed, 11178 insertions(+) create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/config.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/halconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/readme.md create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/config.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/halconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/readme.md create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/config.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/halconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/readme.md diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns.c b/keyboards/htx_studio/one_handed_keyboard_ml/adns.c new file mode 100644 index 00000000000..52f488a47fd --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/adns.c @@ -0,0 +1,254 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#include "spi_master.h" +#include "adns.h" +#include "debug.h" +#include "wait.h" +#include "pointing_device.h" +#include "adns9800_srom_A6.h" + +// registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Pixel_Sum 0x08 +#define REG_Maximum_Pixel 0x09 +#define REG_Minimum_Pixel 0x0a +#define REG_Shutter_Lower 0x0b +#define REG_Shutter_Upper 0x0c +#define REG_Frame_Period_Lower 0x0d +#define REG_Frame_Period_Upper 0x0e +#define REG_Configuration_I 0x0f +#define REG_Configuration_II 0x10 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate 0x15 +#define REG_Rest1_Downshift 0x16 +#define REG_Rest2_Rate 0x17 +#define REG_Rest2_Downshift 0x18 +#define REG_Rest3_Rate 0x19 +#define REG_Frame_Period_Max_Bound_Lower 0x1a +#define REG_Frame_Period_Max_Bound_Upper 0x1b +#define REG_Frame_Period_Min_Bound_Lower 0x1c +#define REG_Frame_Period_Min_Bound_Upper 0x1d +#define REG_Shutter_Max_Bound_Lower 0x1e +#define REG_Shutter_Max_Bound_Upper 0x1f +#define REG_LASER_CTRL0 0x20 +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_SROM_ID 0x2a +#define REG_Lift_Detection_Thr 0x2e +#define REG_Configuration_V 0x2f +#define REG_Configuration_IV 0x39 +#define REG_Power_Up_Reset 0x3a +#define REG_Shutdown 0x3b +#define REG_Inverse_Product_ID 0x3f +#define REG_Motion_Burst 0x50 +#define REG_SROM_Load_Burst 0x62 +#define REG_Pixel_Burst 0x64 + +// pins +#define NCS A4 + +extern const uint16_t firmware_length; +extern const uint8_t firmware_data[]; + +enum motion_burst_propertr{ + motion = 0, + observation, + delta_x_l, + delta_x_h, + delta_y_l, + delta_y_h, + squal, + pixel_sum, + maximum_pixel, + minimum_pixel, + shutter_upper, + shutter_lower, + frame_period_upper, + frame_period_lower, + end_data +}; + +void adns_begin(void){ + spi_start(NCS, false, 3, 8); +} + +void adns_end(void){ + spi_stop(); +} + +void adns_write(uint8_t reg_addr, uint8_t data){ + + adns_begin(); + //send address of the register, with MSBit = 1 to indicate it's a write + spi_write(reg_addr | 0x80 ); + spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + adns_end(); +} + +uint8_t adns_read(uint8_t reg_addr){ + + + adns_begin(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f ); + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + adns_end(); + return data; +} + +void pointing_device_init(void) { + dprint("STARTING INTI\n"); + + spi_init(); + // reset serial port + adns_begin(); + adns_end(); + + // reboot + adns_write(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + // read registers and discard + adns_read(REG_Motion); + adns_read(REG_Delta_X_L); + adns_read(REG_Delta_X_H); + adns_read(REG_Delta_Y_L); + adns_read(REG_Delta_Y_H); + + // upload firmware + + // set the configuration_IV register in 3k firmware mode + // bit 1 = 1 for 3k mode, other bits are reserved + adns_write(REG_Configuration_V, 0x02); + + // write 0x1d in SROM_enable reg for initializing + adns_write(REG_SROM_Enable, 0x1d); + + // wait for more than one frame period + // assume that the frame rate is as low as 100fps... even if it should never be that low + wait_ms(10); + + // write 0x18 to SROM_enable to start SROM download + adns_write(REG_SROM_Enable, 0x18); + + // write the SROM file (=firmware data) + + // write burst destination adress + adns_begin(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + // send all bytes of the firmware + unsigned char c; + for(int i = 0; i < firmware_length; i++){ + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + + adns_end(); + wait_ms(10); + + // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) + // reading the actual value of the register is important because the real + // default value is different from what is said in the datasheet, and if you + // change the reserved bytes (like by writing 0x00...) it would not work. + uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); + adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); + + wait_ms(1); + + // set the configuration_I register to set the CPI + // 0x01 = 50, minimum + // 0x44 = 3400, default + // 0x8e = 7100 + // 0xA4 = 8200, maximum + adns_write(REG_Configuration_I, 0x1A); + + wait_ms(100); + dprint("INIT ENDED\n"); +} + +int16_t convertDeltaToInt(uint8_t high, uint8_t low){ + + // join bytes into twos compliment + //int16_t twos_comp = (high << 8) | low; + //return twos_comp; + return (high << 8) | low; +} + +motion_delta_t readSensor(void) { + adns_begin(); + + // read from Motion_Burst to enable burt mode + spi_write(REG_Motion_Burst & 0x7f); + + // Wait one frame per docs, thanks u/kbjunky + wait_us(100); + uint8_t burst_data[pixel_sum]; + + for (int i = 0; i < pixel_sum; ++i) { + burst_data[i] = spi_read(); + } + + uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); + uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); + // Only consider the MSB for motion as this byte has other status bits + uint8_t motion_ind = burst_data[motion] & 0b10000000; + adns_end(); + + motion_delta_t delta = {delta_x, delta_y, motion_ind}; + return delta; +} + +bool pointing_device_task(void) { + motion_delta_t delta = readSensor(); + + report_mouse_t report = pointing_device_get_report(); + + if(delta.motion_ind) { + // clamp deltas from -127 to 127 + report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; + report.x = -report.x; + report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; + } + + pointing_device_set_report(report); + return pointing_device_send(); +} diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns.h b/keyboards/htx_studio/one_handed_keyboard_ml/adns.h new file mode 100644 index 00000000000..e557aeb2ece --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/adns.h @@ -0,0 +1,38 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#pragma once + +#include + +void adns_begin(void); + +void adns_end(void); + +void adns_write(uint8_t reg_addr, uint8_t data); + +uint8_t adns_read(uint8_t reg_addr); + + +int16_t convertDeltaToInt(uint8_t high, uint8_t low); + +struct _motion_delta { + int16_t delta_x; + int16_t delta_y; + int8_t motion_ind; +}; +typedef struct _motion_delta motion_delta_t; + +motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h new file mode 100644 index 00000000000..fddf30589d4 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h @@ -0,0 +1,3081 @@ +// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. +// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk + +#pragma once + +#include "progmem.h" + +const uint16_t firmware_length = 3070; + +const uint8_t firmware_data[] PROGMEM = { + 0x03, +0xa6, +0x68, +0x1e, +0x7d, +0x10, +0x7e, +0x7e, +0x5f, +0x1c, +0xb8, +0xf2, +0x47, +0x0c, +0x7b, +0x74, +0x4b, +0x14, +0x8b, +0x75, +0x66, +0x51, +0x0b, +0x8c, +0x76, +0x74, +0x4b, +0x14, +0xaa, +0xd6, +0x0f, +0x9c, +0xba, +0xf6, +0x6e, +0x3f, +0xdd, +0x38, +0xd5, +0x02, +0x80, +0x9b, +0x82, +0x6d, +0x58, +0x13, +0xa4, +0xab, +0xb5, +0xc9, +0x10, +0xa2, +0xc6, +0x0a, +0x7f, +0x5d, +0x19, +0x91, +0xa0, +0xa3, +0xce, +0xeb, +0x3e, +0xc9, +0xf1, +0x60, +0x42, +0xe7, +0x4c, +0xfb, +0x74, +0x6a, +0x56, +0x2e, +0xbf, +0xdd, +0x38, +0xd3, +0x05, +0x88, +0x92, +0xa6, +0xce, +0xff, +0x5d, +0x38, +0xd1, +0xcf, +0xef, +0x58, +0xcb, +0x65, +0x48, +0xf0, +0x35, +0x85, +0xa9, +0xb2, +0x8f, +0x5e, +0xf3, +0x80, +0x94, +0x97, +0x7e, +0x75, +0x97, +0x87, +0x73, +0x13, +0xb0, +0x8a, +0x69, +0xd4, +0x0a, +0xde, +0xc1, +0x79, +0x59, +0x36, +0xdb, +0x9d, +0xd6, +0xb8, +0x15, +0x6f, +0xce, +0x3c, +0x72, +0x32, +0x45, +0x88, +0xdf, +0x6c, +0xa5, +0x6d, +0xe8, +0x76, +0x96, +0x14, +0x74, +0x20, +0xdc, +0xf4, +0xfa, +0x37, +0x6a, +0x27, +0x32, +0xe3, +0x29, +0xbf, +0xc4, +0xc7, +0x06, +0x9d, +0x58, +0xe7, +0x87, +0x7c, +0x2e, +0x9f, +0x6e, +0x49, +0x07, +0x5d, +0x23, +0x64, +0x54, +0x83, +0x6e, +0xcb, +0xb7, +0x77, +0xf7, +0x2b, +0x6e, +0x0f, +0x2e, +0x66, +0x12, +0x60, +0x55, +0x65, +0xfc, +0x43, +0xb3, +0x58, +0x73, +0x5b, +0xe8, +0x67, +0x04, +0x43, +0x02, +0xde, +0xb3, +0x89, +0xa0, +0x6d, +0x3a, +0x27, +0x79, +0x64, +0x5b, +0x0c, +0x16, +0x9e, +0x66, +0xb1, +0x8b, +0x87, +0x0c, +0x5d, +0xf2, +0xb6, +0x3d, +0x71, +0xdf, +0x42, +0x03, +0x8a, +0x06, +0x8d, +0xef, +0x1d, +0xa8, +0x96, +0x5c, +0xed, +0x31, +0x61, +0x5c, +0xa1, +0x34, +0xf6, +0x8c, +0x08, +0x60, +0x33, +0x07, +0x00, +0x3e, +0x79, +0x95, +0x1b, +0x43, +0x7f, +0xfe, +0xb6, +0xa6, +0xd4, +0x9d, +0x76, +0x72, +0xbf, +0xad, +0xc0, +0x15, +0xe8, +0x37, +0x31, +0xa3, +0x72, +0x63, +0x52, +0x1d, +0x1c, +0x5d, +0x51, +0x1b, +0xe1, +0xa9, +0xed, +0x60, +0x32, +0x3e, +0xa9, +0x50, +0x28, +0x53, +0x06, +0x59, +0xe2, +0xfc, +0xe7, +0x02, +0x64, +0x39, +0x21, +0x56, +0x4a, +0xa5, +0x40, +0x80, +0x81, +0xd5, +0x5a, +0x60, +0x7b, +0x68, +0x84, +0xf1, +0xe0, +0xb1, +0xb6, +0x5b, +0xdf, +0xa8, +0x1d, +0x6d, +0x65, +0x20, +0xc0, +0xa2, +0xb9, +0xd9, +0xbb, +0x00, +0xa6, +0xdb, +0x8b, +0x01, +0x53, +0x91, +0xfe, +0xc4, +0x51, +0x85, +0xb0, +0x96, +0x7f, +0xfd, +0x51, +0xdd, +0x14, +0x03, +0x67, +0x2e, +0x75, +0x1c, +0x76, +0xd3, +0x6e, +0xdd, +0x99, +0x55, +0x76, +0xe5, +0xab, +0x23, +0xfc, +0x4a, +0xd5, +0xc6, +0xe8, +0x2e, +0xca, +0x8a, +0xb3, +0xf6, +0x8c, +0x6c, +0xb0, +0xe9, +0xf2, +0xe7, +0x9e, +0x69, +0x41, +0xed, +0xf1, +0x6d, +0xd2, +0x86, +0xd8, +0x7e, +0xcb, +0x5d, +0x47, +0x6c, +0x85, +0x6a, +0x23, +0xed, +0x20, +0x40, +0x93, +0xb4, +0x20, +0xc7, +0xa5, +0xc9, +0xaf, +0x03, +0x15, +0xac, +0x19, +0xe5, +0x2a, +0x36, +0xdf, +0x6d, +0xc5, +0x8c, +0x80, +0x07, +0xce, +0x92, +0x0c, +0xd8, +0x06, +0x62, +0x0f, +0xdd, +0x48, +0x46, +0x1a, +0x53, +0xc7, +0x8a, +0x8c, +0x5d, +0x5d, +0xb4, +0xa1, +0x02, +0xd3, +0xa9, +0xb8, +0xf3, +0x94, +0x8f, +0x3f, +0xe5, +0x54, +0xd4, +0x11, +0x65, +0xb2, +0x5e, +0x09, +0x0b, +0x81, +0xe3, +0x75, +0xa7, +0x89, +0x81, +0x39, +0x6c, +0x46, +0xf6, +0x06, +0x9f, +0x27, +0x3b, +0xb6, +0x2d, +0x5f, +0x1d, +0x4b, +0xd4, +0x7b, +0x1d, +0x61, +0x74, +0x89, +0xe4, +0xe3, +0xbd, +0x98, +0x1b, +0xc4, +0x51, +0x3b, +0xa4, +0xfa, +0xe0, +0x92, +0xf7, +0xbe, +0xf2, +0x4d, +0xbb, +0xff, +0xad, +0x4f, +0x6d, +0x68, +0xc2, +0x79, +0x40, +0xaa, +0x9b, +0x8f, +0x0c, +0x32, +0x4b, +0x5f, +0x3e, +0xab, +0x59, +0x98, +0xb3, +0xf5, +0x1d, +0xac, +0x5e, +0xbc, +0x78, +0xd3, +0x01, +0x6c, +0x64, +0x15, +0x2f, +0xd8, +0x71, +0xa6, +0x2d, +0x45, +0xe1, +0x22, +0x42, +0xe4, +0x4e, +0x04, +0x3c, +0x7d, +0xf4, +0x40, +0x21, +0xb4, +0x67, +0x05, +0xa8, +0xe2, +0xf3, +0x72, +0x87, +0x4c, +0x7d, +0xd9, +0x1b, +0x65, +0x97, +0xf3, +0xc2, +0xe3, +0xe4, +0xc8, +0xd2, +0xde, +0xf6, +0xef, +0xdc, +0xbb, +0x44, +0x08, +0x5e, +0xe2, +0x45, +0x27, +0x01, +0xb0, +0xf6, +0x43, +0xe7, +0x3a, +0xf6, +0xdc, +0x9d, +0xed, +0xf3, +0xc5, +0x0c, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x36, +0xee, +0x96, +0x72, +0x67, +0xe7, +0x81, +0x91, +0xd5, +0x05, +0x0a, +0xe0, +0x82, +0xd5, +0x8f, +0xe8, +0xf9, +0xb0, +0xc9, +0xcf, +0x93, +0xe7, +0x04, +0xc5, +0xbc, +0x2b, +0x43, +0x56, +0x7e, +0xe8, +0x67, +0x7c, +0xe5, +0xfb, +0x49, +0xad, +0x5e, +0x9f, +0x25, +0x13, +0xde, +0x6e, +0x6e, +0xe9, +0xf1, +0xec, +0x87, +0x0b, +0x59, +0x81, +0x76, +0x84, +0x76, +0xb3, +0x24, +0xaf, +0x30, +0xfd, +0x27, +0x8b, +0xab, +0xd8, +0x00, +0x8b, +0x9b, +0x0c, +0xd2, +0xb2, +0x4e, +0x5e, +0x9d, +0x1d, +0x96, +0x01, +0x00, +0x67, +0xc1, +0x5f, +0x02, +0x20, +0xfd, +0x45, +0x6a, +0x01, +0x60, +0x58, +0x45, +0xca, +0x47, +0x21, +0x90, +0x5a, +0xc4, +0x43, +0x26, +0x1a, +0xd7, +0xa5, +0x4a, +0xb2, +0x5d, +0x2b, +0x35, +0x49, +0xfb, +0xa5, +0x17, +0x92, +0x21, +0x1e, +0x93, +0x96, +0x67, +0xa2, +0x7e, +0x36, +0x7a, +0xde, +0x5f, +0xbe, +0x7a, +0x58, +0x9d, +0xf8, +0x78, +0xa3, +0xfa, +0xc8, +0xd5, +0x17, +0xf0, +0x21, +0x97, +0x8c, +0x80, +0xb5, +0x4b, +0x3b, +0xbd, +0xbb, +0x41, +0x21, +0xa8, +0x50, +0x67, +0xf7, +0xe7, +0x19, +0x80, +0x10, +0x8e, +0xce, +0x04, +0x18, +0x3f, +0x51, +0x6b, +0x77, +0xd8, +0x9e, +0x16, +0xaf, +0xec, +0xef, +0x48, +0x16, +0x4d, +0x9e, +0x85, +0x38, +0x18, +0x3e, +0xd4, +0x28, +0x87, +0x60, +0x2a, +0xf6, +0x7f, +0x09, +0x86, +0x6f, +0x9c, +0x3c, +0x3a, +0xff, +0xab, +0xd0, +0x61, +0xa2, +0x97, +0x0d, +0x71, +0x94, +0x7e, +0xfd, +0xb9, +0x80, +0x02, +0x89, +0x6a, +0xb3, +0x84, +0x6c, +0x2a, +0x77, +0x62, +0xbe, +0x0b, +0xf4, +0xaf, +0xac, +0x7b, +0x7c, +0x8e, +0xca, +0x01, +0xba, +0x71, +0x78, +0x94, +0xfd, +0xb5, +0x39, +0xa4, +0x4d, +0x2f, +0x78, +0xcf, +0xca, +0x92, +0x0c, +0x1a, +0x99, +0x48, +0x4c, +0x11, +0x96, +0xb5, +0x4e, +0x41, +0x28, +0xe4, +0xa6, +0xfe, +0x4b, +0x72, +0x91, +0xe7, +0xd4, +0xdd, +0x9f, +0x12, +0xe6, +0x29, +0x38, +0xce, +0x45, +0xae, +0x02, +0xb8, +0x24, +0xae, +0xbd, +0xe9, +0x66, +0x08, +0x62, +0xa2, +0x2c, +0x2b, +0x00, +0xe2, +0x23, +0xd9, +0xc4, +0x48, +0xe4, +0xd3, +0xac, +0xbb, +0x34, +0xc7, +0xf0, +0xe3, +0x4f, +0xb9, +0x30, +0xea, +0xa2, +0x12, +0xf1, +0x30, +0x2c, +0x36, +0xde, +0x48, +0xf2, +0xb0, +0x4c, +0x43, +0x3f, +0x2e, +0x58, +0xe4, +0x20, +0xe3, +0x58, +0xcd, +0x31, +0x22, +0xf0, +0xa2, +0x2a, +0xe6, +0x19, +0x90, +0x55, +0x86, +0xf6, +0x55, +0x79, +0xd1, +0xd7, +0x46, +0x2f, +0xc0, +0xdc, +0x99, +0xe8, +0xf3, +0x6a, +0xdf, +0x7f, +0xeb, +0x24, +0x4a, +0x1e, +0x5a, +0x75, +0xde, +0x2f, +0x5c, +0x19, +0x61, +0x03, +0x53, +0x54, +0x6a, +0x3b, +0x18, +0x70, +0xb6, +0x4f, +0xf1, +0x9c, +0x0a, +0x59, +0x9d, +0x19, +0x92, +0x65, +0x8c, +0x83, +0x14, +0x2d, +0x44, +0x8a, +0x75, +0xa9, +0xf5, +0x90, +0xd2, +0x66, +0x4e, +0xfa, +0x69, +0x0f, +0x5b, +0x0b, +0x98, +0x65, +0xc8, +0x11, +0x42, +0x59, +0x7f, +0xdd, +0x1b, +0x75, +0x17, +0x31, +0x4c, +0x75, +0x58, +0xeb, +0x58, +0x63, +0x7d, +0xf2, +0xa6, +0xc2, +0x6e, +0xb7, +0x3f, +0x3e, +0x5e, +0x47, +0xad, +0xb7, +0x04, +0xe8, +0x05, +0xf8, +0xb2, +0xcf, +0x19, +0xf3, +0xd2, +0x85, +0xfe, +0x3e, +0x3e, +0xb1, +0x62, +0x08, +0x2c, +0x10, +0x07, +0x0d, +0x73, +0x90, +0x17, +0xfa, +0x9b, +0x56, +0x02, +0x75, +0xf9, +0x51, +0xe0, +0xe9, +0x1a, +0x7b, +0x9f, +0xb3, +0xf3, +0x98, +0xb8, +0x1c, +0x9c, +0xe1, +0xd5, +0x35, +0xae, +0xc8, +0x60, +0x48, +0x11, +0x09, +0x94, +0x6b, +0xd0, +0x8b, +0x15, +0xbc, +0x05, +0x68, +0xd3, +0x54, +0x8a, +0x51, +0x39, +0x5c, +0x42, +0x76, +0xce, +0xd8, +0xad, +0x89, +0x30, +0xc9, +0x05, +0x1c, +0xcc, +0x94, +0x3f, +0x0f, +0x90, +0x6f, +0x72, +0x2d, +0x85, +0x64, +0x9a, +0xb9, +0x23, +0xf9, +0x0b, +0xc3, +0x7c, +0x39, +0x0f, +0x97, +0x07, +0x97, +0xda, +0x58, +0x48, +0x33, +0x05, +0x23, +0xb8, +0x82, +0xe8, +0xd3, +0x53, +0x89, +0xaf, +0x33, +0x80, +0x22, +0x84, +0x0c, +0x95, +0x5c, +0x67, +0xb8, +0x77, +0x0c, +0x5c, +0xa2, +0x5f, +0x3d, +0x58, +0x0f, +0x27, +0xf3, +0x2f, +0xae, +0x48, +0xbd, +0x0b, +0x6f, +0x54, +0xfb, +0x67, +0x4c, +0xea, +0x32, +0x27, +0xf1, +0xfa, +0xe2, +0xb0, +0xec, +0x0b, +0x15, +0xb4, +0x70, +0xf6, +0x5c, +0xdd, +0x71, +0x60, +0xc3, +0xc1, +0xa8, +0x32, +0x65, +0xac, +0x7a, +0x77, +0x41, +0xe5, +0xa9, +0x6b, +0x11, +0x81, +0xfa, +0x34, +0x8d, +0xfb, +0xc1, +0x80, +0x6e, +0xc4, +0x60, +0x30, +0x07, +0xd4, +0x8b, +0x67, +0xbd, +0xaa, +0x8c, +0x9c, +0x64, +0xac, +0xdb, +0x0b, +0x24, +0x8b, +0x63, +0x6f, +0xe6, +0xbc, +0xe7, +0x33, +0xa4, +0x4a, +0x4c, +0xa7, +0x9f, +0x43, +0x53, +0xd2, +0xbb, +0x8f, +0x43, +0xc7, +0x3d, +0x78, +0x68, +0x3f, +0xa5, +0x3d, +0xca, +0x69, +0x84, +0xa6, +0x97, +0x2d, +0xc0, +0x7d, +0x31, +0x34, +0x55, +0x1d, +0x07, +0xb1, +0x5f, +0x40, +0x5c, +0x93, +0xb0, +0xbc, +0x7c, +0xb0, +0xbc, +0xe7, +0x12, +0xee, +0x6b, +0x2b, +0xd3, +0x4d, +0x67, +0x70, +0x3a, +0x9a, +0xf2, +0x3c, +0x7c, +0x81, +0xfa, +0xd7, +0xd9, +0x90, +0x91, +0x81, +0xb8, +0xb1, +0xf3, +0x48, +0x6a, +0x26, +0x4f, +0x0c, +0xce, +0xb0, +0x9e, +0xfd, +0x4a, +0x3a, +0xaf, +0xac, +0x5b, +0x3f, +0xbf, +0x44, +0x5a, +0xa3, +0x19, +0x1e, +0x4b, +0xe7, +0x36, +0x6a, +0xd7, +0x20, +0xae, +0xd7, +0x7d, +0x3b, +0xe7, +0xff, +0x3a, +0x86, +0x2e, +0xd0, +0x4a, +0x3e, +0xaf, +0x9f, +0x8e, +0x01, +0xbf, +0xf8, +0x4f, +0xc1, +0xe8, +0x6f, +0x74, +0xe1, +0x45, +0xd3, +0xf7, +0x04, +0x6a, +0x4b, +0x9d, +0xec, +0x33, +0x27, +0x76, +0xd7, +0xc5, +0xe1, +0xb0, +0x3b, +0x0e, +0x23, +0xec, +0xf0, +0x86, +0xd2, +0x1a, +0xbf, +0x3d, +0x04, +0x62, +0xb3, +0x6c, +0xb2, +0xeb, +0x17, +0x05, +0xa6, +0x0a, +0x8a, +0x7e, +0x83, +0x1c, +0xb6, +0x37, +0x09, +0xc6, +0x0b, +0x70, +0x3c, +0xb5, +0x93, +0x81, +0xd8, +0x93, +0xa0, +0x5f, +0x1e, +0x08, +0xe2, +0xc6, +0xe5, +0xc9, +0x72, +0xf1, +0xf1, +0xc1, +0xed, +0xd5, +0x58, +0x93, +0x83, +0xf8, +0x65, +0x67, +0x2e, +0x0d, +0xa9, +0xf1, +0x64, +0x12, +0xe6, +0x4c, +0xea, +0x15, +0x3f, +0x8c, +0x1a, +0xb6, +0xbf, +0xf6, +0xb9, +0x52, +0x35, +0x09, +0xb0, +0xe6, +0xf7, +0xcd, +0xf1, +0xa5, +0xaa, +0x81, +0xd1, +0x81, +0x6f, +0xb4, +0xa9, +0x66, +0x1f, +0xfc, +0x48, +0xc0, +0xb6, +0xd1, +0x8b, +0x06, +0x2f, +0xf6, +0xef, +0x1f, +0x0a, +0xe6, +0xce, +0x3a, +0x4a, +0x55, +0xbf, +0x6d, +0xf9, +0x4d, +0xd4, +0x08, +0x45, +0x4b, +0xc3, +0x66, +0x19, +0x92, +0x10, +0xe1, +0x17, +0x8e, +0x28, +0x91, +0x16, +0xbf, +0x3c, +0xee, +0xa3, +0xa6, +0x99, +0x92, +0x10, +0xe1, +0xf6, +0xcc, +0xac, +0xb8, +0x65, +0x0b, +0x43, +0x66, +0xf8, +0xe3, +0xe5, +0x3f, +0x24, +0x89, +0x47, +0x5d, +0x78, +0x43, +0xd0, +0x61, +0x17, +0xbd, +0x5b, +0x64, +0x54, +0x08, +0x45, +0x59, +0x93, +0xf6, +0x95, +0x8a, +0x41, +0x51, +0x62, +0x4b, +0x51, +0x02, +0x30, +0x73, +0xc7, +0x87, +0xc5, +0x4b, +0xa2, +0x97, +0x0f, +0xe8, +0x46, +0x5f, +0x7e, +0x2a, +0xe1, +0x30, +0x20, +0xb0, +0xfa, +0xe7, +0xce, +0x61, +0x42, +0x57, +0x6e, +0x21, +0xf3, +0x7a, +0xec, +0xe3, +0x25, +0xc7, +0x25, +0xf3, +0x67, +0xa7, +0x57, +0x40, +0x00, +0x02, +0xcf, +0x1c, +0x80, +0x77, +0x67, +0xbd, +0x70, +0xa1, +0x19, +0x92, +0x31, +0x75, +0x93, +0x27, +0x27, +0xb6, +0x82, +0xe4, +0xeb, +0x1d, +0x78, +0x48, +0xe7, +0xa5, +0x5e, +0x57, +0xef, +0x64, +0x28, +0x64, +0x1b, +0xf6, +0x11, +0xb2, +0x03, +0x9d, +0xb9, +0x18, +0x02, +0x27, +0xf7, +0xbe, +0x9d, +0x55, +0xfc, +0x00, +0xd2, +0xc7, +0xae, +0xad, +0x0b, +0xc5, +0xe9, +0x42, +0x41, +0x48, +0xd8, +0x32, +0xcf, +0xf6, +0x0f, +0xf5, +0xbc, +0x97, +0xc6, +0x99, +0x47, +0x76, +0xbd, +0x89, +0x06, +0x0f, +0x63, +0x0c, +0x51, +0xd4, +0x5e, +0xea, +0x48, +0xa8, +0xa2, +0x56, +0x1c, +0x79, +0x84, +0x86, +0x40, +0x88, +0x41, +0x76, +0x55, +0xfc, +0xc2, +0xd7, +0xfd, +0xc9, +0xc7, +0x80, +0x61, +0x35, +0xa7, +0x43, +0x20, +0xf7, +0xeb, +0x6c, +0x66, +0x13, +0xb0, +0xec, +0x02, +0x75, +0x3e, +0x4b, +0xaf, +0xb9, +0x5d, +0x40, +0xda, +0xd6, +0x6e, +0x2d, +0x39, +0x54, +0xc2, +0x95, +0x35, +0x54, +0x25, +0x72, +0xe1, +0x78, +0xb8, +0xeb, +0xc1, +0x16, +0x58, +0x0f, +0x9c, +0x9b, +0xb4, +0xea, +0x37, +0xec, +0x3b, +0x11, +0xba, +0xd5, +0x8a, +0xa9, +0xe3, +0x98, +0x00, +0x51, +0x1c, +0x14, +0xe0, +0x40, +0x96, +0xe5, +0xe9, +0xf2, +0x21, +0x22, +0xb1, +0x23, +0x60, +0x78, +0xd3, +0x17, +0xf8, +0x7a, +0xa5, +0xa8, +0xba, +0x20, +0xd3, +0x15, +0x1e, +0x32, +0xe4, +0x5e, +0x15, +0x48, +0xae, +0xa9, +0xe5, +0xb8, +0x33, +0xec, +0xe8, +0xa2, +0x42, +0xac, +0xbf, +0x10, +0x84, +0x53, +0x87, +0x19, +0xb4, +0x5f, +0x76, +0x4d, +0x01, +0x9d, +0x56, +0x74, +0xd9, +0x5c, +0x97, +0xe7, +0x88, +0xea, +0x3a, +0xbf, +0xdc, +0x4c, +0x33, +0x8a, +0x16, +0xb9, +0x5b, +0xfa, +0xd8, +0x42, +0xa7, +0xbb, +0x3c, +0x04, +0x27, +0x78, +0x49, +0x81, +0x2a, +0x5a, +0x7d, +0x7c, +0x23, +0xa8, +0xba, +0xf7, +0x9a, +0x9f, +0xd2, +0x66, +0x3e, +0x38, +0x3c, +0x75, +0xf9, +0xd1, +0x30, +0x26, +0x30, +0x6e, +0x5a, +0x6e, +0xdc, +0x6a, +0x69, +0x32, +0x50, +0x33, +0x47, +0x9e, +0xa4, +0xa8, +0x64, +0x66, +0xf0, +0x8a, +0xe4, +0xfd, +0x27, +0x6f, +0x51, +0x25, +0x8b, +0x43, +0x74, +0xc9, +0x8e, +0xbd, +0x88, +0x31, +0xbe, +0xec, +0x65, +0xd2, +0xcb, +0x8d, +0x5a, +0x13, +0x48, +0x16, +0x8c, +0x61, +0x0b, +0x11, +0xf6, +0xc6, +0x66, +0xae, +0xc3, +0xcc, +0x0c, +0xd2, +0xe1, +0x9f, +0x82, +0x41, +0x3f, +0x56, +0xf9, +0x73, +0xef, +0xdc, +0x30, +0x50, +0xcf, +0xb6, +0x7f, +0xbc, +0xd0, +0xb3, +0x10, +0xab, +0x24, +0xe4, +0xec, +0xad, +0x18, +0x8c, +0x39, +0x2d, +0x30, +0x4c, +0xc5, +0x40, +0x0d, +0xf6, +0xac, +0xd6, +0x18, +0x5d, +0x96, +0xbf, +0x5f, +0x71, +0x75, +0x96, +0x22, +0x97, +0x0f, +0x02, +0x94, +0x6e, +0xa6, +0xae, +0x6d, +0x8f, +0x1e, +0xca, +0x12, +0x9b, +0x2a, +0x1c, +0xce, +0xa9, +0xee, +0xfd, +0x12, +0x8e, +0xfc, +0xed, +0x09, +0x33, +0xba, +0xf4, +0x1a, +0x15, +0xf6, +0x9d, +0x87, +0x16, +0x43, +0x7c, +0x78, +0x57, +0xe1, +0x44, +0xc9, +0xeb, +0x1f, +0x58, +0x4d, +0xc1, +0x49, +0x11, +0x5c, +0xb2, +0x11, +0xa8, +0x55, +0x16, +0xf1, +0xc6, +0x50, +0xe9, +0x87, +0x89, +0xf6, +0xcf, +0xd8, +0x9c, +0x51, +0xa7, +0xbc, +0x5b, +0x31, +0x6d, +0x4d, +0x51, +0xd0, +0x4c, +0xbc, +0x0d, +0x58, +0x2d, +0x7b, +0x88, +0x7a, +0xf9, +0x8e, +0xd6, +0x40, +0x4d, +0xbb, +0xbe, +0xc4, +0xe5, +0x07, +0xfc, +0xd9, +0x7b, +0x6d, +0xa6, +0x42, +0x57, +0x8f, +0x02, +0x94, +0x4f, +0xe4, +0x2a, +0x65, +0xe2, +0x19, +0x5a, +0x50, +0xe1, +0x25, +0x65, +0x4a, +0x60, +0xc2, +0xcd, +0xa8, +0xec, +0x05, +0x2e, +0x87, +0x7b, +0x95, +0xb7, +0x4f, +0xa0, +0x0b, +0x1b, +0x4a, +0x7f, +0x92, +0xc8, +0x90, +0xee, +0x89, +0x1e, +0x10, +0xd2, +0x85, +0xe4, +0x9f, +0x63, +0xc8, +0x12, +0xbb, +0x4e, +0xb8, +0xcf, +0x0a, +0xec, +0x18, +0x4e, +0xe6, +0x7c, +0xb3, +0x33, +0x26, +0xc7, +0x1f, +0xd2, +0x04, +0x23, +0xea, +0x07, +0x0c, +0x5f, +0x90, +0xbd, +0xa7, +0x6a, +0x0f, +0x4a, +0xd6, +0x10, +0x01, +0x3c, +0x12, +0x29, +0x2e, +0x96, +0xc0, +0x4d, +0xbb, +0xbe, +0xe5, +0xa7, +0x83, +0xd5, +0x6a, +0x3c, +0xe3, +0x5b, +0xb8, +0xf2, +0x5c, +0x6d, +0x1f, +0xa6, +0xf3, +0x12, +0x24, +0xf6, +0xd6, +0x3b, +0x10, +0x14, +0x09, +0x07, +0x82, +0xe8, +0x30, +0x6a, +0x99, +0xdc, +0x95, +0x01, +0x9c, +0xd4, +0x68, +0x3b, +0xca, +0x98, +0x12, +0xab, +0x77, +0x25, +0x15, +0x7d, +0x10, +0x32, +0x45, +0x98, +0xcd, +0x7a, +0xdf, +0x71, +0x8a, +0x75, +0xc1, +0x1c, +0xd4, +0x68, +0x25, +0xeb, +0xbb, +0x54, +0x27, +0x6f, +0x2a, +0xf7, +0xb9, +0x98, +0x03, +0x27, +0xde, +0x24, +0xa8, +0xbb, +0x98, +0xc2, +0x84, +0xff, +0x9b, +0x51, +0xd8, +0x53, +0x50, +0xda, +0xf5, +0x88, +0xaa, +0x87, +0x2f, +0xae, +0xd6, +0xea, +0x6b, +0xde, +0xc8, +0xd7, +0xa7, +0x28, +0x65, +0x81, +0xe8, +0xb2, +0x3b, +0x1d, +0x4f, +0x75, +0x8f, +0x9f, +0x7a, +0x74, +0x8e, +0xc1, +0x5f, +0x9a, +0xa8, +0x9d, +0xfa, +0x03, +0xa3, +0x71, +0x9b, +0x37, +0x6d, +0xd5, +0x0b, +0xf5, +0xe1, +0xa1, +0x1b, +0x01, +0x6a, +0xc6, +0x67, +0xaa, +0xea, +0x2c, +0x9d, +0xa4, +0xd2, +0x6e, +0xfc, +0xde, +0x2e, +0x7f, +0x94, +0x69, +0xe5, +0x4a, +0xe0, +0x01, +0x48, +0x3c, +0x6b, +0xf7, +0x1e, +0xb6, +0x0b, +0x5f, +0xf9, +0x2e, +0x07, +0xc5, +0xe8, +0xae, +0x37, +0x1b, +0xbc, +0x3c, +0xd8, +0xd5, +0x0b, +0x91, +0x9e, +0x80, +0x24, +0xf5, +0x06, +0x0c, +0x0e, +0x98, +0x07, +0x96, +0x2d, +0x19, +0xdc, +0x58, +0x93, +0xcc, +0xfb, +0x4e, +0xeb, +0xbd, +0x0f, +0xf5, +0xaf, +0x01, +0xfa, +0xf1, +0x7c, +0x43, +0x8c, +0xb8, +0x56, +0x3e, +0xbe, +0x77, +0x4e, +0x2b, +0xf7, +0xbb, +0xb7, +0x45, +0x47, +0xcd, +0xcc, +0xa6, +0x4c, +0x72, +0x7b, +0x6a, +0x2a, +0x70, +0x13, +0x07, +0xfd, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x23, +0x67, +0x5b, +0x34, +0xd5, +0x14, +0x0c, +0xab, +0x77, +0x1f, +0xf8, +0x3d, +0x5a, +0x9f, +0x92, +0xb7, +0x2c, +0xad, +0x31, +0xde, +0x61, +0x07, +0xb3, +0x6b, +0xf7, +0x38, +0x15, +0x95, +0x46, +0x14, +0x48, +0x53, +0x69, +0x52, +0x66, +0x07, +0x6d, +0x83, +0x71, +0x8a, +0x67, +0x25, +0x20, +0x0f, +0xfe, +0xd7, +0x02, +0xd7, +0x6e, +0x2c, +0xd2, +0x1a, +0x0a, +0x5d, +0xfd, +0x0f, +0x74, +0xe3, +0xa4, +0x36, +0x07, +0x9a, +0xdf, +0xd4, +0x79, +0xbf, +0xef, +0x59, +0xc0, +0x44, +0x52, +0x87, +0x9a, +0x6e, +0x1d, +0x0e, +0xee, +0xde, +0x2e, +0x1a, +0xa9, +0x8f, +0x3a, +0xc9, +0xba, +0xec, +0x99, +0x78, +0x2d, +0x55, +0x6b, +0x14, +0xc2, +0x06, +0xd5, +0xfc, +0x93, +0x53, +0x4d, +0x11, +0x8c, +0xf8, +0xfa, +0x79, +0x7c, +0xa6, +0x64, +0xae, +0x61, +0xb8, +0x7b, +0x94, +0x56, +0xa6, +0x39, +0x78, +0x9a, +0xe5, +0xc7, +0xdf, +0x18, +0x63, +0x23, +0x9c, +0xfa, +0x66, +0xbb, +0xb7, +0x5a, +0x27, +0x4c, +0xd1, +0xa1, +0x83, +0x22, +0xb3, +0x52, +0x49, +0x35, +0xb0, +0x22, +0x83, +0x59, +0x12, +0x00, +0x16, +0x98, +0xdd, +0xad, +0xc2, +0x94, +0xf9, +0xd3, +0x7b, +0x64, +0x7f, +0x44, +0x3e, +0x3c, +0x8b, +0x9a, +0x83, +0x9c, +0x69, +0x6b, +0xe4, +0xdf, +0x9f, +0xed, +0x54, +0x1f, +0xe5, +0x5d, +0x7a, +0x05, +0x82, +0xb3, +0xdd, +0xef, +0xfc, +0x53, +0x96, +0xb0, +0x2c, +0x5a, +0xf8, +0xdf, +0x9c, +0x8b, +0x16, +0x4e, +0xdf, +0xda, +0x4d, +0x09, +0x09, +0x69, +0x50, +0x03, +0x65, +0xd8, +0x73, +0x70, +0xe8, +0x86, +0xbf, +0xbb, +0x35, +0xce, +0xb2, +0x46, +0xcb, +0x02, +0x00, +0x5b, +0xb4, +0xe2, +0xc6, +0x8f, +0x2f, +0x98, +0xaf, +0x87, +0x4b, +0x48, +0x45, +0xed, +0xcc, +0x1d, +0xe6, +0x58, +0xd6, +0xf2, +0x50, +0x25, +0x9f, +0x52, +0xc7, +0xcb, +0x8a, +0x17, +0x9d, +0x5b, +0xe5, +0xc8, +0xd7, +0x72, +0xb7, +0x52, +0xb2, +0xc4, +0x98, +0xe3, +0x7a, +0x17, +0x3e, +0xc6, +0x60, +0xa7, +0x97, +0xb0, +0xcf, +0x18, +0x81, +0x53, +0x84, +0x4c, +0xd5, +0x17, +0x32, +0x03, +0x13, +0x39, +0x51, +0x09, +0x10, +0xe3, +0x77, +0x49, +0x4f, +0x62, +0x01, +0xbf, +0x8c, +0x9a, +0xe0, +0x41, +0x9e, +0x89, +0x74, +0x36, +0xf9, +0x96, +0x86, +0x2e, +0x96, +0x1c, +0x4a, +0xb7, +0x2b, +0x4a, +0x97, +0xbc, +0x99, +0x40, +0xa3, +0xe0, +0x3d, +0xc8, +0xad, +0x2f, +0xdf, +0x4f, +0x2c, +0xc4, +0x69, +0x82, +0x9f, +0x9b, +0x81, +0x0c, +0x61, +0x5c, +0xa5, +0x9d, +0x8c, +0x89, +0xc0, +0x2c, +0xb4, +0x4a, +0x33, +0x4e, +0xeb, +0xa2, +0x56, +0x40, +0xc0, +0xc2, +0x46, +0xaf, +0x6a, +0xfc, +0x67, +0xd1, +0x80, +0x5e, +0xc5, +0x6d, +0x84, +0x43, +0x27, +0x3f, +0x55, +0x15, +0x96, +0x6a, +0xa0, +0xa5, +0xda, +0xb7, +0xff, +0xb7, +0x75, +0x6e, +0x4c, +0x49, +0x91, +0x9d, +0x22, +0xa3, +0x46, +0xea, +0xed, +0x9a, +0x00, +0xe2, +0x32, +0xc3, +0xd6, +0xa9, +0x71, +0x20, +0x55, +0xa3, +0x19, +0xed, +0xf8, +0x4f, +0xa7, +0x12, +0x9c, +0x66, +0x87, +0xaf, +0x4e, +0xb7, +0xf0, +0xdb, +0xbf, +0xef, +0xf0, +0xf6, +0xaf, +0xea, +0xda, +0x09, +0xfe, +0xde, +0x38, +0x5c, +0xa5, +0xa2, +0xdf, +0x99, +0x45, +0xa8, +0xe4, +0xe7, +0x92, +0xac, +0x67, +0xaa, +0x4f, +0xbf, +0x77, +0x3e, +0xa2, +0x40, +0x49, +0x22, +0x4a, +0x1e, +0x3b, +0xaa, +0x70, +0x7f, +0x95, +0xaf, +0x37, +0x4b, +0xfc, +0x99, +0xe2, +0xe0, +0xba, +0xd7, +0x34, +0xce, +0x55, +0x88, +0x5b, +0x84, +0x1b, +0x57, +0xc4, +0x80, +0x03, +0x53, +0xc9, +0x2f, +0x93, +0x04, +0x4d, +0xd5, +0x96, +0xe5, +0x70, +0xa6, +0x6e, +0x63, +0x5d, +0x9d, +0x6c, +0xdb, +0x02, +0x0a, +0xa9, +0xda, +0x8b, +0x53, +0xdc, +0xd9, +0x9a, +0xc5, +0x94, +0x2c, +0x91, +0x92, +0x2a, +0xde, +0xbb, +0x8b, +0x13, +0xb9, +0x19, +0x96, +0x64, +0xcc, +0xf2, +0x64, +0x39, +0xb7, +0x75, +0x49, +0xe9, +0x86, +0xc2, +0x86, +0x62, +0xd9, +0x24, +0xd3, +0x81, +0x35, +0x49, +0xfc, +0xa0, +0xa5, +0xa0, +0x93, +0x05, +0x64, +0xb4, +0x1a, +0x57, +0xce, +0x0c, +0x90, +0x02, +0x27, +0xc5, +0x7a, +0x2b, +0x5d, +0xae, +0x3e, +0xd5, +0xdd, +0x10, +0x7c, +0x14, +0xea, +0x3a, +0x08, +0xac, +0x72, +0x4e, +0x90, +0x3d, +0x3b, +0x7c, +0x86, +0x2e, +0xeb, +0xd4, +0x06, +0x70, +0xe6, +0xc7, +0xfb, +0x5f, +0xbd, +0x18, +0xf4, +0x11, +0xa4, +0x1a, +0x93, +0xc3, +0xbe, +0xd9, +0xfb, +0x26, +0x48, +0x2f, +0x37, +0x3c, +0xd0, +0x03, +0x47, +0x1a, +0xf7, +0x62, +0x19, +0x24, +0x5c, +0xf4, +0xa8, +0x92, +0x20, +0x7a, +0xf2, +0x9e, +0x2a, +0xc5, +0x95, +0xa2, +0xfb, +0xa4, +0xea, +0x85, +0xd8, +0x56, +0xb7, +0x70, +0xd1, +0x60, +0x30, +0xa5, +0x30, +0x82, +0x70, +0xdc, +0x7a, +0x65, +0x8a, +0x36, +0x3f, +0x5b, +0x0c, +0xae, +0x54, +0x7c, +0xd3, +0x57, +0x84, +0x7b, +0x3a, +0x65, +0x18, +0x81, +0xee, +0x05, +0x9b, +0x44, +0x4d, +0xb8, +0xda, +0xa2, +0xa1, +0xc9, +0x15, +0xd3, +0x73, +0x03, +0x0e, +0x43, +0xe9, +0x8e, +0x15, +0xf9, +0xbe, +0xc6, +0xc5, +0x8a, +0xe5, +0xc0, +0x1e, +0xc2, +0x37, +0x9e, +0x2a, +0x26, +0xa5, +0xa0, +0xbd, +0x24, +0x5f, +0xb9, +0xc1, +0xab, +0x34, +0x48, +0xb9, +0x5d, +0x98, +0xb4, +0x65, +0x18, +0xf3, +0x63, +0x19, +0x44, +0x1b, +0x11, +0x16, +0xff, +0xdc, +0xf1, +0x79, +0x08, +0x86, +0x0f, +0x52, +0x98, +0x73, +0xc4, +0x92, +0x90, +0x2b, +0x47, +0x09, +0xd0, +0x43, +0x6c, +0x2f, +0x20, +0xeb, +0xdc, +0xda, +0xc5, +0x08, +0x7b, +0x94, +0x42, +0x30, +0x6a, +0xc7, +0xda, +0x8c, +0xc3, +0x76, +0xa7, +0xa5, +0xcc, +0x62, +0x13, +0x00, +0x60, +0x31, +0x58, +0x44, +0x9b, +0xf5, +0x64, +0x14, +0xf5, +0x11, +0xc5, +0x54, +0x52, +0x83, +0xd4, +0x73, +0x01, +0x16, +0x0e, +0xb3, +0x7a, +0x29, +0x69, +0x35, +0x56, +0xd4, +0xee, +0x8a, +0x17, +0xa2, +0x99, +0x24, +0x9c, +0xd7, +0x8f, +0xdb, +0x55, +0xb5, +0x3e +}; diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/config.h b/keyboards/htx_studio/one_handed_keyboard_ml/config.h new file mode 100644 index 00000000000..5d5752dbf7f --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/config.h @@ -0,0 +1,23 @@ +#pragma once + +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MISO_PIN A6 +#define SPI_MOSI_PIN A7 + +#define POINTING_DEVICE_CS_PIN A4 +#define POINTING_DEVICE_MOTION_PIN A3 +#define POINTING_DEVICE_TASK_THROTTLE_MS 1 + +#define ENCODER_RESOLUTION 2 + +#ifdef RGB_MATRIX_ENABLE + +#define WS2812_BITBANG_NOP_FUDGE 0 +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 1 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP + +#endif diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/halconf.h b/keyboards/htx_studio/one_handed_keyboard_ml/halconf.h new file mode 100644 index 00000000000..2a2e3eb2093 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/halconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #define HAL_USE_PWM TRUE + #define HAL_USE_SPI TRUE + #define SPI_USE_WAIT TRUE + #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + + #include_next + \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json new file mode 100644 index 00000000000..f1bcb7df104 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json @@ -0,0 +1,231 @@ +{ + "keyboard_name": "One-Handed_Keyboard_ML", + "manufacturer": "HTXStudio", + "url": "https://github.com/htx-studio", + "maintainer": "HTXStudio", + "usb": { + "vid": "0x475D", + "pid": "0x03AF", + "device_version": "3.1.0" + }, + "processor": "STM32G431", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "matrix": { + "rows": 6, + "cols": 14 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true, + "encoder": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10"} + ] + }, + "ws2812": { + "pin": "B4", + "driver": "pwm" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, + {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, + {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, + {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, + {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, + {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, + {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, + {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, + {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, + {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, + {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, + {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, + {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, + {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, + + {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, + {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, + {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, + {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, + {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, + {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, + {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, + {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, + {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, + {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, + {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, + {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, + {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, + {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, + + {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, + {"matrix": [2, 2], "w":1, "h":1, "x":2, "y":2}, + {"matrix": [2, 3], "w":1, "h":1, "x":3, "y":2}, + {"matrix": [2, 4], "w":1, "h":1, "x":4, "y":2}, + {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, + {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, + {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, + {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, + {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, + {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, + {"matrix": [2, 12], "w":1.5, "h":1, "x":11, "y":2}, + {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, + + {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, + {"matrix": [3, 3], "w":1, "h":1, "x":3, "y":3}, + {"matrix": [3, 4], "w":1, "h":1, "x":4, "y":3}, + {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, + {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, + {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, + {"matrix": [3, 8], "w":1, "h":1, "x":8, "y":3}, + {"matrix": [3, 9], "w":1, "h":1, "x":9, "y":3}, + {"matrix": [3, 10], "w":2, "h":1, "x":10, "y":3}, + {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, + + {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, + {"matrix": [4, 3], "w":1.25, "h":1, "x":2.5, "y":4}, + {"matrix": [4, 4], "w":1.25, "h":1, "x":3.75, "y":4}, + {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, + {"matrix": [4, 6], "w":1.25, "h":1, "x":6.25, "y":4}, + {"matrix": [4, 7], "w":1.25, "h":1, "x":7.5, "y":4}, + {"matrix": [4, 9], "w":1.25, "h":1, "x":8.75, "y":4}, + {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, + {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, + + {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, + {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, + {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, + {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, + {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + ] + } + }, + "rgb_matrix": { + "driver": "ws2812", + "max_brightness": 110, + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + {"matrix": [0,0], "flags":4, "x":0, "y":0}, + {"matrix": [0,1], "flags":4, "x":17, "y":0}, + {"matrix": [0,2], "flags":4, "x":34, "y":0}, + {"matrix": [0,3], "flags":4, "x":51, "y":0}, + {"matrix": [0,4], "flags":4, "x":68, "y":0}, + {"matrix": [0,5], "flags":4, "x":85, "y":0}, + {"matrix": [0,6], "flags":4, "x":102, "y":0}, + {"matrix": [0,7], "flags":4, "x":119, "y":0}, + {"matrix": [0,8], "flags":4, "x":136, "y":0}, + {"matrix": [0,9], "flags":4, "x":153, "y":0}, + {"matrix": [0,10], "flags":4, "x":170, "y":0}, + {"matrix": [0,11], "flags":4, "x":187, "y":0}, + {"matrix": [0,12], "flags":4, "x":204, "y":0}, + {"matrix": [0,13], "flags":4, "x":221, "y":0}, + + {"matrix": [1,0], "flags":4, "x":0, "y":16}, + {"matrix": [1,1], "flags":4, "x":17, "y":16}, + {"matrix": [1,2], "flags":4, "x":34, "y":16}, + {"matrix": [1,3], "flags":4, "x":51, "y":16}, + {"matrix": [1,4], "flags":4, "x":68, "y":16}, + {"matrix": [1,5], "flags":4, "x":85, "y":16}, + {"matrix": [1,6], "flags":4, "x":102, "y":16}, + {"matrix": [1,7], "flags":4, "x":119, "y":16}, + {"matrix": [1,8], "flags":4, "x":136, "y":16}, + {"matrix": [1,9], "flags":4, "x":153, "y":16}, + {"matrix": [1,10], "flags":4, "x":170, "y":16}, + {"matrix": [1,11], "flags":4, "x":187, "y":16}, + {"matrix": [1,12], "flags":4, "x":204, "y":16}, + {"matrix": [1,13], "flags":4, "x":221, "y":16}, + + {"matrix": [2,0], "flags":4, "x":3, "y":32}, + {"matrix": [2,2], "flags":4, "x":23, "y":32}, + {"matrix": [2,3], "flags":4, "x":40, "y":32}, + {"matrix": [2,4], "flags":4, "x":57, "y":32}, + {"matrix": [2,5], "flags":4, "x":74, "y":32}, + {"matrix": [2,6], "flags":4, "x":91, "y":32}, + {"matrix": [2,7], "flags":4, "x":108, "y":32}, + {"matrix": [2,8], "flags":4, "x":125, "y":32}, + {"matrix": [2,9], "flags":4, "x":142, "y":32}, + {"matrix": [2,10], "flags":4, "x":159, "y":32}, + {"matrix": [2,12], "flags":4, "x":176, "y":32}, + {"matrix": [2,13], "flags":4, "x":200, "y":32}, + + {"matrix": [3,0], "flags":4, "x":6, "y":48}, + {"matrix": [3,3], "flags":4, "x":31, "y":48}, + {"matrix": [3,4], "flags":4, "x":50, "y":48}, + {"matrix": [3,5], "flags":4, "x":69, "y":48}, + {"matrix": [3,6], "flags":4, "x":88, "y":48}, + {"matrix": [3,7], "flags":4, "x":107, "y":48}, + {"matrix": [3,8], "flags":4, "x":126, "y":48}, + {"matrix": [3,9], "flags":4, "x":145, "y":48}, + {"matrix": [3,10], "flags":4, "x":180, "y":48}, + {"matrix": [3,13], "flags":4, "x":215, "y":48}, + + {"matrix": [4,0], "flags":4, "x":22, "y":64}, + {"matrix": [4,3], "flags":4, "x":43, "y":64}, + {"matrix": [4,4], "flags":4, "x":64, "y":64}, + {"matrix": [4,5], "flags":4, "x":95, "y":64}, + {"matrix": [4,6], "flags":4, "x":116, "y":64}, + {"matrix": [4,7], "flags":4, "x":137, "y":64}, + {"matrix": [4,9], "flags":4, "x":158, "y":64}, + {"matrix": [4,12], "flags":4, "x":179, "y":64}, + {"matrix": [4,13], "flags":4, "x":221, "y":64} + ], + "sleep": true + } +} + diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c new file mode 100644 index 00000000000..ac7e61346c2 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c @@ -0,0 +1,63 @@ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ +// ┃ ESC ┃ 1 ┃ 2 ┃ 3 ┃ 4 ┃ 5 ┃ 6 ┃ 7 ┃ 8 ┃ 9 ┃ 0 ┃ -_ ┃ += ┃ `~ ┃ +// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ +// ┃ TAB ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ :; ┃ +// ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ +// ┃ CAPSLOCK ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ '" ┃ ENTER ┃ +// ┗━━━┳━━━━━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━━━━━┻━┳━━━━━┻━━━━━━━┳━━━┛ +// ┃ SHIFT ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ MOUSE1 ┃ MOUSE2 ┃ +// ┗━━━┳━━━━━━━┻┳━━━━━━┻━┳━━━━━┻━━┳━━━━┻━━━┳━━━┻━━━━┳━━┻━━━━━┳━┻━━━━━━┳┻━━━━━━━━━━━━━┻┳━━━━━━━━┳━━━┛ +// ┃ CTRL ┃ LGUI ┃ LALT ┃ ,< ┃ .> ┃ /? ┃ Fn ┃ SPC ┃ BACK ┃ +// ┗━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━┛ +// ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ +// ┃ MOUSE3 ┃ → ┃ ↓ ┃ ← ┃ ↑ ┃ +// ┗━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛ + + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_GRAVE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, KC_SEMICOLON, + KC_CAPS_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, KC_ENTER, + KC_LEFT_SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, + KC_LEFT_CTRL, KC_LEFT_GUI, KC_LEFT_ALT, KC_COMMA, KC_DOT, KC_SLASH, MO(1), KC_SPC, KC_BACKSPACE, + + QK_MOUSE_BUTTON_3, KC_RIGHT, KC_DOWN, KC_LEFT, KC_UP + ), + +// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ +// ┃ ┃ F1 ┃ F2 ┃ F3 ┃ F4 ┃ F5 ┃ F6 ┃ F7 ┃ F8 ┃ F9 ┃ F10 ┃ F11 ┃ F12 ┃ ┃ +// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_HUED┃RM_HUEU┃ ┃ ┃ ┃ ┃ +// ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_SATD┃RM_SATU┃ ┃ ┃ ┃ +// ┗━━━┳━━━━━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━━━━━┻━┳━━━━━┻━━━━━━━┳━━━┛ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_SPDD┃RM_SPDU┃ MOUSE1 ┃ MOUSE2 ┃ +// ┗━━━┳━━━━━━━┻┳━━━━━━┻━┳━━━━━┻━━┳━━━━┻━━━┳━━━┻━━━━┳━━┻━━━━━┳━┻━━━━━━┳┻━━━━━━━━━━━━━┻┳━━━━━━━━┳━━━┛ +// ┃ ┃ ┃ ┃ ┃ ┃ \| ┃ ┃ RM_TOGG ┃ DEL ┃ +// ┗━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━┛ +// ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ +// ┃ MOUSE3 ┃ RM_PREV ┃ RM_VALD ┃ RM_NEXT ┃ RM_VALU ┃ +// ┗━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛ + + + [1] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RM_HUED, RM_HUEU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RM_SATD, RM_SATU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RM_SPDD, RM_SPDU, QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, + _______, _______, _______, _______, _______, KC_BSLS, _______, RM_TOGG, KC_DEL, + + QK_MOUSE_BUTTON_3, RM_PREV, RM_VALD, RM_NEXT, RM_VALU + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)}, + [1] = {ENCODER_CCW_CW(MS_WHLD, MS_WHLU)} +}; +#endif diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk new file mode 100644 index 00000000000..08f4783a51c --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += adns.c +SPI_DRIVER_REQUIRED = yes +ENCODER_MAP_ENABLE = yes +RGB_MATRIX_ENABLE = yes +WS2812_DRIVER = pwm + diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h new file mode 100644 index 00000000000..bf00e666145 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h @@ -0,0 +1,26 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +/* enable TIM3, used for RGB LED PWM driver */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/readme.md b/keyboards/htx_studio/one_handed_keyboard_ml/readme.md new file mode 100644 index 00000000000..1933b96610a --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/readme.md @@ -0,0 +1,29 @@ +# One-Handed_Keyboard_ML + +![左手大键盘](https://imgur.com/QjQSxhP.jpg) + +This is a keyboard with a fan-shaped layout and 59 keys.The commonly used buttons are placed near the thumb. + +* Keyboard Maintainer:[HTX Studio](https://github.com/htx-studio) +* Hardware Supported:HTX_STUDIO_ONE-HANDEN_KEYBOARD_ML PCB +* Hardware Availability:[One-Handed-Keyboard](https://github.com/htx-studio/One-Handed-Keyboard/tree/main/Hardware) + +## How to compile + +Make example for this keyboard (after setting up your build environment): + + `make htx_studio/one_handed_keyboard_ml:default` + +Flashing example for this keyboard: + + `make htx_studio/one_handed_keyboard_ml:default:flash` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Hold the "B" button on the back of the PCB (the one closest to the MCU) and briefly press the "R" button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns.c b/keyboards/htx_studio/one_handed_keyboard_mr/adns.c new file mode 100644 index 00000000000..ca3cb72c28e --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/adns.c @@ -0,0 +1,254 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#include "spi_master.h" +#include "adns.h" +#include "debug.h" +#include "wait.h" +#include "pointing_device.h" +#include "adns9800_srom_A6.h" + +// registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Pixel_Sum 0x08 +#define REG_Maximum_Pixel 0x09 +#define REG_Minimum_Pixel 0x0a +#define REG_Shutter_Lower 0x0b +#define REG_Shutter_Upper 0x0c +#define REG_Frame_Period_Lower 0x0d +#define REG_Frame_Period_Upper 0x0e +#define REG_Configuration_I 0x0f +#define REG_Configuration_II 0x10 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate 0x15 +#define REG_Rest1_Downshift 0x16 +#define REG_Rest2_Rate 0x17 +#define REG_Rest2_Downshift 0x18 +#define REG_Rest3_Rate 0x19 +#define REG_Frame_Period_Max_Bound_Lower 0x1a +#define REG_Frame_Period_Max_Bound_Upper 0x1b +#define REG_Frame_Period_Min_Bound_Lower 0x1c +#define REG_Frame_Period_Min_Bound_Upper 0x1d +#define REG_Shutter_Max_Bound_Lower 0x1e +#define REG_Shutter_Max_Bound_Upper 0x1f +#define REG_LASER_CTRL0 0x20 +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_SROM_ID 0x2a +#define REG_Lift_Detection_Thr 0x2e +#define REG_Configuration_V 0x2f +#define REG_Configuration_IV 0x39 +#define REG_Power_Up_Reset 0x3a +#define REG_Shutdown 0x3b +#define REG_Inverse_Product_ID 0x3f +#define REG_Motion_Burst 0x50 +#define REG_SROM_Load_Burst 0x62 +#define REG_Pixel_Burst 0x64 + +// pins +#define NCS A4 + +extern const uint16_t firmware_length; +extern const uint8_t firmware_data[]; + +enum motion_burst_propertr{ + motion = 0, + observation, + delta_x_l, + delta_x_h, + delta_y_l, + delta_y_h, + squal, + pixel_sum, + maximum_pixel, + minimum_pixel, + shutter_upper, + shutter_lower, + frame_period_upper, + frame_period_lower, + end_data +}; + +void adns_begin(void){ + spi_start(NCS, false, 3, 8); +} + +void adns_end(void){ + spi_stop(); +} + +void adns_write(uint8_t reg_addr, uint8_t data){ + + adns_begin(); + //send address of the register, with MSBit = 1 to indicate it's a write + spi_write(reg_addr | 0x80 ); + spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + adns_end(); +} + +uint8_t adns_read(uint8_t reg_addr){ + + + adns_begin(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f ); + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + adns_end(); + return data; +} + +void pointing_device_init(void) { + dprint("STARTING INTI\n"); + + spi_init(); + // reset serial port + adns_begin(); + adns_end(); + + // reboot + adns_write(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + // read registers and discard + adns_read(REG_Motion); + adns_read(REG_Delta_X_L); + adns_read(REG_Delta_X_H); + adns_read(REG_Delta_Y_L); + adns_read(REG_Delta_Y_H); + + // upload firmware + + // set the configuration_IV register in 3k firmware mode + // bit 1 = 1 for 3k mode, other bits are reserved + adns_write(REG_Configuration_V, 0x02); + + // write 0x1d in SROM_enable reg for initializing + adns_write(REG_SROM_Enable, 0x1d); + + // wait for more than one frame period + // assume that the frame rate is as low as 100fps... even if it should never be that low + wait_ms(10); + + // write 0x18 to SROM_enable to start SROM download + adns_write(REG_SROM_Enable, 0x18); + + // write the SROM file (=firmware data) + + // write burst destination adress + adns_begin(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + // send all bytes of the firmware + unsigned char c; + for(int i = 0; i < firmware_length; i++){ + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + + adns_end(); + wait_ms(10); + + // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) + // reading the actual value of the register is important because the real + // default value is different from what is said in the datasheet, and if you + // change the reserved bytes (like by writing 0x00...) it would not work. + uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); + adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); + + wait_ms(1); + + // set the configuration_I register to set the CPI + // 0x01 = 50, minimum + // 0x44 = 3400, default + // 0x8e = 7100 + // 0xA4 = 8200, maximum + adns_write(REG_Configuration_I, 0x1A); + + wait_ms(100); + dprint("INIT ENDED\n"); +} + +int16_t convertDeltaToInt(uint8_t high, uint8_t low){ + + // join bytes into twos compliment + //int16_t twos_comp = (high << 8) | low; + //return twos_comp; + return (high << 8) | low; +} + +motion_delta_t readSensor(void) { + adns_begin(); + + // read from Motion_Burst to enable burt mode + spi_write(REG_Motion_Burst & 0x7f); + + // Wait one frame per docs, thanks u/kbjunky + wait_us(100); + uint8_t burst_data[pixel_sum]; + + for (int i = 0; i < pixel_sum; ++i) { + burst_data[i] = spi_read(); + } + + uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); + uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); + // Only consider the MSB for motion as this byte has other status bits + uint8_t motion_ind = burst_data[motion] & 0b10000000; + adns_end(); + + motion_delta_t delta = {delta_x, delta_y, motion_ind}; + return delta; +} + +bool pointing_device_task(void) { + motion_delta_t delta = readSensor(); + + report_mouse_t report = pointing_device_get_report(); + + if(delta.motion_ind) { + // clamp deltas from -127 to 127 + report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; + report.x = -report.x; + report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; + } + + pointing_device_set_report(report); + return pointing_device_send(); +} diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns.h b/keyboards/htx_studio/one_handed_keyboard_mr/adns.h new file mode 100644 index 00000000000..e557aeb2ece --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/adns.h @@ -0,0 +1,38 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#pragma once + +#include + +void adns_begin(void); + +void adns_end(void); + +void adns_write(uint8_t reg_addr, uint8_t data); + +uint8_t adns_read(uint8_t reg_addr); + + +int16_t convertDeltaToInt(uint8_t high, uint8_t low); + +struct _motion_delta { + int16_t delta_x; + int16_t delta_y; + int8_t motion_ind; +}; +typedef struct _motion_delta motion_delta_t; + +motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h new file mode 100644 index 00000000000..fddf30589d4 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h @@ -0,0 +1,3081 @@ +// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. +// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk + +#pragma once + +#include "progmem.h" + +const uint16_t firmware_length = 3070; + +const uint8_t firmware_data[] PROGMEM = { + 0x03, +0xa6, +0x68, +0x1e, +0x7d, +0x10, +0x7e, +0x7e, +0x5f, +0x1c, +0xb8, +0xf2, +0x47, +0x0c, +0x7b, +0x74, +0x4b, +0x14, +0x8b, +0x75, +0x66, +0x51, +0x0b, +0x8c, +0x76, +0x74, +0x4b, +0x14, +0xaa, +0xd6, +0x0f, +0x9c, +0xba, +0xf6, +0x6e, +0x3f, +0xdd, +0x38, +0xd5, +0x02, +0x80, +0x9b, +0x82, +0x6d, +0x58, +0x13, +0xa4, +0xab, +0xb5, +0xc9, +0x10, +0xa2, +0xc6, +0x0a, +0x7f, +0x5d, +0x19, +0x91, +0xa0, +0xa3, +0xce, +0xeb, +0x3e, +0xc9, +0xf1, +0x60, +0x42, +0xe7, +0x4c, +0xfb, +0x74, +0x6a, +0x56, +0x2e, +0xbf, +0xdd, +0x38, +0xd3, +0x05, +0x88, +0x92, +0xa6, +0xce, +0xff, +0x5d, +0x38, +0xd1, +0xcf, +0xef, +0x58, +0xcb, +0x65, +0x48, +0xf0, +0x35, +0x85, +0xa9, +0xb2, +0x8f, +0x5e, +0xf3, +0x80, +0x94, +0x97, +0x7e, +0x75, +0x97, +0x87, +0x73, +0x13, +0xb0, +0x8a, +0x69, +0xd4, +0x0a, +0xde, +0xc1, +0x79, +0x59, +0x36, +0xdb, +0x9d, +0xd6, +0xb8, +0x15, +0x6f, +0xce, +0x3c, +0x72, +0x32, +0x45, +0x88, +0xdf, +0x6c, +0xa5, +0x6d, +0xe8, +0x76, +0x96, +0x14, +0x74, +0x20, +0xdc, +0xf4, +0xfa, +0x37, +0x6a, +0x27, +0x32, +0xe3, +0x29, +0xbf, +0xc4, +0xc7, +0x06, +0x9d, +0x58, +0xe7, +0x87, +0x7c, +0x2e, +0x9f, +0x6e, +0x49, +0x07, +0x5d, +0x23, +0x64, +0x54, +0x83, +0x6e, +0xcb, +0xb7, +0x77, +0xf7, +0x2b, +0x6e, +0x0f, +0x2e, +0x66, +0x12, +0x60, +0x55, +0x65, +0xfc, +0x43, +0xb3, +0x58, +0x73, +0x5b, +0xe8, +0x67, +0x04, +0x43, +0x02, +0xde, +0xb3, +0x89, +0xa0, +0x6d, +0x3a, +0x27, +0x79, +0x64, +0x5b, +0x0c, +0x16, +0x9e, +0x66, +0xb1, +0x8b, +0x87, +0x0c, +0x5d, +0xf2, +0xb6, +0x3d, +0x71, +0xdf, +0x42, +0x03, +0x8a, +0x06, +0x8d, +0xef, +0x1d, +0xa8, +0x96, +0x5c, +0xed, +0x31, +0x61, +0x5c, +0xa1, +0x34, +0xf6, +0x8c, +0x08, +0x60, +0x33, +0x07, +0x00, +0x3e, +0x79, +0x95, +0x1b, +0x43, +0x7f, +0xfe, +0xb6, +0xa6, +0xd4, +0x9d, +0x76, +0x72, +0xbf, +0xad, +0xc0, +0x15, +0xe8, +0x37, +0x31, +0xa3, +0x72, +0x63, +0x52, +0x1d, +0x1c, +0x5d, +0x51, +0x1b, +0xe1, +0xa9, +0xed, +0x60, +0x32, +0x3e, +0xa9, +0x50, +0x28, +0x53, +0x06, +0x59, +0xe2, +0xfc, +0xe7, +0x02, +0x64, +0x39, +0x21, +0x56, +0x4a, +0xa5, +0x40, +0x80, +0x81, +0xd5, +0x5a, +0x60, +0x7b, +0x68, +0x84, +0xf1, +0xe0, +0xb1, +0xb6, +0x5b, +0xdf, +0xa8, +0x1d, +0x6d, +0x65, +0x20, +0xc0, +0xa2, +0xb9, +0xd9, +0xbb, +0x00, +0xa6, +0xdb, +0x8b, +0x01, +0x53, +0x91, +0xfe, +0xc4, +0x51, +0x85, +0xb0, +0x96, +0x7f, +0xfd, +0x51, +0xdd, +0x14, +0x03, +0x67, +0x2e, +0x75, +0x1c, +0x76, +0xd3, +0x6e, +0xdd, +0x99, +0x55, +0x76, +0xe5, +0xab, +0x23, +0xfc, +0x4a, +0xd5, +0xc6, +0xe8, +0x2e, +0xca, +0x8a, +0xb3, +0xf6, +0x8c, +0x6c, +0xb0, +0xe9, +0xf2, +0xe7, +0x9e, +0x69, +0x41, +0xed, +0xf1, +0x6d, +0xd2, +0x86, +0xd8, +0x7e, +0xcb, +0x5d, +0x47, +0x6c, +0x85, +0x6a, +0x23, +0xed, +0x20, +0x40, +0x93, +0xb4, +0x20, +0xc7, +0xa5, +0xc9, +0xaf, +0x03, +0x15, +0xac, +0x19, +0xe5, +0x2a, +0x36, +0xdf, +0x6d, +0xc5, +0x8c, +0x80, +0x07, +0xce, +0x92, +0x0c, +0xd8, +0x06, +0x62, +0x0f, +0xdd, +0x48, +0x46, +0x1a, +0x53, +0xc7, +0x8a, +0x8c, +0x5d, +0x5d, +0xb4, +0xa1, +0x02, +0xd3, +0xa9, +0xb8, +0xf3, +0x94, +0x8f, +0x3f, +0xe5, +0x54, +0xd4, +0x11, +0x65, +0xb2, +0x5e, +0x09, +0x0b, +0x81, +0xe3, +0x75, +0xa7, +0x89, +0x81, +0x39, +0x6c, +0x46, +0xf6, +0x06, +0x9f, +0x27, +0x3b, +0xb6, +0x2d, +0x5f, +0x1d, +0x4b, +0xd4, +0x7b, +0x1d, +0x61, +0x74, +0x89, +0xe4, +0xe3, +0xbd, +0x98, +0x1b, +0xc4, +0x51, +0x3b, +0xa4, +0xfa, +0xe0, +0x92, +0xf7, +0xbe, +0xf2, +0x4d, +0xbb, +0xff, +0xad, +0x4f, +0x6d, +0x68, +0xc2, +0x79, +0x40, +0xaa, +0x9b, +0x8f, +0x0c, +0x32, +0x4b, +0x5f, +0x3e, +0xab, +0x59, +0x98, +0xb3, +0xf5, +0x1d, +0xac, +0x5e, +0xbc, +0x78, +0xd3, +0x01, +0x6c, +0x64, +0x15, +0x2f, +0xd8, +0x71, +0xa6, +0x2d, +0x45, +0xe1, +0x22, +0x42, +0xe4, +0x4e, +0x04, +0x3c, +0x7d, +0xf4, +0x40, +0x21, +0xb4, +0x67, +0x05, +0xa8, +0xe2, +0xf3, +0x72, +0x87, +0x4c, +0x7d, +0xd9, +0x1b, +0x65, +0x97, +0xf3, +0xc2, +0xe3, +0xe4, +0xc8, +0xd2, +0xde, +0xf6, +0xef, +0xdc, +0xbb, +0x44, +0x08, +0x5e, +0xe2, +0x45, +0x27, +0x01, +0xb0, +0xf6, +0x43, +0xe7, +0x3a, +0xf6, +0xdc, +0x9d, +0xed, +0xf3, +0xc5, +0x0c, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x36, +0xee, +0x96, +0x72, +0x67, +0xe7, +0x81, +0x91, +0xd5, +0x05, +0x0a, +0xe0, +0x82, +0xd5, +0x8f, +0xe8, +0xf9, +0xb0, +0xc9, +0xcf, +0x93, +0xe7, +0x04, +0xc5, +0xbc, +0x2b, +0x43, +0x56, +0x7e, +0xe8, +0x67, +0x7c, +0xe5, +0xfb, +0x49, +0xad, +0x5e, +0x9f, +0x25, +0x13, +0xde, +0x6e, +0x6e, +0xe9, +0xf1, +0xec, +0x87, +0x0b, +0x59, +0x81, +0x76, +0x84, +0x76, +0xb3, +0x24, +0xaf, +0x30, +0xfd, +0x27, +0x8b, +0xab, +0xd8, +0x00, +0x8b, +0x9b, +0x0c, +0xd2, +0xb2, +0x4e, +0x5e, +0x9d, +0x1d, +0x96, +0x01, +0x00, +0x67, +0xc1, +0x5f, +0x02, +0x20, +0xfd, +0x45, +0x6a, +0x01, +0x60, +0x58, +0x45, +0xca, +0x47, +0x21, +0x90, +0x5a, +0xc4, +0x43, +0x26, +0x1a, +0xd7, +0xa5, +0x4a, +0xb2, +0x5d, +0x2b, +0x35, +0x49, +0xfb, +0xa5, +0x17, +0x92, +0x21, +0x1e, +0x93, +0x96, +0x67, +0xa2, +0x7e, +0x36, +0x7a, +0xde, +0x5f, +0xbe, +0x7a, +0x58, +0x9d, +0xf8, +0x78, +0xa3, +0xfa, +0xc8, +0xd5, +0x17, +0xf0, +0x21, +0x97, +0x8c, +0x80, +0xb5, +0x4b, +0x3b, +0xbd, +0xbb, +0x41, +0x21, +0xa8, +0x50, +0x67, +0xf7, +0xe7, +0x19, +0x80, +0x10, +0x8e, +0xce, +0x04, +0x18, +0x3f, +0x51, +0x6b, +0x77, +0xd8, +0x9e, +0x16, +0xaf, +0xec, +0xef, +0x48, +0x16, +0x4d, +0x9e, +0x85, +0x38, +0x18, +0x3e, +0xd4, +0x28, +0x87, +0x60, +0x2a, +0xf6, +0x7f, +0x09, +0x86, +0x6f, +0x9c, +0x3c, +0x3a, +0xff, +0xab, +0xd0, +0x61, +0xa2, +0x97, +0x0d, +0x71, +0x94, +0x7e, +0xfd, +0xb9, +0x80, +0x02, +0x89, +0x6a, +0xb3, +0x84, +0x6c, +0x2a, +0x77, +0x62, +0xbe, +0x0b, +0xf4, +0xaf, +0xac, +0x7b, +0x7c, +0x8e, +0xca, +0x01, +0xba, +0x71, +0x78, +0x94, +0xfd, +0xb5, +0x39, +0xa4, +0x4d, +0x2f, +0x78, +0xcf, +0xca, +0x92, +0x0c, +0x1a, +0x99, +0x48, +0x4c, +0x11, +0x96, +0xb5, +0x4e, +0x41, +0x28, +0xe4, +0xa6, +0xfe, +0x4b, +0x72, +0x91, +0xe7, +0xd4, +0xdd, +0x9f, +0x12, +0xe6, +0x29, +0x38, +0xce, +0x45, +0xae, +0x02, +0xb8, +0x24, +0xae, +0xbd, +0xe9, +0x66, +0x08, +0x62, +0xa2, +0x2c, +0x2b, +0x00, +0xe2, +0x23, +0xd9, +0xc4, +0x48, +0xe4, +0xd3, +0xac, +0xbb, +0x34, +0xc7, +0xf0, +0xe3, +0x4f, +0xb9, +0x30, +0xea, +0xa2, +0x12, +0xf1, +0x30, +0x2c, +0x36, +0xde, +0x48, +0xf2, +0xb0, +0x4c, +0x43, +0x3f, +0x2e, +0x58, +0xe4, +0x20, +0xe3, +0x58, +0xcd, +0x31, +0x22, +0xf0, +0xa2, +0x2a, +0xe6, +0x19, +0x90, +0x55, +0x86, +0xf6, +0x55, +0x79, +0xd1, +0xd7, +0x46, +0x2f, +0xc0, +0xdc, +0x99, +0xe8, +0xf3, +0x6a, +0xdf, +0x7f, +0xeb, +0x24, +0x4a, +0x1e, +0x5a, +0x75, +0xde, +0x2f, +0x5c, +0x19, +0x61, +0x03, +0x53, +0x54, +0x6a, +0x3b, +0x18, +0x70, +0xb6, +0x4f, +0xf1, +0x9c, +0x0a, +0x59, +0x9d, +0x19, +0x92, +0x65, +0x8c, +0x83, +0x14, +0x2d, +0x44, +0x8a, +0x75, +0xa9, +0xf5, +0x90, +0xd2, +0x66, +0x4e, +0xfa, +0x69, +0x0f, +0x5b, +0x0b, +0x98, +0x65, +0xc8, +0x11, +0x42, +0x59, +0x7f, +0xdd, +0x1b, +0x75, +0x17, +0x31, +0x4c, +0x75, +0x58, +0xeb, +0x58, +0x63, +0x7d, +0xf2, +0xa6, +0xc2, +0x6e, +0xb7, +0x3f, +0x3e, +0x5e, +0x47, +0xad, +0xb7, +0x04, +0xe8, +0x05, +0xf8, +0xb2, +0xcf, +0x19, +0xf3, +0xd2, +0x85, +0xfe, +0x3e, +0x3e, +0xb1, +0x62, +0x08, +0x2c, +0x10, +0x07, +0x0d, +0x73, +0x90, +0x17, +0xfa, +0x9b, +0x56, +0x02, +0x75, +0xf9, +0x51, +0xe0, +0xe9, +0x1a, +0x7b, +0x9f, +0xb3, +0xf3, +0x98, +0xb8, +0x1c, +0x9c, +0xe1, +0xd5, +0x35, +0xae, +0xc8, +0x60, +0x48, +0x11, +0x09, +0x94, +0x6b, +0xd0, +0x8b, +0x15, +0xbc, +0x05, +0x68, +0xd3, +0x54, +0x8a, +0x51, +0x39, +0x5c, +0x42, +0x76, +0xce, +0xd8, +0xad, +0x89, +0x30, +0xc9, +0x05, +0x1c, +0xcc, +0x94, +0x3f, +0x0f, +0x90, +0x6f, +0x72, +0x2d, +0x85, +0x64, +0x9a, +0xb9, +0x23, +0xf9, +0x0b, +0xc3, +0x7c, +0x39, +0x0f, +0x97, +0x07, +0x97, +0xda, +0x58, +0x48, +0x33, +0x05, +0x23, +0xb8, +0x82, +0xe8, +0xd3, +0x53, +0x89, +0xaf, +0x33, +0x80, +0x22, +0x84, +0x0c, +0x95, +0x5c, +0x67, +0xb8, +0x77, +0x0c, +0x5c, +0xa2, +0x5f, +0x3d, +0x58, +0x0f, +0x27, +0xf3, +0x2f, +0xae, +0x48, +0xbd, +0x0b, +0x6f, +0x54, +0xfb, +0x67, +0x4c, +0xea, +0x32, +0x27, +0xf1, +0xfa, +0xe2, +0xb0, +0xec, +0x0b, +0x15, +0xb4, +0x70, +0xf6, +0x5c, +0xdd, +0x71, +0x60, +0xc3, +0xc1, +0xa8, +0x32, +0x65, +0xac, +0x7a, +0x77, +0x41, +0xe5, +0xa9, +0x6b, +0x11, +0x81, +0xfa, +0x34, +0x8d, +0xfb, +0xc1, +0x80, +0x6e, +0xc4, +0x60, +0x30, +0x07, +0xd4, +0x8b, +0x67, +0xbd, +0xaa, +0x8c, +0x9c, +0x64, +0xac, +0xdb, +0x0b, +0x24, +0x8b, +0x63, +0x6f, +0xe6, +0xbc, +0xe7, +0x33, +0xa4, +0x4a, +0x4c, +0xa7, +0x9f, +0x43, +0x53, +0xd2, +0xbb, +0x8f, +0x43, +0xc7, +0x3d, +0x78, +0x68, +0x3f, +0xa5, +0x3d, +0xca, +0x69, +0x84, +0xa6, +0x97, +0x2d, +0xc0, +0x7d, +0x31, +0x34, +0x55, +0x1d, +0x07, +0xb1, +0x5f, +0x40, +0x5c, +0x93, +0xb0, +0xbc, +0x7c, +0xb0, +0xbc, +0xe7, +0x12, +0xee, +0x6b, +0x2b, +0xd3, +0x4d, +0x67, +0x70, +0x3a, +0x9a, +0xf2, +0x3c, +0x7c, +0x81, +0xfa, +0xd7, +0xd9, +0x90, +0x91, +0x81, +0xb8, +0xb1, +0xf3, +0x48, +0x6a, +0x26, +0x4f, +0x0c, +0xce, +0xb0, +0x9e, +0xfd, +0x4a, +0x3a, +0xaf, +0xac, +0x5b, +0x3f, +0xbf, +0x44, +0x5a, +0xa3, +0x19, +0x1e, +0x4b, +0xe7, +0x36, +0x6a, +0xd7, +0x20, +0xae, +0xd7, +0x7d, +0x3b, +0xe7, +0xff, +0x3a, +0x86, +0x2e, +0xd0, +0x4a, +0x3e, +0xaf, +0x9f, +0x8e, +0x01, +0xbf, +0xf8, +0x4f, +0xc1, +0xe8, +0x6f, +0x74, +0xe1, +0x45, +0xd3, +0xf7, +0x04, +0x6a, +0x4b, +0x9d, +0xec, +0x33, +0x27, +0x76, +0xd7, +0xc5, +0xe1, +0xb0, +0x3b, +0x0e, +0x23, +0xec, +0xf0, +0x86, +0xd2, +0x1a, +0xbf, +0x3d, +0x04, +0x62, +0xb3, +0x6c, +0xb2, +0xeb, +0x17, +0x05, +0xa6, +0x0a, +0x8a, +0x7e, +0x83, +0x1c, +0xb6, +0x37, +0x09, +0xc6, +0x0b, +0x70, +0x3c, +0xb5, +0x93, +0x81, +0xd8, +0x93, +0xa0, +0x5f, +0x1e, +0x08, +0xe2, +0xc6, +0xe5, +0xc9, +0x72, +0xf1, +0xf1, +0xc1, +0xed, +0xd5, +0x58, +0x93, +0x83, +0xf8, +0x65, +0x67, +0x2e, +0x0d, +0xa9, +0xf1, +0x64, +0x12, +0xe6, +0x4c, +0xea, +0x15, +0x3f, +0x8c, +0x1a, +0xb6, +0xbf, +0xf6, +0xb9, +0x52, +0x35, +0x09, +0xb0, +0xe6, +0xf7, +0xcd, +0xf1, +0xa5, +0xaa, +0x81, +0xd1, +0x81, +0x6f, +0xb4, +0xa9, +0x66, +0x1f, +0xfc, +0x48, +0xc0, +0xb6, +0xd1, +0x8b, +0x06, +0x2f, +0xf6, +0xef, +0x1f, +0x0a, +0xe6, +0xce, +0x3a, +0x4a, +0x55, +0xbf, +0x6d, +0xf9, +0x4d, +0xd4, +0x08, +0x45, +0x4b, +0xc3, +0x66, +0x19, +0x92, +0x10, +0xe1, +0x17, +0x8e, +0x28, +0x91, +0x16, +0xbf, +0x3c, +0xee, +0xa3, +0xa6, +0x99, +0x92, +0x10, +0xe1, +0xf6, +0xcc, +0xac, +0xb8, +0x65, +0x0b, +0x43, +0x66, +0xf8, +0xe3, +0xe5, +0x3f, +0x24, +0x89, +0x47, +0x5d, +0x78, +0x43, +0xd0, +0x61, +0x17, +0xbd, +0x5b, +0x64, +0x54, +0x08, +0x45, +0x59, +0x93, +0xf6, +0x95, +0x8a, +0x41, +0x51, +0x62, +0x4b, +0x51, +0x02, +0x30, +0x73, +0xc7, +0x87, +0xc5, +0x4b, +0xa2, +0x97, +0x0f, +0xe8, +0x46, +0x5f, +0x7e, +0x2a, +0xe1, +0x30, +0x20, +0xb0, +0xfa, +0xe7, +0xce, +0x61, +0x42, +0x57, +0x6e, +0x21, +0xf3, +0x7a, +0xec, +0xe3, +0x25, +0xc7, +0x25, +0xf3, +0x67, +0xa7, +0x57, +0x40, +0x00, +0x02, +0xcf, +0x1c, +0x80, +0x77, +0x67, +0xbd, +0x70, +0xa1, +0x19, +0x92, +0x31, +0x75, +0x93, +0x27, +0x27, +0xb6, +0x82, +0xe4, +0xeb, +0x1d, +0x78, +0x48, +0xe7, +0xa5, +0x5e, +0x57, +0xef, +0x64, +0x28, +0x64, +0x1b, +0xf6, +0x11, +0xb2, +0x03, +0x9d, +0xb9, +0x18, +0x02, +0x27, +0xf7, +0xbe, +0x9d, +0x55, +0xfc, +0x00, +0xd2, +0xc7, +0xae, +0xad, +0x0b, +0xc5, +0xe9, +0x42, +0x41, +0x48, +0xd8, +0x32, +0xcf, +0xf6, +0x0f, +0xf5, +0xbc, +0x97, +0xc6, +0x99, +0x47, +0x76, +0xbd, +0x89, +0x06, +0x0f, +0x63, +0x0c, +0x51, +0xd4, +0x5e, +0xea, +0x48, +0xa8, +0xa2, +0x56, +0x1c, +0x79, +0x84, +0x86, +0x40, +0x88, +0x41, +0x76, +0x55, +0xfc, +0xc2, +0xd7, +0xfd, +0xc9, +0xc7, +0x80, +0x61, +0x35, +0xa7, +0x43, +0x20, +0xf7, +0xeb, +0x6c, +0x66, +0x13, +0xb0, +0xec, +0x02, +0x75, +0x3e, +0x4b, +0xaf, +0xb9, +0x5d, +0x40, +0xda, +0xd6, +0x6e, +0x2d, +0x39, +0x54, +0xc2, +0x95, +0x35, +0x54, +0x25, +0x72, +0xe1, +0x78, +0xb8, +0xeb, +0xc1, +0x16, +0x58, +0x0f, +0x9c, +0x9b, +0xb4, +0xea, +0x37, +0xec, +0x3b, +0x11, +0xba, +0xd5, +0x8a, +0xa9, +0xe3, +0x98, +0x00, +0x51, +0x1c, +0x14, +0xe0, +0x40, +0x96, +0xe5, +0xe9, +0xf2, +0x21, +0x22, +0xb1, +0x23, +0x60, +0x78, +0xd3, +0x17, +0xf8, +0x7a, +0xa5, +0xa8, +0xba, +0x20, +0xd3, +0x15, +0x1e, +0x32, +0xe4, +0x5e, +0x15, +0x48, +0xae, +0xa9, +0xe5, +0xb8, +0x33, +0xec, +0xe8, +0xa2, +0x42, +0xac, +0xbf, +0x10, +0x84, +0x53, +0x87, +0x19, +0xb4, +0x5f, +0x76, +0x4d, +0x01, +0x9d, +0x56, +0x74, +0xd9, +0x5c, +0x97, +0xe7, +0x88, +0xea, +0x3a, +0xbf, +0xdc, +0x4c, +0x33, +0x8a, +0x16, +0xb9, +0x5b, +0xfa, +0xd8, +0x42, +0xa7, +0xbb, +0x3c, +0x04, +0x27, +0x78, +0x49, +0x81, +0x2a, +0x5a, +0x7d, +0x7c, +0x23, +0xa8, +0xba, +0xf7, +0x9a, +0x9f, +0xd2, +0x66, +0x3e, +0x38, +0x3c, +0x75, +0xf9, +0xd1, +0x30, +0x26, +0x30, +0x6e, +0x5a, +0x6e, +0xdc, +0x6a, +0x69, +0x32, +0x50, +0x33, +0x47, +0x9e, +0xa4, +0xa8, +0x64, +0x66, +0xf0, +0x8a, +0xe4, +0xfd, +0x27, +0x6f, +0x51, +0x25, +0x8b, +0x43, +0x74, +0xc9, +0x8e, +0xbd, +0x88, +0x31, +0xbe, +0xec, +0x65, +0xd2, +0xcb, +0x8d, +0x5a, +0x13, +0x48, +0x16, +0x8c, +0x61, +0x0b, +0x11, +0xf6, +0xc6, +0x66, +0xae, +0xc3, +0xcc, +0x0c, +0xd2, +0xe1, +0x9f, +0x82, +0x41, +0x3f, +0x56, +0xf9, +0x73, +0xef, +0xdc, +0x30, +0x50, +0xcf, +0xb6, +0x7f, +0xbc, +0xd0, +0xb3, +0x10, +0xab, +0x24, +0xe4, +0xec, +0xad, +0x18, +0x8c, +0x39, +0x2d, +0x30, +0x4c, +0xc5, +0x40, +0x0d, +0xf6, +0xac, +0xd6, +0x18, +0x5d, +0x96, +0xbf, +0x5f, +0x71, +0x75, +0x96, +0x22, +0x97, +0x0f, +0x02, +0x94, +0x6e, +0xa6, +0xae, +0x6d, +0x8f, +0x1e, +0xca, +0x12, +0x9b, +0x2a, +0x1c, +0xce, +0xa9, +0xee, +0xfd, +0x12, +0x8e, +0xfc, +0xed, +0x09, +0x33, +0xba, +0xf4, +0x1a, +0x15, +0xf6, +0x9d, +0x87, +0x16, +0x43, +0x7c, +0x78, +0x57, +0xe1, +0x44, +0xc9, +0xeb, +0x1f, +0x58, +0x4d, +0xc1, +0x49, +0x11, +0x5c, +0xb2, +0x11, +0xa8, +0x55, +0x16, +0xf1, +0xc6, +0x50, +0xe9, +0x87, +0x89, +0xf6, +0xcf, +0xd8, +0x9c, +0x51, +0xa7, +0xbc, +0x5b, +0x31, +0x6d, +0x4d, +0x51, +0xd0, +0x4c, +0xbc, +0x0d, +0x58, +0x2d, +0x7b, +0x88, +0x7a, +0xf9, +0x8e, +0xd6, +0x40, +0x4d, +0xbb, +0xbe, +0xc4, +0xe5, +0x07, +0xfc, +0xd9, +0x7b, +0x6d, +0xa6, +0x42, +0x57, +0x8f, +0x02, +0x94, +0x4f, +0xe4, +0x2a, +0x65, +0xe2, +0x19, +0x5a, +0x50, +0xe1, +0x25, +0x65, +0x4a, +0x60, +0xc2, +0xcd, +0xa8, +0xec, +0x05, +0x2e, +0x87, +0x7b, +0x95, +0xb7, +0x4f, +0xa0, +0x0b, +0x1b, +0x4a, +0x7f, +0x92, +0xc8, +0x90, +0xee, +0x89, +0x1e, +0x10, +0xd2, +0x85, +0xe4, +0x9f, +0x63, +0xc8, +0x12, +0xbb, +0x4e, +0xb8, +0xcf, +0x0a, +0xec, +0x18, +0x4e, +0xe6, +0x7c, +0xb3, +0x33, +0x26, +0xc7, +0x1f, +0xd2, +0x04, +0x23, +0xea, +0x07, +0x0c, +0x5f, +0x90, +0xbd, +0xa7, +0x6a, +0x0f, +0x4a, +0xd6, +0x10, +0x01, +0x3c, +0x12, +0x29, +0x2e, +0x96, +0xc0, +0x4d, +0xbb, +0xbe, +0xe5, +0xa7, +0x83, +0xd5, +0x6a, +0x3c, +0xe3, +0x5b, +0xb8, +0xf2, +0x5c, +0x6d, +0x1f, +0xa6, +0xf3, +0x12, +0x24, +0xf6, +0xd6, +0x3b, +0x10, +0x14, +0x09, +0x07, +0x82, +0xe8, +0x30, +0x6a, +0x99, +0xdc, +0x95, +0x01, +0x9c, +0xd4, +0x68, +0x3b, +0xca, +0x98, +0x12, +0xab, +0x77, +0x25, +0x15, +0x7d, +0x10, +0x32, +0x45, +0x98, +0xcd, +0x7a, +0xdf, +0x71, +0x8a, +0x75, +0xc1, +0x1c, +0xd4, +0x68, +0x25, +0xeb, +0xbb, +0x54, +0x27, +0x6f, +0x2a, +0xf7, +0xb9, +0x98, +0x03, +0x27, +0xde, +0x24, +0xa8, +0xbb, +0x98, +0xc2, +0x84, +0xff, +0x9b, +0x51, +0xd8, +0x53, +0x50, +0xda, +0xf5, +0x88, +0xaa, +0x87, +0x2f, +0xae, +0xd6, +0xea, +0x6b, +0xde, +0xc8, +0xd7, +0xa7, +0x28, +0x65, +0x81, +0xe8, +0xb2, +0x3b, +0x1d, +0x4f, +0x75, +0x8f, +0x9f, +0x7a, +0x74, +0x8e, +0xc1, +0x5f, +0x9a, +0xa8, +0x9d, +0xfa, +0x03, +0xa3, +0x71, +0x9b, +0x37, +0x6d, +0xd5, +0x0b, +0xf5, +0xe1, +0xa1, +0x1b, +0x01, +0x6a, +0xc6, +0x67, +0xaa, +0xea, +0x2c, +0x9d, +0xa4, +0xd2, +0x6e, +0xfc, +0xde, +0x2e, +0x7f, +0x94, +0x69, +0xe5, +0x4a, +0xe0, +0x01, +0x48, +0x3c, +0x6b, +0xf7, +0x1e, +0xb6, +0x0b, +0x5f, +0xf9, +0x2e, +0x07, +0xc5, +0xe8, +0xae, +0x37, +0x1b, +0xbc, +0x3c, +0xd8, +0xd5, +0x0b, +0x91, +0x9e, +0x80, +0x24, +0xf5, +0x06, +0x0c, +0x0e, +0x98, +0x07, +0x96, +0x2d, +0x19, +0xdc, +0x58, +0x93, +0xcc, +0xfb, +0x4e, +0xeb, +0xbd, +0x0f, +0xf5, +0xaf, +0x01, +0xfa, +0xf1, +0x7c, +0x43, +0x8c, +0xb8, +0x56, +0x3e, +0xbe, +0x77, +0x4e, +0x2b, +0xf7, +0xbb, +0xb7, +0x45, +0x47, +0xcd, +0xcc, +0xa6, +0x4c, +0x72, +0x7b, +0x6a, +0x2a, +0x70, +0x13, +0x07, +0xfd, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x23, +0x67, +0x5b, +0x34, +0xd5, +0x14, +0x0c, +0xab, +0x77, +0x1f, +0xf8, +0x3d, +0x5a, +0x9f, +0x92, +0xb7, +0x2c, +0xad, +0x31, +0xde, +0x61, +0x07, +0xb3, +0x6b, +0xf7, +0x38, +0x15, +0x95, +0x46, +0x14, +0x48, +0x53, +0x69, +0x52, +0x66, +0x07, +0x6d, +0x83, +0x71, +0x8a, +0x67, +0x25, +0x20, +0x0f, +0xfe, +0xd7, +0x02, +0xd7, +0x6e, +0x2c, +0xd2, +0x1a, +0x0a, +0x5d, +0xfd, +0x0f, +0x74, +0xe3, +0xa4, +0x36, +0x07, +0x9a, +0xdf, +0xd4, +0x79, +0xbf, +0xef, +0x59, +0xc0, +0x44, +0x52, +0x87, +0x9a, +0x6e, +0x1d, +0x0e, +0xee, +0xde, +0x2e, +0x1a, +0xa9, +0x8f, +0x3a, +0xc9, +0xba, +0xec, +0x99, +0x78, +0x2d, +0x55, +0x6b, +0x14, +0xc2, +0x06, +0xd5, +0xfc, +0x93, +0x53, +0x4d, +0x11, +0x8c, +0xf8, +0xfa, +0x79, +0x7c, +0xa6, +0x64, +0xae, +0x61, +0xb8, +0x7b, +0x94, +0x56, +0xa6, +0x39, +0x78, +0x9a, +0xe5, +0xc7, +0xdf, +0x18, +0x63, +0x23, +0x9c, +0xfa, +0x66, +0xbb, +0xb7, +0x5a, +0x27, +0x4c, +0xd1, +0xa1, +0x83, +0x22, +0xb3, +0x52, +0x49, +0x35, +0xb0, +0x22, +0x83, +0x59, +0x12, +0x00, +0x16, +0x98, +0xdd, +0xad, +0xc2, +0x94, +0xf9, +0xd3, +0x7b, +0x64, +0x7f, +0x44, +0x3e, +0x3c, +0x8b, +0x9a, +0x83, +0x9c, +0x69, +0x6b, +0xe4, +0xdf, +0x9f, +0xed, +0x54, +0x1f, +0xe5, +0x5d, +0x7a, +0x05, +0x82, +0xb3, +0xdd, +0xef, +0xfc, +0x53, +0x96, +0xb0, +0x2c, +0x5a, +0xf8, +0xdf, +0x9c, +0x8b, +0x16, +0x4e, +0xdf, +0xda, +0x4d, +0x09, +0x09, +0x69, +0x50, +0x03, +0x65, +0xd8, +0x73, +0x70, +0xe8, +0x86, +0xbf, +0xbb, +0x35, +0xce, +0xb2, +0x46, +0xcb, +0x02, +0x00, +0x5b, +0xb4, +0xe2, +0xc6, +0x8f, +0x2f, +0x98, +0xaf, +0x87, +0x4b, +0x48, +0x45, +0xed, +0xcc, +0x1d, +0xe6, +0x58, +0xd6, +0xf2, +0x50, +0x25, +0x9f, +0x52, +0xc7, +0xcb, +0x8a, +0x17, +0x9d, +0x5b, +0xe5, +0xc8, +0xd7, +0x72, +0xb7, +0x52, +0xb2, +0xc4, +0x98, +0xe3, +0x7a, +0x17, +0x3e, +0xc6, +0x60, +0xa7, +0x97, +0xb0, +0xcf, +0x18, +0x81, +0x53, +0x84, +0x4c, +0xd5, +0x17, +0x32, +0x03, +0x13, +0x39, +0x51, +0x09, +0x10, +0xe3, +0x77, +0x49, +0x4f, +0x62, +0x01, +0xbf, +0x8c, +0x9a, +0xe0, +0x41, +0x9e, +0x89, +0x74, +0x36, +0xf9, +0x96, +0x86, +0x2e, +0x96, +0x1c, +0x4a, +0xb7, +0x2b, +0x4a, +0x97, +0xbc, +0x99, +0x40, +0xa3, +0xe0, +0x3d, +0xc8, +0xad, +0x2f, +0xdf, +0x4f, +0x2c, +0xc4, +0x69, +0x82, +0x9f, +0x9b, +0x81, +0x0c, +0x61, +0x5c, +0xa5, +0x9d, +0x8c, +0x89, +0xc0, +0x2c, +0xb4, +0x4a, +0x33, +0x4e, +0xeb, +0xa2, +0x56, +0x40, +0xc0, +0xc2, +0x46, +0xaf, +0x6a, +0xfc, +0x67, +0xd1, +0x80, +0x5e, +0xc5, +0x6d, +0x84, +0x43, +0x27, +0x3f, +0x55, +0x15, +0x96, +0x6a, +0xa0, +0xa5, +0xda, +0xb7, +0xff, +0xb7, +0x75, +0x6e, +0x4c, +0x49, +0x91, +0x9d, +0x22, +0xa3, +0x46, +0xea, +0xed, +0x9a, +0x00, +0xe2, +0x32, +0xc3, +0xd6, +0xa9, +0x71, +0x20, +0x55, +0xa3, +0x19, +0xed, +0xf8, +0x4f, +0xa7, +0x12, +0x9c, +0x66, +0x87, +0xaf, +0x4e, +0xb7, +0xf0, +0xdb, +0xbf, +0xef, +0xf0, +0xf6, +0xaf, +0xea, +0xda, +0x09, +0xfe, +0xde, +0x38, +0x5c, +0xa5, +0xa2, +0xdf, +0x99, +0x45, +0xa8, +0xe4, +0xe7, +0x92, +0xac, +0x67, +0xaa, +0x4f, +0xbf, +0x77, +0x3e, +0xa2, +0x40, +0x49, +0x22, +0x4a, +0x1e, +0x3b, +0xaa, +0x70, +0x7f, +0x95, +0xaf, +0x37, +0x4b, +0xfc, +0x99, +0xe2, +0xe0, +0xba, +0xd7, +0x34, +0xce, +0x55, +0x88, +0x5b, +0x84, +0x1b, +0x57, +0xc4, +0x80, +0x03, +0x53, +0xc9, +0x2f, +0x93, +0x04, +0x4d, +0xd5, +0x96, +0xe5, +0x70, +0xa6, +0x6e, +0x63, +0x5d, +0x9d, +0x6c, +0xdb, +0x02, +0x0a, +0xa9, +0xda, +0x8b, +0x53, +0xdc, +0xd9, +0x9a, +0xc5, +0x94, +0x2c, +0x91, +0x92, +0x2a, +0xde, +0xbb, +0x8b, +0x13, +0xb9, +0x19, +0x96, +0x64, +0xcc, +0xf2, +0x64, +0x39, +0xb7, +0x75, +0x49, +0xe9, +0x86, +0xc2, +0x86, +0x62, +0xd9, +0x24, +0xd3, +0x81, +0x35, +0x49, +0xfc, +0xa0, +0xa5, +0xa0, +0x93, +0x05, +0x64, +0xb4, +0x1a, +0x57, +0xce, +0x0c, +0x90, +0x02, +0x27, +0xc5, +0x7a, +0x2b, +0x5d, +0xae, +0x3e, +0xd5, +0xdd, +0x10, +0x7c, +0x14, +0xea, +0x3a, +0x08, +0xac, +0x72, +0x4e, +0x90, +0x3d, +0x3b, +0x7c, +0x86, +0x2e, +0xeb, +0xd4, +0x06, +0x70, +0xe6, +0xc7, +0xfb, +0x5f, +0xbd, +0x18, +0xf4, +0x11, +0xa4, +0x1a, +0x93, +0xc3, +0xbe, +0xd9, +0xfb, +0x26, +0x48, +0x2f, +0x37, +0x3c, +0xd0, +0x03, +0x47, +0x1a, +0xf7, +0x62, +0x19, +0x24, +0x5c, +0xf4, +0xa8, +0x92, +0x20, +0x7a, +0xf2, +0x9e, +0x2a, +0xc5, +0x95, +0xa2, +0xfb, +0xa4, +0xea, +0x85, +0xd8, +0x56, +0xb7, +0x70, +0xd1, +0x60, +0x30, +0xa5, +0x30, +0x82, +0x70, +0xdc, +0x7a, +0x65, +0x8a, +0x36, +0x3f, +0x5b, +0x0c, +0xae, +0x54, +0x7c, +0xd3, +0x57, +0x84, +0x7b, +0x3a, +0x65, +0x18, +0x81, +0xee, +0x05, +0x9b, +0x44, +0x4d, +0xb8, +0xda, +0xa2, +0xa1, +0xc9, +0x15, +0xd3, +0x73, +0x03, +0x0e, +0x43, +0xe9, +0x8e, +0x15, +0xf9, +0xbe, +0xc6, +0xc5, +0x8a, +0xe5, +0xc0, +0x1e, +0xc2, +0x37, +0x9e, +0x2a, +0x26, +0xa5, +0xa0, +0xbd, +0x24, +0x5f, +0xb9, +0xc1, +0xab, +0x34, +0x48, +0xb9, +0x5d, +0x98, +0xb4, +0x65, +0x18, +0xf3, +0x63, +0x19, +0x44, +0x1b, +0x11, +0x16, +0xff, +0xdc, +0xf1, +0x79, +0x08, +0x86, +0x0f, +0x52, +0x98, +0x73, +0xc4, +0x92, +0x90, +0x2b, +0x47, +0x09, +0xd0, +0x43, +0x6c, +0x2f, +0x20, +0xeb, +0xdc, +0xda, +0xc5, +0x08, +0x7b, +0x94, +0x42, +0x30, +0x6a, +0xc7, +0xda, +0x8c, +0xc3, +0x76, +0xa7, +0xa5, +0xcc, +0x62, +0x13, +0x00, +0x60, +0x31, +0x58, +0x44, +0x9b, +0xf5, +0x64, +0x14, +0xf5, +0x11, +0xc5, +0x54, +0x52, +0x83, +0xd4, +0x73, +0x01, +0x16, +0x0e, +0xb3, +0x7a, +0x29, +0x69, +0x35, +0x56, +0xd4, +0xee, +0x8a, +0x17, +0xa2, +0x99, +0x24, +0x9c, +0xd7, +0x8f, +0xdb, +0x55, +0xb5, +0x3e +}; diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/config.h b/keyboards/htx_studio/one_handed_keyboard_mr/config.h new file mode 100644 index 00000000000..4c4d55b7903 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/config.h @@ -0,0 +1,25 @@ +#pragma once + +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MISO_PIN A6 +#define SPI_MOSI_PIN A7 + +#define POINTING_DEVICE_CS_PIN A4 +#define POINTING_DEVICE_MOTION_PIN A3 +#define POINTING_DEVICE_TASK_THROTTLE_MS 1 + +#define ENCODER_RESOLUTION 2 + +#ifdef RGB_MATRIX_ENABLE + +#define WS2812_BITBANG_NOP_FUDGE 0 +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 1 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP + +#endif + + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/halconf.h b/keyboards/htx_studio/one_handed_keyboard_mr/halconf.h new file mode 100644 index 00000000000..111ec84f282 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/halconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #define HAL_USE_PWM TRUE + #define HAL_USE_SPI TRUE + #define SPI_USE_WAIT TRUE + #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + + #include_next + \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json new file mode 100644 index 00000000000..927c8b4dfe9 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json @@ -0,0 +1,232 @@ +{ + "keyboard_name": "One-Handed_Keyboard_MR", + "manufacturer": "HTXStudio", + "url": "https://github.com/htx-studio", + "maintainer": "HTXStudio", + "usb": { + "vid": "0x475D", + "pid": "0x03BF", + "device_version": "3.1.0" + }, + "processor": "STM32G431", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "matrix": { + "rows": 6, + "cols": 14 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true, + "encoder": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10"} + ] + }, + "ws2812": { + "pin": "B4", + "driver": "pwm" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, + {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, + {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, + {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, + {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, + {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, + {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, + {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, + {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, + {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, + {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, + {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, + {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, + {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, + + {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, + {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, + {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, + {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, + {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, + {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, + {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, + {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, + {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, + {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, + {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, + {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, + {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, + {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, + + {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, + {"matrix": [2, 1], "w":1, "h":1, "x":2, "y":2}, + {"matrix": [2, 2], "w":1, "h":1, "x":3, "y":2}, + {"matrix": [2, 3], "w":1, "h":1, "x":4, "y":2}, + {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, + {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, + {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, + {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, + {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, + {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, + {"matrix": [2, 11], "w":1.5, "h":1, "x":11, "y":2}, + {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, + + {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, + {"matrix": [3, 2], "w":1, "h":1, "x":3, "y":3}, + {"matrix": [3, 3], "w":1, "h":1, "x":4, "y":3}, + {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, + {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, + {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, + {"matrix": [3, 9], "w":1, "h":1, "x":8, "y":3}, + {"matrix": [3, 10], "w":1, "h":1, "x":9, "y":3}, + {"matrix": [3, 11], "w":2, "h":1, "x":10, "y":3}, + {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, + + {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, + {"matrix": [4, 2], "w":1.25, "h":1, "x":2.5, "y":4}, + {"matrix": [4, 3], "w":1.25, "h":1, "x":3.75, "y":4}, + {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, + {"matrix": [4, 7], "w":1.25, "h":1, "x":6.25, "y":4}, + {"matrix": [4, 9], "w":1.25, "h":1, "x":7.5, "y":4}, + {"matrix": [4, 10], "w":1.25, "h":1, "x":8.75, "y":4}, + {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, + {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, + + {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, + {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, + {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, + {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, + {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + ] + } + + }, + "rgb_matrix": { + "driver": "ws2812", + "max_brightness": 110, + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + {"matrix": [0,0], "flags":4, "x":0, "y":0}, + {"matrix": [0,1], "flags":4, "x":17, "y":0}, + {"matrix": [0,2], "flags":4, "x":34, "y":0}, + {"matrix": [0,3], "flags":4, "x":51, "y":0}, + {"matrix": [0,4], "flags":4, "x":68, "y":0}, + {"matrix": [0,5], "flags":4, "x":85, "y":0}, + {"matrix": [0,6], "flags":4, "x":102, "y":0}, + {"matrix": [0,7], "flags":4, "x":119, "y":0}, + {"matrix": [0,8], "flags":4, "x":136, "y":0}, + {"matrix": [0,9], "flags":4, "x":153, "y":0}, + {"matrix": [0,10], "flags":4, "x":170, "y":0}, + {"matrix": [0,11], "flags":4, "x":187, "y":0}, + {"matrix": [0,12], "flags":4, "x":204, "y":0}, + {"matrix": [0,13], "flags":4, "x":221, "y":0}, + + {"matrix": [1,0], "flags":4, "x":0, "y":16}, + {"matrix": [1,1], "flags":4, "x":17, "y":16}, + {"matrix": [1,2], "flags":4, "x":34, "y":16}, + {"matrix": [1,3], "flags":4, "x":51, "y":16}, + {"matrix": [1,4], "flags":4, "x":68, "y":16}, + {"matrix": [1,5], "flags":4, "x":85, "y":16}, + {"matrix": [1,6], "flags":4, "x":102, "y":16}, + {"matrix": [1,7], "flags":4, "x":119, "y":16}, + {"matrix": [1,8], "flags":4, "x":136, "y":16}, + {"matrix": [1,9], "flags":4, "x":153, "y":16}, + {"matrix": [1,10], "flags":4, "x":170, "y":16}, + {"matrix": [1,11], "flags":4, "x":187, "y":16}, + {"matrix": [1,12], "flags":4, "x":204, "y":16}, + {"matrix": [1,13], "flags":4, "x":221, "y":16}, + + {"matrix": [2,0], "flags":4, "x":3, "y":32}, + {"matrix": [2,1], "flags":4, "x":23, "y":32}, + {"matrix": [2,2], "flags":4, "x":40, "y":32}, + {"matrix": [2,3], "flags":4, "x":57, "y":32}, + {"matrix": [2,5], "flags":4, "x":74, "y":32}, + {"matrix": [2,6], "flags":4, "x":91, "y":32}, + {"matrix": [2,7], "flags":4, "x":108, "y":32}, + {"matrix": [2,8], "flags":4, "x":125, "y":32}, + {"matrix": [2,9], "flags":4, "x":142, "y":32}, + {"matrix": [2,10], "flags":4, "x":159, "y":32}, + {"matrix": [2,11], "flags":4, "x":176, "y":32}, + {"matrix": [2,13], "flags":4, "x":200, "y":32}, + + {"matrix": [3,0], "flags":4, "x":21, "y":48}, + {"matrix": [3,2], "flags":4, "x":42, "y":48}, + {"matrix": [3,3], "flags":4, "x":62, "y":48}, + {"matrix": [3,5], "flags":4, "x":81, "y":48}, + {"matrix": [3,6], "flags":4, "x":100, "y":48}, + {"matrix": [3,7], "flags":4, "x":119, "y":48}, + {"matrix": [3,9], "flags":4, "x":138, "y":48}, + {"matrix": [3,10], "flags":4, "x":157, "y":48}, + {"matrix": [3,11], "flags":4, "x":176, "y":48}, + {"matrix": [3,13], "flags":4, "x":200, "y":48}, + + {"matrix": [4,0], "flags":4, "x":24, "y":64}, + {"matrix": [4,2], "flags":4, "x":64, "y":64}, + {"matrix": [4,3], "flags":4, "x":95, "y":64}, + {"matrix": [4,5], "flags":4, "x":116, "y":64}, + {"matrix": [4,7], "flags":4, "x":137, "y":64}, + {"matrix": [4,9], "flags":4, "x":158, "y":64}, + {"matrix": [4,10], "flags":4, "x":179, "y":64}, + {"matrix": [4,12], "flags":4, "x":200, "y":64}, + {"matrix": [4,13], "flags":4, "x":221, "y":64} + ], + "sleep": true + } +} + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c new file mode 100644 index 00000000000..fe52b65318c --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ +// ┃ ESC ┃ `~ ┃ 1 ┃ 2 ┃ 3 ┃ 4 ┃ 5 ┃ 6 ┃ 7 ┃ 8 ┃ 9 ┃ 0 ┃ - ┃ + ┃ +// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ +// ┃ TAB ┃ ;: ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [ ┃ ] ┃ +// ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ +// ┃ CAPSLOCK ┃ '" ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ENTER ┃ +// ┗━━━┳━━━━━━━┻━━┳━━━━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━━━┻━━━━━━━┳━━━┛ +// ┃ MOUSE1 ┃ MOUSE2 ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ SHIFT ┃ +// ┗━━━┳━━━━━━┻━┳━━━━━━━━┻━━━━━━┳┻━━━━━━━╋━━━━━━━┻┳━━━━━━┻━┳━━━━━┻━━┳━━━━┻━━━┳━━━┻━━━━┳━━━━━━━━┳━━━┛ +// ┃ BSPC ┃ SPC ┃ MO(1) ┃ <, ┃ >. ┃ ?/ ┃ LGUI ┃ LALT ┃ CTRL ┃ +// ┗━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┛ +// ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ +// ┃ MOUSE3 ┃ → ┃ ↓ ┃ ← ┃ ↑ ┃ +// ┗━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛ + + [0] = LAYOUT( + KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, + KC_TAB, KC_SEMICOLON, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, + KC_CAPS_LOCK, KC_QUOTE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENTER, + QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LEFT_SHIFT, + KC_BSPC, KC_SPC, MO(1), KC_COMMA, KC_DOT, KC_SLASH, KC_LEFT_GUI, KC_LEFT_ALT, KC_LEFT_CTRL, + QK_MOUSE_BUTTON_3, KC_RIGHT, KC_DOWN, KC_LEFT, KC_UP + ), + +// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ +// ┃ ┃ ┃ F1 ┃ F2 ┃ F3 ┃ F4 ┃ F5 ┃ F6 ┃ F7 ┃ F8 ┃ F9 ┃ F10 ┃ F11 ┃ F12 ┃ +// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ +// ┃ ┃ ┃ ┃RM_HUEU┃RM_HUED┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ +// ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ +// ┃ ┃ ┃ ┃RM_SATU┃RM_SATD┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ +// ┗━━━┳━━━━━━━┻━━┳━━━━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━━━┻━━━━━━━┳━━━┛ +// ┃ MOUSE1 ┃ MOUSE2 ┃RM_SPDU┃RM_SPDD┃ ┃ ┃ ┃ ┃ ┃ ┃ +// ┗━━━┳━━━━━━┻━┳━━━━━━━━┻━━━━━━┳┻━━━━━━━╋━━━━━━━┻┳━━━━━━┻━┳━━━━━┻━━┳━━━━┻━━━┳━━━┻━━━━┳━━━━━━━━┳━━━┛ +// ┃ DEL ┃ RM_TOGG ┃ ┃ ┃ ┃ \| ┃ ┃ ┃ ┃ +// ┗━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┛ +// ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ +// ┃ MOUSE3 ┃ RM_PREV ┃ RM_VALD ┃ RM_NEXT ┃ RM_VALU ┃ +// ┗━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛ + + [1] = LAYOUT( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, RM_HUEU, RM_HUED, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RM_SATU, RM_SATD, _______, _______, _______, _______, _______, _______, _______, + QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, RM_SPDU, RM_SPDD, _______, _______, _______, _______, _______, _______, + KC_DEL, RM_TOGG, _______, _______, _______, KC_BSLS, _______, _______, _______, + QK_MOUSE_BUTTON_3, RM_PREV, RM_VALD, RM_NEXT, RM_VALU + ), +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(MS_WHLD, MS_WHLU)}, + [1] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)} +}; +#endif diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk new file mode 100644 index 00000000000..08f4783a51c --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += adns.c +SPI_DRIVER_REQUIRED = yes +ENCODER_MAP_ENABLE = yes +RGB_MATRIX_ENABLE = yes +WS2812_DRIVER = pwm + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h new file mode 100644 index 00000000000..348aebd3014 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h @@ -0,0 +1,27 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +/* enable TIM3, used for RGB LED PWM driver */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/readme.md b/keyboards/htx_studio/one_handed_keyboard_mr/readme.md new file mode 100644 index 00000000000..5c7cb56993e --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/readme.md @@ -0,0 +1,29 @@ +# One-Handed_Keyboard_MR + +![右手大键盘](https://imgur.com/y5O0E2E.jpg) + +This is a keyboard with a fan-shaped layout and 59 keys.The commonly used buttons are placed near the thumb. + +* Keyboard Maintainer:[HTX Studio](https://github.com/htx-studio) +* Hardware Supported:HTX_STUDIO_ONE-HANDEN_KEYBOARD_MR PCB +* Hardware Availability:[One-Handed-Keyboard](https://github.com/htx-studio/One-Handed-Keyboard/tree/main/Hardware) + +## How to compile + +Make example for this keyboard (after setting up your build environment): + + `make htx_studio/one_handed_keyboard_mr:default` + +Flashing example for this keyboard: + + `make htx_studio/one_handed_keyboard_mr:default:flash` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Hold the "B" button on the back of the PCB (the one closest to the MCU) and briefly press the "R" button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns.c b/keyboards/htx_studio/one_handed_keyboard_sl/adns.c new file mode 100644 index 00000000000..32703a65c46 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/adns.c @@ -0,0 +1,254 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#include "spi_master.h" +#include "adns.h" +#include "debug.h" +#include "wait.h" +#include "pointing_device.h" +#include "adns9800_srom_A6.h" + +// registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Pixel_Sum 0x08 +#define REG_Maximum_Pixel 0x09 +#define REG_Minimum_Pixel 0x0a +#define REG_Shutter_Lower 0x0b +#define REG_Shutter_Upper 0x0c +#define REG_Frame_Period_Lower 0x0d +#define REG_Frame_Period_Upper 0x0e +#define REG_Configuration_I 0x0f +#define REG_Configuration_II 0x10 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate 0x15 +#define REG_Rest1_Downshift 0x16 +#define REG_Rest2_Rate 0x17 +#define REG_Rest2_Downshift 0x18 +#define REG_Rest3_Rate 0x19 +#define REG_Frame_Period_Max_Bound_Lower 0x1a +#define REG_Frame_Period_Max_Bound_Upper 0x1b +#define REG_Frame_Period_Min_Bound_Lower 0x1c +#define REG_Frame_Period_Min_Bound_Upper 0x1d +#define REG_Shutter_Max_Bound_Lower 0x1e +#define REG_Shutter_Max_Bound_Upper 0x1f +#define REG_LASER_CTRL0 0x20 +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_SROM_ID 0x2a +#define REG_Lift_Detection_Thr 0x2e +#define REG_Configuration_V 0x2f +#define REG_Configuration_IV 0x39 +#define REG_Power_Up_Reset 0x3a +#define REG_Shutdown 0x3b +#define REG_Inverse_Product_ID 0x3f +#define REG_Motion_Burst 0x50 +#define REG_SROM_Load_Burst 0x62 +#define REG_Pixel_Burst 0x64 + +// pins +#define NCS A4 + +extern const uint16_t firmware_length; +extern const uint8_t firmware_data[]; + +enum motion_burst_propertr{ + motion = 0, + observation, + delta_x_l, + delta_x_h, + delta_y_l, + delta_y_h, + squal, + pixel_sum, + maximum_pixel, + minimum_pixel, + shutter_upper, + shutter_lower, + frame_period_upper, + frame_period_lower, + end_data +}; + +void adns_begin(void){ + spi_start(NCS, false, 3, 8); +} + +void adns_end(void){ + spi_stop(); +} + +void adns_write(uint8_t reg_addr, uint8_t data){ + + adns_begin(); + //send address of the register, with MSBit = 1 to indicate it's a write + spi_write(reg_addr | 0x80 ); + spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + adns_end(); +} + +uint8_t adns_read(uint8_t reg_addr){ + + + adns_begin(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f ); + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + adns_end(); + return data; +} + +void pointing_device_init(void) { + dprint("STARTING INTI\n"); + + spi_init(); + // reset serial port + adns_begin(); + adns_end(); + + // reboot + adns_write(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + // read registers and discard + adns_read(REG_Motion); + adns_read(REG_Delta_X_L); + adns_read(REG_Delta_X_H); + adns_read(REG_Delta_Y_L); + adns_read(REG_Delta_Y_H); + + // upload firmware + + // set the configuration_IV register in 3k firmware mode + // bit 1 = 1 for 3k mode, other bits are reserved + adns_write(REG_Configuration_IV, 0x02); + + // write 0x1d in SROM_enable reg for initializing + adns_write(REG_SROM_Enable, 0x1d); + + // wait for more than one frame period + // assume that the frame rate is as low as 100fps... even if it should never be that low + wait_ms(10); + + // write 0x18 to SROM_enable to start SROM download + adns_write(REG_SROM_Enable, 0x18); + + // write the SROM file (=firmware data) + + // write burst destination adress + adns_begin(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + // send all bytes of the firmware + unsigned char c; + for(int i = 0; i < firmware_length; i++){ + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + + adns_end(); + wait_ms(10); + + // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) + // reading the actual value of the register is important because the real + // default value is different from what is said in the datasheet, and if you + // change the reserved bytes (like by writing 0x00...) it would not work. + uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); + adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); + + wait_ms(1); + + // set the configuration_I register to set the CPI + // 0x01 = 50, minimum + // 0x44 = 3400, default + // 0x8e = 7100 + // 0xA4 = 8200, maximum + adns_write(REG_Configuration_I, 0x30); + + wait_ms(100); + dprint("INIT ENDED\n"); +} + +int16_t convertDeltaToInt(uint8_t high, uint8_t low){ + + // join bytes into twos compliment + //int16_t twos_comp = (high << 8) | low; + //return twos_comp; + return (high << 8) | low; +} + +motion_delta_t readSensor(void) { + adns_begin(); + + // read from Motion_Burst to enable burt mode + spi_write(REG_Motion_Burst & 0x7f); + + // Wait one frame per docs, thanks u/kbjunky + wait_us(100); + uint8_t burst_data[pixel_sum]; + + for (int i = 0; i < pixel_sum; ++i) { + burst_data[i] = spi_read(); + } + + uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); + uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); + // Only consider the MSB for motion as this byte has other status bits + uint8_t motion_ind = burst_data[motion] & 0b10000000; + adns_end(); + + motion_delta_t delta = {delta_x, delta_y, motion_ind}; + return delta; +} + +bool pointing_device_task(void) { + motion_delta_t delta = readSensor(); + + report_mouse_t report = pointing_device_get_report(); + + if(delta.motion_ind) { + // clamp deltas from -127 to 127 + report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; + report.x = -report.x; + report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; + } + + pointing_device_set_report(report); + return pointing_device_send(); +} diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns.h b/keyboards/htx_studio/one_handed_keyboard_sl/adns.h new file mode 100644 index 00000000000..e557aeb2ece --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/adns.h @@ -0,0 +1,38 @@ +/* Copyright 2020 Richard Sutherland + * + * 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 . + */ +#pragma once + +#include + +void adns_begin(void); + +void adns_end(void); + +void adns_write(uint8_t reg_addr, uint8_t data); + +uint8_t adns_read(uint8_t reg_addr); + + +int16_t convertDeltaToInt(uint8_t high, uint8_t low); + +struct _motion_delta { + int16_t delta_x; + int16_t delta_y; + int8_t motion_ind; +}; +typedef struct _motion_delta motion_delta_t; + +motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h new file mode 100644 index 00000000000..fddf30589d4 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h @@ -0,0 +1,3081 @@ +// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. +// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk + +#pragma once + +#include "progmem.h" + +const uint16_t firmware_length = 3070; + +const uint8_t firmware_data[] PROGMEM = { + 0x03, +0xa6, +0x68, +0x1e, +0x7d, +0x10, +0x7e, +0x7e, +0x5f, +0x1c, +0xb8, +0xf2, +0x47, +0x0c, +0x7b, +0x74, +0x4b, +0x14, +0x8b, +0x75, +0x66, +0x51, +0x0b, +0x8c, +0x76, +0x74, +0x4b, +0x14, +0xaa, +0xd6, +0x0f, +0x9c, +0xba, +0xf6, +0x6e, +0x3f, +0xdd, +0x38, +0xd5, +0x02, +0x80, +0x9b, +0x82, +0x6d, +0x58, +0x13, +0xa4, +0xab, +0xb5, +0xc9, +0x10, +0xa2, +0xc6, +0x0a, +0x7f, +0x5d, +0x19, +0x91, +0xa0, +0xa3, +0xce, +0xeb, +0x3e, +0xc9, +0xf1, +0x60, +0x42, +0xe7, +0x4c, +0xfb, +0x74, +0x6a, +0x56, +0x2e, +0xbf, +0xdd, +0x38, +0xd3, +0x05, +0x88, +0x92, +0xa6, +0xce, +0xff, +0x5d, +0x38, +0xd1, +0xcf, +0xef, +0x58, +0xcb, +0x65, +0x48, +0xf0, +0x35, +0x85, +0xa9, +0xb2, +0x8f, +0x5e, +0xf3, +0x80, +0x94, +0x97, +0x7e, +0x75, +0x97, +0x87, +0x73, +0x13, +0xb0, +0x8a, +0x69, +0xd4, +0x0a, +0xde, +0xc1, +0x79, +0x59, +0x36, +0xdb, +0x9d, +0xd6, +0xb8, +0x15, +0x6f, +0xce, +0x3c, +0x72, +0x32, +0x45, +0x88, +0xdf, +0x6c, +0xa5, +0x6d, +0xe8, +0x76, +0x96, +0x14, +0x74, +0x20, +0xdc, +0xf4, +0xfa, +0x37, +0x6a, +0x27, +0x32, +0xe3, +0x29, +0xbf, +0xc4, +0xc7, +0x06, +0x9d, +0x58, +0xe7, +0x87, +0x7c, +0x2e, +0x9f, +0x6e, +0x49, +0x07, +0x5d, +0x23, +0x64, +0x54, +0x83, +0x6e, +0xcb, +0xb7, +0x77, +0xf7, +0x2b, +0x6e, +0x0f, +0x2e, +0x66, +0x12, +0x60, +0x55, +0x65, +0xfc, +0x43, +0xb3, +0x58, +0x73, +0x5b, +0xe8, +0x67, +0x04, +0x43, +0x02, +0xde, +0xb3, +0x89, +0xa0, +0x6d, +0x3a, +0x27, +0x79, +0x64, +0x5b, +0x0c, +0x16, +0x9e, +0x66, +0xb1, +0x8b, +0x87, +0x0c, +0x5d, +0xf2, +0xb6, +0x3d, +0x71, +0xdf, +0x42, +0x03, +0x8a, +0x06, +0x8d, +0xef, +0x1d, +0xa8, +0x96, +0x5c, +0xed, +0x31, +0x61, +0x5c, +0xa1, +0x34, +0xf6, +0x8c, +0x08, +0x60, +0x33, +0x07, +0x00, +0x3e, +0x79, +0x95, +0x1b, +0x43, +0x7f, +0xfe, +0xb6, +0xa6, +0xd4, +0x9d, +0x76, +0x72, +0xbf, +0xad, +0xc0, +0x15, +0xe8, +0x37, +0x31, +0xa3, +0x72, +0x63, +0x52, +0x1d, +0x1c, +0x5d, +0x51, +0x1b, +0xe1, +0xa9, +0xed, +0x60, +0x32, +0x3e, +0xa9, +0x50, +0x28, +0x53, +0x06, +0x59, +0xe2, +0xfc, +0xe7, +0x02, +0x64, +0x39, +0x21, +0x56, +0x4a, +0xa5, +0x40, +0x80, +0x81, +0xd5, +0x5a, +0x60, +0x7b, +0x68, +0x84, +0xf1, +0xe0, +0xb1, +0xb6, +0x5b, +0xdf, +0xa8, +0x1d, +0x6d, +0x65, +0x20, +0xc0, +0xa2, +0xb9, +0xd9, +0xbb, +0x00, +0xa6, +0xdb, +0x8b, +0x01, +0x53, +0x91, +0xfe, +0xc4, +0x51, +0x85, +0xb0, +0x96, +0x7f, +0xfd, +0x51, +0xdd, +0x14, +0x03, +0x67, +0x2e, +0x75, +0x1c, +0x76, +0xd3, +0x6e, +0xdd, +0x99, +0x55, +0x76, +0xe5, +0xab, +0x23, +0xfc, +0x4a, +0xd5, +0xc6, +0xe8, +0x2e, +0xca, +0x8a, +0xb3, +0xf6, +0x8c, +0x6c, +0xb0, +0xe9, +0xf2, +0xe7, +0x9e, +0x69, +0x41, +0xed, +0xf1, +0x6d, +0xd2, +0x86, +0xd8, +0x7e, +0xcb, +0x5d, +0x47, +0x6c, +0x85, +0x6a, +0x23, +0xed, +0x20, +0x40, +0x93, +0xb4, +0x20, +0xc7, +0xa5, +0xc9, +0xaf, +0x03, +0x15, +0xac, +0x19, +0xe5, +0x2a, +0x36, +0xdf, +0x6d, +0xc5, +0x8c, +0x80, +0x07, +0xce, +0x92, +0x0c, +0xd8, +0x06, +0x62, +0x0f, +0xdd, +0x48, +0x46, +0x1a, +0x53, +0xc7, +0x8a, +0x8c, +0x5d, +0x5d, +0xb4, +0xa1, +0x02, +0xd3, +0xa9, +0xb8, +0xf3, +0x94, +0x8f, +0x3f, +0xe5, +0x54, +0xd4, +0x11, +0x65, +0xb2, +0x5e, +0x09, +0x0b, +0x81, +0xe3, +0x75, +0xa7, +0x89, +0x81, +0x39, +0x6c, +0x46, +0xf6, +0x06, +0x9f, +0x27, +0x3b, +0xb6, +0x2d, +0x5f, +0x1d, +0x4b, +0xd4, +0x7b, +0x1d, +0x61, +0x74, +0x89, +0xe4, +0xe3, +0xbd, +0x98, +0x1b, +0xc4, +0x51, +0x3b, +0xa4, +0xfa, +0xe0, +0x92, +0xf7, +0xbe, +0xf2, +0x4d, +0xbb, +0xff, +0xad, +0x4f, +0x6d, +0x68, +0xc2, +0x79, +0x40, +0xaa, +0x9b, +0x8f, +0x0c, +0x32, +0x4b, +0x5f, +0x3e, +0xab, +0x59, +0x98, +0xb3, +0xf5, +0x1d, +0xac, +0x5e, +0xbc, +0x78, +0xd3, +0x01, +0x6c, +0x64, +0x15, +0x2f, +0xd8, +0x71, +0xa6, +0x2d, +0x45, +0xe1, +0x22, +0x42, +0xe4, +0x4e, +0x04, +0x3c, +0x7d, +0xf4, +0x40, +0x21, +0xb4, +0x67, +0x05, +0xa8, +0xe2, +0xf3, +0x72, +0x87, +0x4c, +0x7d, +0xd9, +0x1b, +0x65, +0x97, +0xf3, +0xc2, +0xe3, +0xe4, +0xc8, +0xd2, +0xde, +0xf6, +0xef, +0xdc, +0xbb, +0x44, +0x08, +0x5e, +0xe2, +0x45, +0x27, +0x01, +0xb0, +0xf6, +0x43, +0xe7, +0x3a, +0xf6, +0xdc, +0x9d, +0xed, +0xf3, +0xc5, +0x0c, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x36, +0xee, +0x96, +0x72, +0x67, +0xe7, +0x81, +0x91, +0xd5, +0x05, +0x0a, +0xe0, +0x82, +0xd5, +0x8f, +0xe8, +0xf9, +0xb0, +0xc9, +0xcf, +0x93, +0xe7, +0x04, +0xc5, +0xbc, +0x2b, +0x43, +0x56, +0x7e, +0xe8, +0x67, +0x7c, +0xe5, +0xfb, +0x49, +0xad, +0x5e, +0x9f, +0x25, +0x13, +0xde, +0x6e, +0x6e, +0xe9, +0xf1, +0xec, +0x87, +0x0b, +0x59, +0x81, +0x76, +0x84, +0x76, +0xb3, +0x24, +0xaf, +0x30, +0xfd, +0x27, +0x8b, +0xab, +0xd8, +0x00, +0x8b, +0x9b, +0x0c, +0xd2, +0xb2, +0x4e, +0x5e, +0x9d, +0x1d, +0x96, +0x01, +0x00, +0x67, +0xc1, +0x5f, +0x02, +0x20, +0xfd, +0x45, +0x6a, +0x01, +0x60, +0x58, +0x45, +0xca, +0x47, +0x21, +0x90, +0x5a, +0xc4, +0x43, +0x26, +0x1a, +0xd7, +0xa5, +0x4a, +0xb2, +0x5d, +0x2b, +0x35, +0x49, +0xfb, +0xa5, +0x17, +0x92, +0x21, +0x1e, +0x93, +0x96, +0x67, +0xa2, +0x7e, +0x36, +0x7a, +0xde, +0x5f, +0xbe, +0x7a, +0x58, +0x9d, +0xf8, +0x78, +0xa3, +0xfa, +0xc8, +0xd5, +0x17, +0xf0, +0x21, +0x97, +0x8c, +0x80, +0xb5, +0x4b, +0x3b, +0xbd, +0xbb, +0x41, +0x21, +0xa8, +0x50, +0x67, +0xf7, +0xe7, +0x19, +0x80, +0x10, +0x8e, +0xce, +0x04, +0x18, +0x3f, +0x51, +0x6b, +0x77, +0xd8, +0x9e, +0x16, +0xaf, +0xec, +0xef, +0x48, +0x16, +0x4d, +0x9e, +0x85, +0x38, +0x18, +0x3e, +0xd4, +0x28, +0x87, +0x60, +0x2a, +0xf6, +0x7f, +0x09, +0x86, +0x6f, +0x9c, +0x3c, +0x3a, +0xff, +0xab, +0xd0, +0x61, +0xa2, +0x97, +0x0d, +0x71, +0x94, +0x7e, +0xfd, +0xb9, +0x80, +0x02, +0x89, +0x6a, +0xb3, +0x84, +0x6c, +0x2a, +0x77, +0x62, +0xbe, +0x0b, +0xf4, +0xaf, +0xac, +0x7b, +0x7c, +0x8e, +0xca, +0x01, +0xba, +0x71, +0x78, +0x94, +0xfd, +0xb5, +0x39, +0xa4, +0x4d, +0x2f, +0x78, +0xcf, +0xca, +0x92, +0x0c, +0x1a, +0x99, +0x48, +0x4c, +0x11, +0x96, +0xb5, +0x4e, +0x41, +0x28, +0xe4, +0xa6, +0xfe, +0x4b, +0x72, +0x91, +0xe7, +0xd4, +0xdd, +0x9f, +0x12, +0xe6, +0x29, +0x38, +0xce, +0x45, +0xae, +0x02, +0xb8, +0x24, +0xae, +0xbd, +0xe9, +0x66, +0x08, +0x62, +0xa2, +0x2c, +0x2b, +0x00, +0xe2, +0x23, +0xd9, +0xc4, +0x48, +0xe4, +0xd3, +0xac, +0xbb, +0x34, +0xc7, +0xf0, +0xe3, +0x4f, +0xb9, +0x30, +0xea, +0xa2, +0x12, +0xf1, +0x30, +0x2c, +0x36, +0xde, +0x48, +0xf2, +0xb0, +0x4c, +0x43, +0x3f, +0x2e, +0x58, +0xe4, +0x20, +0xe3, +0x58, +0xcd, +0x31, +0x22, +0xf0, +0xa2, +0x2a, +0xe6, +0x19, +0x90, +0x55, +0x86, +0xf6, +0x55, +0x79, +0xd1, +0xd7, +0x46, +0x2f, +0xc0, +0xdc, +0x99, +0xe8, +0xf3, +0x6a, +0xdf, +0x7f, +0xeb, +0x24, +0x4a, +0x1e, +0x5a, +0x75, +0xde, +0x2f, +0x5c, +0x19, +0x61, +0x03, +0x53, +0x54, +0x6a, +0x3b, +0x18, +0x70, +0xb6, +0x4f, +0xf1, +0x9c, +0x0a, +0x59, +0x9d, +0x19, +0x92, +0x65, +0x8c, +0x83, +0x14, +0x2d, +0x44, +0x8a, +0x75, +0xa9, +0xf5, +0x90, +0xd2, +0x66, +0x4e, +0xfa, +0x69, +0x0f, +0x5b, +0x0b, +0x98, +0x65, +0xc8, +0x11, +0x42, +0x59, +0x7f, +0xdd, +0x1b, +0x75, +0x17, +0x31, +0x4c, +0x75, +0x58, +0xeb, +0x58, +0x63, +0x7d, +0xf2, +0xa6, +0xc2, +0x6e, +0xb7, +0x3f, +0x3e, +0x5e, +0x47, +0xad, +0xb7, +0x04, +0xe8, +0x05, +0xf8, +0xb2, +0xcf, +0x19, +0xf3, +0xd2, +0x85, +0xfe, +0x3e, +0x3e, +0xb1, +0x62, +0x08, +0x2c, +0x10, +0x07, +0x0d, +0x73, +0x90, +0x17, +0xfa, +0x9b, +0x56, +0x02, +0x75, +0xf9, +0x51, +0xe0, +0xe9, +0x1a, +0x7b, +0x9f, +0xb3, +0xf3, +0x98, +0xb8, +0x1c, +0x9c, +0xe1, +0xd5, +0x35, +0xae, +0xc8, +0x60, +0x48, +0x11, +0x09, +0x94, +0x6b, +0xd0, +0x8b, +0x15, +0xbc, +0x05, +0x68, +0xd3, +0x54, +0x8a, +0x51, +0x39, +0x5c, +0x42, +0x76, +0xce, +0xd8, +0xad, +0x89, +0x30, +0xc9, +0x05, +0x1c, +0xcc, +0x94, +0x3f, +0x0f, +0x90, +0x6f, +0x72, +0x2d, +0x85, +0x64, +0x9a, +0xb9, +0x23, +0xf9, +0x0b, +0xc3, +0x7c, +0x39, +0x0f, +0x97, +0x07, +0x97, +0xda, +0x58, +0x48, +0x33, +0x05, +0x23, +0xb8, +0x82, +0xe8, +0xd3, +0x53, +0x89, +0xaf, +0x33, +0x80, +0x22, +0x84, +0x0c, +0x95, +0x5c, +0x67, +0xb8, +0x77, +0x0c, +0x5c, +0xa2, +0x5f, +0x3d, +0x58, +0x0f, +0x27, +0xf3, +0x2f, +0xae, +0x48, +0xbd, +0x0b, +0x6f, +0x54, +0xfb, +0x67, +0x4c, +0xea, +0x32, +0x27, +0xf1, +0xfa, +0xe2, +0xb0, +0xec, +0x0b, +0x15, +0xb4, +0x70, +0xf6, +0x5c, +0xdd, +0x71, +0x60, +0xc3, +0xc1, +0xa8, +0x32, +0x65, +0xac, +0x7a, +0x77, +0x41, +0xe5, +0xa9, +0x6b, +0x11, +0x81, +0xfa, +0x34, +0x8d, +0xfb, +0xc1, +0x80, +0x6e, +0xc4, +0x60, +0x30, +0x07, +0xd4, +0x8b, +0x67, +0xbd, +0xaa, +0x8c, +0x9c, +0x64, +0xac, +0xdb, +0x0b, +0x24, +0x8b, +0x63, +0x6f, +0xe6, +0xbc, +0xe7, +0x33, +0xa4, +0x4a, +0x4c, +0xa7, +0x9f, +0x43, +0x53, +0xd2, +0xbb, +0x8f, +0x43, +0xc7, +0x3d, +0x78, +0x68, +0x3f, +0xa5, +0x3d, +0xca, +0x69, +0x84, +0xa6, +0x97, +0x2d, +0xc0, +0x7d, +0x31, +0x34, +0x55, +0x1d, +0x07, +0xb1, +0x5f, +0x40, +0x5c, +0x93, +0xb0, +0xbc, +0x7c, +0xb0, +0xbc, +0xe7, +0x12, +0xee, +0x6b, +0x2b, +0xd3, +0x4d, +0x67, +0x70, +0x3a, +0x9a, +0xf2, +0x3c, +0x7c, +0x81, +0xfa, +0xd7, +0xd9, +0x90, +0x91, +0x81, +0xb8, +0xb1, +0xf3, +0x48, +0x6a, +0x26, +0x4f, +0x0c, +0xce, +0xb0, +0x9e, +0xfd, +0x4a, +0x3a, +0xaf, +0xac, +0x5b, +0x3f, +0xbf, +0x44, +0x5a, +0xa3, +0x19, +0x1e, +0x4b, +0xe7, +0x36, +0x6a, +0xd7, +0x20, +0xae, +0xd7, +0x7d, +0x3b, +0xe7, +0xff, +0x3a, +0x86, +0x2e, +0xd0, +0x4a, +0x3e, +0xaf, +0x9f, +0x8e, +0x01, +0xbf, +0xf8, +0x4f, +0xc1, +0xe8, +0x6f, +0x74, +0xe1, +0x45, +0xd3, +0xf7, +0x04, +0x6a, +0x4b, +0x9d, +0xec, +0x33, +0x27, +0x76, +0xd7, +0xc5, +0xe1, +0xb0, +0x3b, +0x0e, +0x23, +0xec, +0xf0, +0x86, +0xd2, +0x1a, +0xbf, +0x3d, +0x04, +0x62, +0xb3, +0x6c, +0xb2, +0xeb, +0x17, +0x05, +0xa6, +0x0a, +0x8a, +0x7e, +0x83, +0x1c, +0xb6, +0x37, +0x09, +0xc6, +0x0b, +0x70, +0x3c, +0xb5, +0x93, +0x81, +0xd8, +0x93, +0xa0, +0x5f, +0x1e, +0x08, +0xe2, +0xc6, +0xe5, +0xc9, +0x72, +0xf1, +0xf1, +0xc1, +0xed, +0xd5, +0x58, +0x93, +0x83, +0xf8, +0x65, +0x67, +0x2e, +0x0d, +0xa9, +0xf1, +0x64, +0x12, +0xe6, +0x4c, +0xea, +0x15, +0x3f, +0x8c, +0x1a, +0xb6, +0xbf, +0xf6, +0xb9, +0x52, +0x35, +0x09, +0xb0, +0xe6, +0xf7, +0xcd, +0xf1, +0xa5, +0xaa, +0x81, +0xd1, +0x81, +0x6f, +0xb4, +0xa9, +0x66, +0x1f, +0xfc, +0x48, +0xc0, +0xb6, +0xd1, +0x8b, +0x06, +0x2f, +0xf6, +0xef, +0x1f, +0x0a, +0xe6, +0xce, +0x3a, +0x4a, +0x55, +0xbf, +0x6d, +0xf9, +0x4d, +0xd4, +0x08, +0x45, +0x4b, +0xc3, +0x66, +0x19, +0x92, +0x10, +0xe1, +0x17, +0x8e, +0x28, +0x91, +0x16, +0xbf, +0x3c, +0xee, +0xa3, +0xa6, +0x99, +0x92, +0x10, +0xe1, +0xf6, +0xcc, +0xac, +0xb8, +0x65, +0x0b, +0x43, +0x66, +0xf8, +0xe3, +0xe5, +0x3f, +0x24, +0x89, +0x47, +0x5d, +0x78, +0x43, +0xd0, +0x61, +0x17, +0xbd, +0x5b, +0x64, +0x54, +0x08, +0x45, +0x59, +0x93, +0xf6, +0x95, +0x8a, +0x41, +0x51, +0x62, +0x4b, +0x51, +0x02, +0x30, +0x73, +0xc7, +0x87, +0xc5, +0x4b, +0xa2, +0x97, +0x0f, +0xe8, +0x46, +0x5f, +0x7e, +0x2a, +0xe1, +0x30, +0x20, +0xb0, +0xfa, +0xe7, +0xce, +0x61, +0x42, +0x57, +0x6e, +0x21, +0xf3, +0x7a, +0xec, +0xe3, +0x25, +0xc7, +0x25, +0xf3, +0x67, +0xa7, +0x57, +0x40, +0x00, +0x02, +0xcf, +0x1c, +0x80, +0x77, +0x67, +0xbd, +0x70, +0xa1, +0x19, +0x92, +0x31, +0x75, +0x93, +0x27, +0x27, +0xb6, +0x82, +0xe4, +0xeb, +0x1d, +0x78, +0x48, +0xe7, +0xa5, +0x5e, +0x57, +0xef, +0x64, +0x28, +0x64, +0x1b, +0xf6, +0x11, +0xb2, +0x03, +0x9d, +0xb9, +0x18, +0x02, +0x27, +0xf7, +0xbe, +0x9d, +0x55, +0xfc, +0x00, +0xd2, +0xc7, +0xae, +0xad, +0x0b, +0xc5, +0xe9, +0x42, +0x41, +0x48, +0xd8, +0x32, +0xcf, +0xf6, +0x0f, +0xf5, +0xbc, +0x97, +0xc6, +0x99, +0x47, +0x76, +0xbd, +0x89, +0x06, +0x0f, +0x63, +0x0c, +0x51, +0xd4, +0x5e, +0xea, +0x48, +0xa8, +0xa2, +0x56, +0x1c, +0x79, +0x84, +0x86, +0x40, +0x88, +0x41, +0x76, +0x55, +0xfc, +0xc2, +0xd7, +0xfd, +0xc9, +0xc7, +0x80, +0x61, +0x35, +0xa7, +0x43, +0x20, +0xf7, +0xeb, +0x6c, +0x66, +0x13, +0xb0, +0xec, +0x02, +0x75, +0x3e, +0x4b, +0xaf, +0xb9, +0x5d, +0x40, +0xda, +0xd6, +0x6e, +0x2d, +0x39, +0x54, +0xc2, +0x95, +0x35, +0x54, +0x25, +0x72, +0xe1, +0x78, +0xb8, +0xeb, +0xc1, +0x16, +0x58, +0x0f, +0x9c, +0x9b, +0xb4, +0xea, +0x37, +0xec, +0x3b, +0x11, +0xba, +0xd5, +0x8a, +0xa9, +0xe3, +0x98, +0x00, +0x51, +0x1c, +0x14, +0xe0, +0x40, +0x96, +0xe5, +0xe9, +0xf2, +0x21, +0x22, +0xb1, +0x23, +0x60, +0x78, +0xd3, +0x17, +0xf8, +0x7a, +0xa5, +0xa8, +0xba, +0x20, +0xd3, +0x15, +0x1e, +0x32, +0xe4, +0x5e, +0x15, +0x48, +0xae, +0xa9, +0xe5, +0xb8, +0x33, +0xec, +0xe8, +0xa2, +0x42, +0xac, +0xbf, +0x10, +0x84, +0x53, +0x87, +0x19, +0xb4, +0x5f, +0x76, +0x4d, +0x01, +0x9d, +0x56, +0x74, +0xd9, +0x5c, +0x97, +0xe7, +0x88, +0xea, +0x3a, +0xbf, +0xdc, +0x4c, +0x33, +0x8a, +0x16, +0xb9, +0x5b, +0xfa, +0xd8, +0x42, +0xa7, +0xbb, +0x3c, +0x04, +0x27, +0x78, +0x49, +0x81, +0x2a, +0x5a, +0x7d, +0x7c, +0x23, +0xa8, +0xba, +0xf7, +0x9a, +0x9f, +0xd2, +0x66, +0x3e, +0x38, +0x3c, +0x75, +0xf9, +0xd1, +0x30, +0x26, +0x30, +0x6e, +0x5a, +0x6e, +0xdc, +0x6a, +0x69, +0x32, +0x50, +0x33, +0x47, +0x9e, +0xa4, +0xa8, +0x64, +0x66, +0xf0, +0x8a, +0xe4, +0xfd, +0x27, +0x6f, +0x51, +0x25, +0x8b, +0x43, +0x74, +0xc9, +0x8e, +0xbd, +0x88, +0x31, +0xbe, +0xec, +0x65, +0xd2, +0xcb, +0x8d, +0x5a, +0x13, +0x48, +0x16, +0x8c, +0x61, +0x0b, +0x11, +0xf6, +0xc6, +0x66, +0xae, +0xc3, +0xcc, +0x0c, +0xd2, +0xe1, +0x9f, +0x82, +0x41, +0x3f, +0x56, +0xf9, +0x73, +0xef, +0xdc, +0x30, +0x50, +0xcf, +0xb6, +0x7f, +0xbc, +0xd0, +0xb3, +0x10, +0xab, +0x24, +0xe4, +0xec, +0xad, +0x18, +0x8c, +0x39, +0x2d, +0x30, +0x4c, +0xc5, +0x40, +0x0d, +0xf6, +0xac, +0xd6, +0x18, +0x5d, +0x96, +0xbf, +0x5f, +0x71, +0x75, +0x96, +0x22, +0x97, +0x0f, +0x02, +0x94, +0x6e, +0xa6, +0xae, +0x6d, +0x8f, +0x1e, +0xca, +0x12, +0x9b, +0x2a, +0x1c, +0xce, +0xa9, +0xee, +0xfd, +0x12, +0x8e, +0xfc, +0xed, +0x09, +0x33, +0xba, +0xf4, +0x1a, +0x15, +0xf6, +0x9d, +0x87, +0x16, +0x43, +0x7c, +0x78, +0x57, +0xe1, +0x44, +0xc9, +0xeb, +0x1f, +0x58, +0x4d, +0xc1, +0x49, +0x11, +0x5c, +0xb2, +0x11, +0xa8, +0x55, +0x16, +0xf1, +0xc6, +0x50, +0xe9, +0x87, +0x89, +0xf6, +0xcf, +0xd8, +0x9c, +0x51, +0xa7, +0xbc, +0x5b, +0x31, +0x6d, +0x4d, +0x51, +0xd0, +0x4c, +0xbc, +0x0d, +0x58, +0x2d, +0x7b, +0x88, +0x7a, +0xf9, +0x8e, +0xd6, +0x40, +0x4d, +0xbb, +0xbe, +0xc4, +0xe5, +0x07, +0xfc, +0xd9, +0x7b, +0x6d, +0xa6, +0x42, +0x57, +0x8f, +0x02, +0x94, +0x4f, +0xe4, +0x2a, +0x65, +0xe2, +0x19, +0x5a, +0x50, +0xe1, +0x25, +0x65, +0x4a, +0x60, +0xc2, +0xcd, +0xa8, +0xec, +0x05, +0x2e, +0x87, +0x7b, +0x95, +0xb7, +0x4f, +0xa0, +0x0b, +0x1b, +0x4a, +0x7f, +0x92, +0xc8, +0x90, +0xee, +0x89, +0x1e, +0x10, +0xd2, +0x85, +0xe4, +0x9f, +0x63, +0xc8, +0x12, +0xbb, +0x4e, +0xb8, +0xcf, +0x0a, +0xec, +0x18, +0x4e, +0xe6, +0x7c, +0xb3, +0x33, +0x26, +0xc7, +0x1f, +0xd2, +0x04, +0x23, +0xea, +0x07, +0x0c, +0x5f, +0x90, +0xbd, +0xa7, +0x6a, +0x0f, +0x4a, +0xd6, +0x10, +0x01, +0x3c, +0x12, +0x29, +0x2e, +0x96, +0xc0, +0x4d, +0xbb, +0xbe, +0xe5, +0xa7, +0x83, +0xd5, +0x6a, +0x3c, +0xe3, +0x5b, +0xb8, +0xf2, +0x5c, +0x6d, +0x1f, +0xa6, +0xf3, +0x12, +0x24, +0xf6, +0xd6, +0x3b, +0x10, +0x14, +0x09, +0x07, +0x82, +0xe8, +0x30, +0x6a, +0x99, +0xdc, +0x95, +0x01, +0x9c, +0xd4, +0x68, +0x3b, +0xca, +0x98, +0x12, +0xab, +0x77, +0x25, +0x15, +0x7d, +0x10, +0x32, +0x45, +0x98, +0xcd, +0x7a, +0xdf, +0x71, +0x8a, +0x75, +0xc1, +0x1c, +0xd4, +0x68, +0x25, +0xeb, +0xbb, +0x54, +0x27, +0x6f, +0x2a, +0xf7, +0xb9, +0x98, +0x03, +0x27, +0xde, +0x24, +0xa8, +0xbb, +0x98, +0xc2, +0x84, +0xff, +0x9b, +0x51, +0xd8, +0x53, +0x50, +0xda, +0xf5, +0x88, +0xaa, +0x87, +0x2f, +0xae, +0xd6, +0xea, +0x6b, +0xde, +0xc8, +0xd7, +0xa7, +0x28, +0x65, +0x81, +0xe8, +0xb2, +0x3b, +0x1d, +0x4f, +0x75, +0x8f, +0x9f, +0x7a, +0x74, +0x8e, +0xc1, +0x5f, +0x9a, +0xa8, +0x9d, +0xfa, +0x03, +0xa3, +0x71, +0x9b, +0x37, +0x6d, +0xd5, +0x0b, +0xf5, +0xe1, +0xa1, +0x1b, +0x01, +0x6a, +0xc6, +0x67, +0xaa, +0xea, +0x2c, +0x9d, +0xa4, +0xd2, +0x6e, +0xfc, +0xde, +0x2e, +0x7f, +0x94, +0x69, +0xe5, +0x4a, +0xe0, +0x01, +0x48, +0x3c, +0x6b, +0xf7, +0x1e, +0xb6, +0x0b, +0x5f, +0xf9, +0x2e, +0x07, +0xc5, +0xe8, +0xae, +0x37, +0x1b, +0xbc, +0x3c, +0xd8, +0xd5, +0x0b, +0x91, +0x9e, +0x80, +0x24, +0xf5, +0x06, +0x0c, +0x0e, +0x98, +0x07, +0x96, +0x2d, +0x19, +0xdc, +0x58, +0x93, +0xcc, +0xfb, +0x4e, +0xeb, +0xbd, +0x0f, +0xf5, +0xaf, +0x01, +0xfa, +0xf1, +0x7c, +0x43, +0x8c, +0xb8, +0x56, +0x3e, +0xbe, +0x77, +0x4e, +0x2b, +0xf7, +0xbb, +0xb7, +0x45, +0x47, +0xcd, +0xcc, +0xa6, +0x4c, +0x72, +0x7b, +0x6a, +0x2a, +0x70, +0x13, +0x07, +0xfd, +0xb8, +0x9c, +0x98, +0x3a, +0xd8, +0x23, +0x67, +0x5b, +0x34, +0xd5, +0x14, +0x0c, +0xab, +0x77, +0x1f, +0xf8, +0x3d, +0x5a, +0x9f, +0x92, +0xb7, +0x2c, +0xad, +0x31, +0xde, +0x61, +0x07, +0xb3, +0x6b, +0xf7, +0x38, +0x15, +0x95, +0x46, +0x14, +0x48, +0x53, +0x69, +0x52, +0x66, +0x07, +0x6d, +0x83, +0x71, +0x8a, +0x67, +0x25, +0x20, +0x0f, +0xfe, +0xd7, +0x02, +0xd7, +0x6e, +0x2c, +0xd2, +0x1a, +0x0a, +0x5d, +0xfd, +0x0f, +0x74, +0xe3, +0xa4, +0x36, +0x07, +0x9a, +0xdf, +0xd4, +0x79, +0xbf, +0xef, +0x59, +0xc0, +0x44, +0x52, +0x87, +0x9a, +0x6e, +0x1d, +0x0e, +0xee, +0xde, +0x2e, +0x1a, +0xa9, +0x8f, +0x3a, +0xc9, +0xba, +0xec, +0x99, +0x78, +0x2d, +0x55, +0x6b, +0x14, +0xc2, +0x06, +0xd5, +0xfc, +0x93, +0x53, +0x4d, +0x11, +0x8c, +0xf8, +0xfa, +0x79, +0x7c, +0xa6, +0x64, +0xae, +0x61, +0xb8, +0x7b, +0x94, +0x56, +0xa6, +0x39, +0x78, +0x9a, +0xe5, +0xc7, +0xdf, +0x18, +0x63, +0x23, +0x9c, +0xfa, +0x66, +0xbb, +0xb7, +0x5a, +0x27, +0x4c, +0xd1, +0xa1, +0x83, +0x22, +0xb3, +0x52, +0x49, +0x35, +0xb0, +0x22, +0x83, +0x59, +0x12, +0x00, +0x16, +0x98, +0xdd, +0xad, +0xc2, +0x94, +0xf9, +0xd3, +0x7b, +0x64, +0x7f, +0x44, +0x3e, +0x3c, +0x8b, +0x9a, +0x83, +0x9c, +0x69, +0x6b, +0xe4, +0xdf, +0x9f, +0xed, +0x54, +0x1f, +0xe5, +0x5d, +0x7a, +0x05, +0x82, +0xb3, +0xdd, +0xef, +0xfc, +0x53, +0x96, +0xb0, +0x2c, +0x5a, +0xf8, +0xdf, +0x9c, +0x8b, +0x16, +0x4e, +0xdf, +0xda, +0x4d, +0x09, +0x09, +0x69, +0x50, +0x03, +0x65, +0xd8, +0x73, +0x70, +0xe8, +0x86, +0xbf, +0xbb, +0x35, +0xce, +0xb2, +0x46, +0xcb, +0x02, +0x00, +0x5b, +0xb4, +0xe2, +0xc6, +0x8f, +0x2f, +0x98, +0xaf, +0x87, +0x4b, +0x48, +0x45, +0xed, +0xcc, +0x1d, +0xe6, +0x58, +0xd6, +0xf2, +0x50, +0x25, +0x9f, +0x52, +0xc7, +0xcb, +0x8a, +0x17, +0x9d, +0x5b, +0xe5, +0xc8, +0xd7, +0x72, +0xb7, +0x52, +0xb2, +0xc4, +0x98, +0xe3, +0x7a, +0x17, +0x3e, +0xc6, +0x60, +0xa7, +0x97, +0xb0, +0xcf, +0x18, +0x81, +0x53, +0x84, +0x4c, +0xd5, +0x17, +0x32, +0x03, +0x13, +0x39, +0x51, +0x09, +0x10, +0xe3, +0x77, +0x49, +0x4f, +0x62, +0x01, +0xbf, +0x8c, +0x9a, +0xe0, +0x41, +0x9e, +0x89, +0x74, +0x36, +0xf9, +0x96, +0x86, +0x2e, +0x96, +0x1c, +0x4a, +0xb7, +0x2b, +0x4a, +0x97, +0xbc, +0x99, +0x40, +0xa3, +0xe0, +0x3d, +0xc8, +0xad, +0x2f, +0xdf, +0x4f, +0x2c, +0xc4, +0x69, +0x82, +0x9f, +0x9b, +0x81, +0x0c, +0x61, +0x5c, +0xa5, +0x9d, +0x8c, +0x89, +0xc0, +0x2c, +0xb4, +0x4a, +0x33, +0x4e, +0xeb, +0xa2, +0x56, +0x40, +0xc0, +0xc2, +0x46, +0xaf, +0x6a, +0xfc, +0x67, +0xd1, +0x80, +0x5e, +0xc5, +0x6d, +0x84, +0x43, +0x27, +0x3f, +0x55, +0x15, +0x96, +0x6a, +0xa0, +0xa5, +0xda, +0xb7, +0xff, +0xb7, +0x75, +0x6e, +0x4c, +0x49, +0x91, +0x9d, +0x22, +0xa3, +0x46, +0xea, +0xed, +0x9a, +0x00, +0xe2, +0x32, +0xc3, +0xd6, +0xa9, +0x71, +0x20, +0x55, +0xa3, +0x19, +0xed, +0xf8, +0x4f, +0xa7, +0x12, +0x9c, +0x66, +0x87, +0xaf, +0x4e, +0xb7, +0xf0, +0xdb, +0xbf, +0xef, +0xf0, +0xf6, +0xaf, +0xea, +0xda, +0x09, +0xfe, +0xde, +0x38, +0x5c, +0xa5, +0xa2, +0xdf, +0x99, +0x45, +0xa8, +0xe4, +0xe7, +0x92, +0xac, +0x67, +0xaa, +0x4f, +0xbf, +0x77, +0x3e, +0xa2, +0x40, +0x49, +0x22, +0x4a, +0x1e, +0x3b, +0xaa, +0x70, +0x7f, +0x95, +0xaf, +0x37, +0x4b, +0xfc, +0x99, +0xe2, +0xe0, +0xba, +0xd7, +0x34, +0xce, +0x55, +0x88, +0x5b, +0x84, +0x1b, +0x57, +0xc4, +0x80, +0x03, +0x53, +0xc9, +0x2f, +0x93, +0x04, +0x4d, +0xd5, +0x96, +0xe5, +0x70, +0xa6, +0x6e, +0x63, +0x5d, +0x9d, +0x6c, +0xdb, +0x02, +0x0a, +0xa9, +0xda, +0x8b, +0x53, +0xdc, +0xd9, +0x9a, +0xc5, +0x94, +0x2c, +0x91, +0x92, +0x2a, +0xde, +0xbb, +0x8b, +0x13, +0xb9, +0x19, +0x96, +0x64, +0xcc, +0xf2, +0x64, +0x39, +0xb7, +0x75, +0x49, +0xe9, +0x86, +0xc2, +0x86, +0x62, +0xd9, +0x24, +0xd3, +0x81, +0x35, +0x49, +0xfc, +0xa0, +0xa5, +0xa0, +0x93, +0x05, +0x64, +0xb4, +0x1a, +0x57, +0xce, +0x0c, +0x90, +0x02, +0x27, +0xc5, +0x7a, +0x2b, +0x5d, +0xae, +0x3e, +0xd5, +0xdd, +0x10, +0x7c, +0x14, +0xea, +0x3a, +0x08, +0xac, +0x72, +0x4e, +0x90, +0x3d, +0x3b, +0x7c, +0x86, +0x2e, +0xeb, +0xd4, +0x06, +0x70, +0xe6, +0xc7, +0xfb, +0x5f, +0xbd, +0x18, +0xf4, +0x11, +0xa4, +0x1a, +0x93, +0xc3, +0xbe, +0xd9, +0xfb, +0x26, +0x48, +0x2f, +0x37, +0x3c, +0xd0, +0x03, +0x47, +0x1a, +0xf7, +0x62, +0x19, +0x24, +0x5c, +0xf4, +0xa8, +0x92, +0x20, +0x7a, +0xf2, +0x9e, +0x2a, +0xc5, +0x95, +0xa2, +0xfb, +0xa4, +0xea, +0x85, +0xd8, +0x56, +0xb7, +0x70, +0xd1, +0x60, +0x30, +0xa5, +0x30, +0x82, +0x70, +0xdc, +0x7a, +0x65, +0x8a, +0x36, +0x3f, +0x5b, +0x0c, +0xae, +0x54, +0x7c, +0xd3, +0x57, +0x84, +0x7b, +0x3a, +0x65, +0x18, +0x81, +0xee, +0x05, +0x9b, +0x44, +0x4d, +0xb8, +0xda, +0xa2, +0xa1, +0xc9, +0x15, +0xd3, +0x73, +0x03, +0x0e, +0x43, +0xe9, +0x8e, +0x15, +0xf9, +0xbe, +0xc6, +0xc5, +0x8a, +0xe5, +0xc0, +0x1e, +0xc2, +0x37, +0x9e, +0x2a, +0x26, +0xa5, +0xa0, +0xbd, +0x24, +0x5f, +0xb9, +0xc1, +0xab, +0x34, +0x48, +0xb9, +0x5d, +0x98, +0xb4, +0x65, +0x18, +0xf3, +0x63, +0x19, +0x44, +0x1b, +0x11, +0x16, +0xff, +0xdc, +0xf1, +0x79, +0x08, +0x86, +0x0f, +0x52, +0x98, +0x73, +0xc4, +0x92, +0x90, +0x2b, +0x47, +0x09, +0xd0, +0x43, +0x6c, +0x2f, +0x20, +0xeb, +0xdc, +0xda, +0xc5, +0x08, +0x7b, +0x94, +0x42, +0x30, +0x6a, +0xc7, +0xda, +0x8c, +0xc3, +0x76, +0xa7, +0xa5, +0xcc, +0x62, +0x13, +0x00, +0x60, +0x31, +0x58, +0x44, +0x9b, +0xf5, +0x64, +0x14, +0xf5, +0x11, +0xc5, +0x54, +0x52, +0x83, +0xd4, +0x73, +0x01, +0x16, +0x0e, +0xb3, +0x7a, +0x29, +0x69, +0x35, +0x56, +0xd4, +0xee, +0x8a, +0x17, +0xa2, +0x99, +0x24, +0x9c, +0xd7, +0x8f, +0xdb, +0x55, +0xb5, +0x3e +}; diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/config.h b/keyboards/htx_studio/one_handed_keyboard_sl/config.h new file mode 100644 index 00000000000..599ab4f298e --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/config.h @@ -0,0 +1,13 @@ +#pragma once + +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MISO_PIN A6 +#define SPI_MOSI_PIN A7 + +#define POINTING_DEVICE_CS_PIN A4 +#define POINTING_DEVICE_MOTION_PIN A3 +#define POINTING_DEVICE_TASK_THROTTLE_MS 1 + +#define ENCODER_RESOLUTION 2 + diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h b/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h new file mode 100644 index 00000000000..493d3687da7 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #define HAL_USE_SPI TRUE + #define SPI_USE_WAIT TRUE + #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + + #include_next + \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json new file mode 100644 index 00000000000..01af4f177d1 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "One-Handed_Keyboard_SL", + "manufacturer": "HTXStudio", + "url": "https://github.com/htx-studio", + "maintainer": "HTXStudio", + "usb": { + "vid": "0x475D", + "pid": "0x03BE", + "device_version": "3.1.0" + }, + "processor": "STM32G431", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "matrix": { + "rows": 6, + "cols": 14 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true, + "encoder": true + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10"} + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, + {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, + {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, + {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, + {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, + {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, + {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, + {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, + {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, + {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, + {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, + {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, + {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, + {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, + + {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, + {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, + {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, + {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, + {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, + {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, + {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, + {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, + {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, + {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, + {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, + {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, + {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, + {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, + + {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, + {"matrix": [2, 2], "w":1, "h":1, "x":2, "y":2}, + {"matrix": [2, 3], "w":1, "h":1, "x":3, "y":2}, + {"matrix": [2, 4], "w":1, "h":1, "x":4, "y":2}, + {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, + {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, + {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, + {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, + {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, + {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, + {"matrix": [2, 12], "w":1.5, "h":1, "x":11, "y":2}, + {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, + + {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, + {"matrix": [3, 3], "w":1, "h":1, "x":3, "y":3}, + {"matrix": [3, 4], "w":1, "h":1, "x":4, "y":3}, + {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, + {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, + {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, + {"matrix": [3, 8], "w":1, "h":1, "x":8, "y":3}, + {"matrix": [3, 9], "w":1, "h":1, "x":9, "y":3}, + {"matrix": [3, 10], "w":2, "h":1, "x":10, "y":3}, + {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, + + {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, + {"matrix": [4, 3], "w":1.25, "h":1, "x":2.5, "y":4}, + {"matrix": [4, 4], "w":1.25, "h":1, "x":3.75, "y":4}, + {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, + {"matrix": [4, 6], "w":1.25, "h":1, "x":6.25, "y":4}, + {"matrix": [4, 7], "w":1.25, "h":1, "x":7.5, "y":4}, + {"matrix": [4, 9], "w":1.25, "h":1, "x":8.75, "y":4}, + {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, + {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, + + {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, + {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, + {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, + {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, + {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + ] + } + + } +} + diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c new file mode 100644 index 00000000000..e1fc913a039 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c @@ -0,0 +1,43 @@ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +// ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ +// ┃ ESC ┃ 1 ┃ 2 ┃ 3 ┃ 4 ┃ 5 ┃ 6 ┃ 7 ┃ 8 ┃ 9 ┃ 0 ┃ -_ ┃ += ┃ `~ ┃ +// ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ +// ┃ TAB ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ '" ┃ +// ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━┳━━━━┻━━━┳━━━┛ +// ┃ CAPSLOCK ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ENTER ┃ ;: ┃ +// ┗━━━┳━━━━━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━━━━━┻━┳━━━━━━━━┻━━━━┳━━━┛ +// ┃ SHIFT ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ MOUSE1 ┃ MOUSE2 ┃ +// ┗━━━┳━━━━━━━┻┳━━━━━━┻━┳━━━━━┻━━┳━━━━┻━━━┳━━━┻━━━━┳━━┻━━━━━┳━┻━━━━━━┳┻━━━━━━━━━━━━━┻┳━━━━━━━━┳━━━┛ +// ┃ CTRL ┃ LGUI ┃ LALT ┃ ,< ┃ .> ┃ /? ┃ \| ┃ SPC ┃ BACK ┃ +// ┗━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━┛ +// ┏━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓ +// ┃ MOUSE3 ┃ → ┃ ↓ ┃ ← ┃ ↑ ┃ +// ┗━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┻━━━━━━━━━┛ + + + [0] = LAYOUT( + // ESC 1 2 3 4 5 6 7 8 9 0 - = ` + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_GRAVE, + // TAB Q W E R T Y U I O P [ ] ' + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, KC_QUOTE, + // CAPS A S D F G H J K L ; ENTER + KC_CAPS_LOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENTER, KC_SEMICOLON, + // LSHIFT Z X C V B N M MOUSE1 MOUSE2 + KC_LEFT_SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, + // LCTRL LGUI LALT , . / \ SPC BACKSPACE + KC_LEFT_CTRL, KC_LEFT_GUI, KC_LEFT_ALT, KC_COMMA, KC_DOT, KC_SCLN, KC_BSLS, KC_SPC, KC_BACKSPACE, + // MOUSE3 → ↓ ← ↑ + QK_MOUSE_BUTTON_3, KC_RIGHT, KC_DOWN, KC_LEFT, KC_UP) + }; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + // Encoders: Left, Right, Big + [0] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)} +}; +#endif diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk new file mode 100644 index 00000000000..382f3a9f618 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +POINTING_DEVICE_DRIVER = custom +SRC += adns.c +SPI_DRIVER_REQUIRED = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h new file mode 100644 index 00000000000..0ee034d9740 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h @@ -0,0 +1,23 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + #pragma once + + #include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/readme.md b/keyboards/htx_studio/one_handed_keyboard_sl/readme.md new file mode 100644 index 00000000000..3bbd7137094 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_sl/readme.md @@ -0,0 +1,29 @@ +# One-Handed_Keyboard_SL + +![左手小键盘](https://imgur.com/eaDoxL4.jpg) + +This is a keyboard with a fan-shaped layout and 59 keys.The commonly used buttons are placed near the thumb. + +* Keyboard Maintainer:[HTX Studio](https://github.com/htx-studio) +* Hardware Supported:HTX_STUDIO_ONE-HANDEN_KEYBOARD_SL PCB +* Hardware Availability:[One-Handed-Keyboard](https://github.com/htx-studio/One-Handed-Keyboard/tree/main/Hardware) + +## How to compile + +Make example for this keyboard (after setting up your build environment): + + `make htx_studio/one_handed_keyboard_sl:default` + +Flashing example for this keyboard: + + `make htx_studio/one_handed_keyboard_sl:default:flash` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Hold the "B" button on the back of the PCB (the one closest to the MCU) and briefly press the "R" button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available From e6c7808ec59eaa680c19b7d421969cf986b8d22f Mon Sep 17 00:00:00 2001 From: htx_studio Date: Sat, 3 May 2025 00:58:06 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9D=83?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../htx_studio/one_handed_keyboard_ml/config.h | 16 ++++++++++++++++ .../keymaps/default/keymap.c | 15 +++++++++++++++ .../htx_studio/one_handed_keyboard_mr/config.h | 16 ++++++++++++++++ .../keymaps/default/keymap.c | 16 ++++++++++++++++ .../htx_studio/one_handed_keyboard_sl/config.h | 16 ++++++++++++++++ .../keymaps/default/keymap.c | 15 +++++++++++++++ 6 files changed, 94 insertions(+) diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/config.h b/keyboards/htx_studio/one_handed_keyboard_ml/config.h index 5d5752dbf7f..c2a60b2393c 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_ml/config.h @@ -1,3 +1,19 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + #pragma once #define SPI_DRIVER SPID1 diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c index ac7e61346c2..87d0226435b 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ #include QMK_KEYBOARD_H diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/config.h b/keyboards/htx_studio/one_handed_keyboard_mr/config.h index 4c4d55b7903..16d6192182a 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_mr/config.h @@ -1,3 +1,19 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + #pragma once #define SPI_DRIVER SPID1 diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c index fe52b65318c..5205f78bdf0 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/config.h b/keyboards/htx_studio/one_handed_keyboard_sl/config.h index 599ab4f298e..822ccdf4461 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_sl/config.h @@ -1,3 +1,19 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + #pragma once #define SPI_DRIVER SPID1 diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c index e1fc913a039..0986deba026 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ #include QMK_KEYBOARD_H From 30a3fd1410f3a4706effe1a4f7ffec571634a863 Mon Sep 17 00:00:00 2001 From: htx_studio Date: Tue, 6 May 2025 19:34:49 +0800 Subject: [PATCH 3/7] Add trackball DPI control --- .../htx_studio/one_handed_keyboard_ml/adns.c | 254 -- .../htx_studio/one_handed_keyboard_ml/adns.h | 38 - .../one_handed_keyboard_ml/adns9800_srom_A6.h | 3081 ----------------- .../one_handed_keyboard_ml/config.h | 2 + .../one_handed_keyboard_ml/keyboard.json | 414 ++- .../keymaps/default/keymap.c | 76 +- .../keymaps/default/rules.mk | 5 +- .../one_handed_keyboard_ml/rules.mk | 2 + .../htx_studio/one_handed_keyboard_mr/adns.c | 254 -- .../htx_studio/one_handed_keyboard_mr/adns.h | 38 - .../one_handed_keyboard_mr/adns9800_srom_A6.h | 3081 ----------------- .../one_handed_keyboard_mr/config.h | 1 + .../one_handed_keyboard_mr/keyboard.json | 415 ++- .../keymaps/default/keymap.c | 76 +- .../keymaps/default/rules.mk | 6 +- .../one_handed_keyboard_mr/rules.mk | 2 + .../one_handed_keyboard_sl/keyboard.json | 183 +- .../keymaps/default/rules.mk | 3 +- 18 files changed, 653 insertions(+), 7278 deletions(-) delete mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns.c delete mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_ml/rules.mk delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns.c delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h create mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/rules.mk diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns.c b/keyboards/htx_studio/one_handed_keyboard_ml/adns.c deleted file mode 100644 index 52f488a47fd..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_ml/adns.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#include "spi_master.h" -#include "adns.h" -#include "debug.h" -#include "wait.h" -#include "pointing_device.h" -#include "adns9800_srom_A6.h" - -// registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 -#define REG_Frame_Period_Max_Bound_Lower 0x1a -#define REG_Frame_Period_Max_Bound_Upper 0x1b -#define REG_Frame_Period_Min_Bound_Lower 0x1c -#define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -// pins -#define NCS A4 - -extern const uint16_t firmware_length; -extern const uint8_t firmware_data[]; - -enum motion_burst_propertr{ - motion = 0, - observation, - delta_x_l, - delta_x_h, - delta_y_l, - delta_y_h, - squal, - pixel_sum, - maximum_pixel, - minimum_pixel, - shutter_upper, - shutter_lower, - frame_period_upper, - frame_period_lower, - end_data -}; - -void adns_begin(void){ - spi_start(NCS, false, 3, 8); -} - -void adns_end(void){ - spi_stop(); -} - -void adns_write(uint8_t reg_addr, uint8_t data){ - - adns_begin(); - //send address of the register, with MSBit = 1 to indicate it's a write - spi_write(reg_addr | 0x80 ); - spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - adns_end(); -} - -uint8_t adns_read(uint8_t reg_addr){ - - - adns_begin(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - adns_end(); - return data; -} - -void pointing_device_init(void) { - dprint("STARTING INTI\n"); - - spi_init(); - // reset serial port - adns_begin(); - adns_end(); - - // reboot - adns_write(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); - - // upload firmware - - // set the configuration_IV register in 3k firmware mode - // bit 1 = 1 for 3k mode, other bits are reserved - adns_write(REG_Configuration_V, 0x02); - - // write 0x1d in SROM_enable reg for initializing - adns_write(REG_SROM_Enable, 0x1d); - - // wait for more than one frame period - // assume that the frame rate is as low as 100fps... even if it should never be that low - wait_ms(10); - - // write 0x18 to SROM_enable to start SROM download - adns_write(REG_SROM_Enable, 0x18); - - // write the SROM file (=firmware data) - - // write burst destination adress - adns_begin(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < firmware_length; i++){ - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - - adns_end(); - wait_ms(10); - - // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) - // reading the actual value of the register is important because the real - // default value is different from what is said in the datasheet, and if you - // change the reserved bytes (like by writing 0x00...) it would not work. - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); - - wait_ms(1); - - // set the configuration_I register to set the CPI - // 0x01 = 50, minimum - // 0x44 = 3400, default - // 0x8e = 7100 - // 0xA4 = 8200, maximum - adns_write(REG_Configuration_I, 0x1A); - - wait_ms(100); - dprint("INIT ENDED\n"); -} - -int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - //int16_t twos_comp = (high << 8) | low; - //return twos_comp; - return (high << 8) | low; -} - -motion_delta_t readSensor(void) { - adns_begin(); - - // read from Motion_Burst to enable burt mode - spi_write(REG_Motion_Burst & 0x7f); - - // Wait one frame per docs, thanks u/kbjunky - wait_us(100); - uint8_t burst_data[pixel_sum]; - - for (int i = 0; i < pixel_sum; ++i) { - burst_data[i] = spi_read(); - } - - uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); - uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); - // Only consider the MSB for motion as this byte has other status bits - uint8_t motion_ind = burst_data[motion] & 0b10000000; - adns_end(); - - motion_delta_t delta = {delta_x, delta_y, motion_ind}; - return delta; -} - -bool pointing_device_task(void) { - motion_delta_t delta = readSensor(); - - report_mouse_t report = pointing_device_get_report(); - - if(delta.motion_ind) { - // clamp deltas from -127 to 127 - report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; - report.x = -report.x; - report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; - } - - pointing_device_set_report(report); - return pointing_device_send(); -} diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns.h b/keyboards/htx_studio/one_handed_keyboard_ml/adns.h deleted file mode 100644 index e557aeb2ece..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_ml/adns.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#pragma once - -#include - -void adns_begin(void); - -void adns_end(void); - -void adns_write(uint8_t reg_addr, uint8_t data); - -uint8_t adns_read(uint8_t reg_addr); - - -int16_t convertDeltaToInt(uint8_t high, uint8_t low); - -struct _motion_delta { - int16_t delta_x; - int16_t delta_y; - int8_t motion_ind; -}; -typedef struct _motion_delta motion_delta_t; - -motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h deleted file mode 100644 index fddf30589d4..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_ml/adns9800_srom_A6.h +++ /dev/null @@ -1,3081 +0,0 @@ -// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. -// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk - -#pragma once - -#include "progmem.h" - -const uint16_t firmware_length = 3070; - -const uint8_t firmware_data[] PROGMEM = { - 0x03, -0xa6, -0x68, -0x1e, -0x7d, -0x10, -0x7e, -0x7e, -0x5f, -0x1c, -0xb8, -0xf2, -0x47, -0x0c, -0x7b, -0x74, -0x4b, -0x14, -0x8b, -0x75, -0x66, -0x51, -0x0b, -0x8c, -0x76, -0x74, -0x4b, -0x14, -0xaa, -0xd6, -0x0f, -0x9c, -0xba, -0xf6, -0x6e, -0x3f, -0xdd, -0x38, -0xd5, -0x02, -0x80, -0x9b, -0x82, -0x6d, -0x58, -0x13, -0xa4, -0xab, -0xb5, -0xc9, -0x10, -0xa2, -0xc6, -0x0a, -0x7f, -0x5d, -0x19, -0x91, -0xa0, -0xa3, -0xce, -0xeb, -0x3e, -0xc9, -0xf1, -0x60, -0x42, -0xe7, -0x4c, -0xfb, -0x74, -0x6a, -0x56, -0x2e, -0xbf, -0xdd, -0x38, -0xd3, -0x05, -0x88, -0x92, -0xa6, -0xce, -0xff, -0x5d, -0x38, -0xd1, -0xcf, -0xef, -0x58, -0xcb, -0x65, -0x48, -0xf0, -0x35, -0x85, -0xa9, -0xb2, -0x8f, -0x5e, -0xf3, -0x80, -0x94, -0x97, -0x7e, -0x75, -0x97, -0x87, -0x73, -0x13, -0xb0, -0x8a, -0x69, -0xd4, -0x0a, -0xde, -0xc1, -0x79, -0x59, -0x36, -0xdb, -0x9d, -0xd6, -0xb8, -0x15, -0x6f, -0xce, -0x3c, -0x72, -0x32, -0x45, -0x88, -0xdf, -0x6c, -0xa5, -0x6d, -0xe8, -0x76, -0x96, -0x14, -0x74, -0x20, -0xdc, -0xf4, -0xfa, -0x37, -0x6a, -0x27, -0x32, -0xe3, -0x29, -0xbf, -0xc4, -0xc7, -0x06, -0x9d, -0x58, -0xe7, -0x87, -0x7c, -0x2e, -0x9f, -0x6e, -0x49, -0x07, -0x5d, -0x23, -0x64, -0x54, -0x83, -0x6e, -0xcb, -0xb7, -0x77, -0xf7, -0x2b, -0x6e, -0x0f, -0x2e, -0x66, -0x12, -0x60, -0x55, -0x65, -0xfc, -0x43, -0xb3, -0x58, -0x73, -0x5b, -0xe8, -0x67, -0x04, -0x43, -0x02, -0xde, -0xb3, -0x89, -0xa0, -0x6d, -0x3a, -0x27, -0x79, -0x64, -0x5b, -0x0c, -0x16, -0x9e, -0x66, -0xb1, -0x8b, -0x87, -0x0c, -0x5d, -0xf2, -0xb6, -0x3d, -0x71, -0xdf, -0x42, -0x03, -0x8a, -0x06, -0x8d, -0xef, -0x1d, -0xa8, -0x96, -0x5c, -0xed, -0x31, -0x61, -0x5c, -0xa1, -0x34, -0xf6, -0x8c, -0x08, -0x60, -0x33, -0x07, -0x00, -0x3e, -0x79, -0x95, -0x1b, -0x43, -0x7f, -0xfe, -0xb6, -0xa6, -0xd4, -0x9d, -0x76, -0x72, -0xbf, -0xad, -0xc0, -0x15, -0xe8, -0x37, -0x31, -0xa3, -0x72, -0x63, -0x52, -0x1d, -0x1c, -0x5d, -0x51, -0x1b, -0xe1, -0xa9, -0xed, -0x60, -0x32, -0x3e, -0xa9, -0x50, -0x28, -0x53, -0x06, -0x59, -0xe2, -0xfc, -0xe7, -0x02, -0x64, -0x39, -0x21, -0x56, -0x4a, -0xa5, -0x40, -0x80, -0x81, -0xd5, -0x5a, -0x60, -0x7b, -0x68, -0x84, -0xf1, -0xe0, -0xb1, -0xb6, -0x5b, -0xdf, -0xa8, -0x1d, -0x6d, -0x65, -0x20, -0xc0, -0xa2, -0xb9, -0xd9, -0xbb, -0x00, -0xa6, -0xdb, -0x8b, -0x01, -0x53, -0x91, -0xfe, -0xc4, -0x51, -0x85, -0xb0, -0x96, -0x7f, -0xfd, -0x51, -0xdd, -0x14, -0x03, -0x67, -0x2e, -0x75, -0x1c, -0x76, -0xd3, -0x6e, -0xdd, -0x99, -0x55, -0x76, -0xe5, -0xab, -0x23, -0xfc, -0x4a, -0xd5, -0xc6, -0xe8, -0x2e, -0xca, -0x8a, -0xb3, -0xf6, -0x8c, -0x6c, -0xb0, -0xe9, -0xf2, -0xe7, -0x9e, -0x69, -0x41, -0xed, -0xf1, -0x6d, -0xd2, -0x86, -0xd8, -0x7e, -0xcb, -0x5d, -0x47, -0x6c, -0x85, -0x6a, -0x23, -0xed, -0x20, -0x40, -0x93, -0xb4, -0x20, -0xc7, -0xa5, -0xc9, -0xaf, -0x03, -0x15, -0xac, -0x19, -0xe5, -0x2a, -0x36, -0xdf, -0x6d, -0xc5, -0x8c, -0x80, -0x07, -0xce, -0x92, -0x0c, -0xd8, -0x06, -0x62, -0x0f, -0xdd, -0x48, -0x46, -0x1a, -0x53, -0xc7, -0x8a, -0x8c, -0x5d, -0x5d, -0xb4, -0xa1, -0x02, -0xd3, -0xa9, -0xb8, -0xf3, -0x94, -0x8f, -0x3f, -0xe5, -0x54, -0xd4, -0x11, -0x65, -0xb2, -0x5e, -0x09, -0x0b, -0x81, -0xe3, -0x75, -0xa7, -0x89, -0x81, -0x39, -0x6c, -0x46, -0xf6, -0x06, -0x9f, -0x27, -0x3b, -0xb6, -0x2d, -0x5f, -0x1d, -0x4b, -0xd4, -0x7b, -0x1d, -0x61, -0x74, -0x89, -0xe4, -0xe3, -0xbd, -0x98, -0x1b, -0xc4, -0x51, -0x3b, -0xa4, -0xfa, -0xe0, -0x92, -0xf7, -0xbe, -0xf2, -0x4d, -0xbb, -0xff, -0xad, -0x4f, -0x6d, -0x68, -0xc2, -0x79, -0x40, -0xaa, -0x9b, -0x8f, -0x0c, -0x32, -0x4b, -0x5f, -0x3e, -0xab, -0x59, -0x98, -0xb3, -0xf5, -0x1d, -0xac, -0x5e, -0xbc, -0x78, -0xd3, -0x01, -0x6c, -0x64, -0x15, -0x2f, -0xd8, -0x71, -0xa6, -0x2d, -0x45, -0xe1, -0x22, -0x42, -0xe4, -0x4e, -0x04, -0x3c, -0x7d, -0xf4, -0x40, -0x21, -0xb4, -0x67, -0x05, -0xa8, -0xe2, -0xf3, -0x72, -0x87, -0x4c, -0x7d, -0xd9, -0x1b, -0x65, -0x97, -0xf3, -0xc2, -0xe3, -0xe4, -0xc8, -0xd2, -0xde, -0xf6, -0xef, -0xdc, -0xbb, -0x44, -0x08, -0x5e, -0xe2, -0x45, -0x27, -0x01, -0xb0, -0xf6, -0x43, -0xe7, -0x3a, -0xf6, -0xdc, -0x9d, -0xed, -0xf3, -0xc5, -0x0c, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x36, -0xee, -0x96, -0x72, -0x67, -0xe7, -0x81, -0x91, -0xd5, -0x05, -0x0a, -0xe0, -0x82, -0xd5, -0x8f, -0xe8, -0xf9, -0xb0, -0xc9, -0xcf, -0x93, -0xe7, -0x04, -0xc5, -0xbc, -0x2b, -0x43, -0x56, -0x7e, -0xe8, -0x67, -0x7c, -0xe5, -0xfb, -0x49, -0xad, -0x5e, -0x9f, -0x25, -0x13, -0xde, -0x6e, -0x6e, -0xe9, -0xf1, -0xec, -0x87, -0x0b, -0x59, -0x81, -0x76, -0x84, -0x76, -0xb3, -0x24, -0xaf, -0x30, -0xfd, -0x27, -0x8b, -0xab, -0xd8, -0x00, -0x8b, -0x9b, -0x0c, -0xd2, -0xb2, -0x4e, -0x5e, -0x9d, -0x1d, -0x96, -0x01, -0x00, -0x67, -0xc1, -0x5f, -0x02, -0x20, -0xfd, -0x45, -0x6a, -0x01, -0x60, -0x58, -0x45, -0xca, -0x47, -0x21, -0x90, -0x5a, -0xc4, -0x43, -0x26, -0x1a, -0xd7, -0xa5, -0x4a, -0xb2, -0x5d, -0x2b, -0x35, -0x49, -0xfb, -0xa5, -0x17, -0x92, -0x21, -0x1e, -0x93, -0x96, -0x67, -0xa2, -0x7e, -0x36, -0x7a, -0xde, -0x5f, -0xbe, -0x7a, -0x58, -0x9d, -0xf8, -0x78, -0xa3, -0xfa, -0xc8, -0xd5, -0x17, -0xf0, -0x21, -0x97, -0x8c, -0x80, -0xb5, -0x4b, -0x3b, -0xbd, -0xbb, -0x41, -0x21, -0xa8, -0x50, -0x67, -0xf7, -0xe7, -0x19, -0x80, -0x10, -0x8e, -0xce, -0x04, -0x18, -0x3f, -0x51, -0x6b, -0x77, -0xd8, -0x9e, -0x16, -0xaf, -0xec, -0xef, -0x48, -0x16, -0x4d, -0x9e, -0x85, -0x38, -0x18, -0x3e, -0xd4, -0x28, -0x87, -0x60, -0x2a, -0xf6, -0x7f, -0x09, -0x86, -0x6f, -0x9c, -0x3c, -0x3a, -0xff, -0xab, -0xd0, -0x61, -0xa2, -0x97, -0x0d, -0x71, -0x94, -0x7e, -0xfd, -0xb9, -0x80, -0x02, -0x89, -0x6a, -0xb3, -0x84, -0x6c, -0x2a, -0x77, -0x62, -0xbe, -0x0b, -0xf4, -0xaf, -0xac, -0x7b, -0x7c, -0x8e, -0xca, -0x01, -0xba, -0x71, -0x78, -0x94, -0xfd, -0xb5, -0x39, -0xa4, -0x4d, -0x2f, -0x78, -0xcf, -0xca, -0x92, -0x0c, -0x1a, -0x99, -0x48, -0x4c, -0x11, -0x96, -0xb5, -0x4e, -0x41, -0x28, -0xe4, -0xa6, -0xfe, -0x4b, -0x72, -0x91, -0xe7, -0xd4, -0xdd, -0x9f, -0x12, -0xe6, -0x29, -0x38, -0xce, -0x45, -0xae, -0x02, -0xb8, -0x24, -0xae, -0xbd, -0xe9, -0x66, -0x08, -0x62, -0xa2, -0x2c, -0x2b, -0x00, -0xe2, -0x23, -0xd9, -0xc4, -0x48, -0xe4, -0xd3, -0xac, -0xbb, -0x34, -0xc7, -0xf0, -0xe3, -0x4f, -0xb9, -0x30, -0xea, -0xa2, -0x12, -0xf1, -0x30, -0x2c, -0x36, -0xde, -0x48, -0xf2, -0xb0, -0x4c, -0x43, -0x3f, -0x2e, -0x58, -0xe4, -0x20, -0xe3, -0x58, -0xcd, -0x31, -0x22, -0xf0, -0xa2, -0x2a, -0xe6, -0x19, -0x90, -0x55, -0x86, -0xf6, -0x55, -0x79, -0xd1, -0xd7, -0x46, -0x2f, -0xc0, -0xdc, -0x99, -0xe8, -0xf3, -0x6a, -0xdf, -0x7f, -0xeb, -0x24, -0x4a, -0x1e, -0x5a, -0x75, -0xde, -0x2f, -0x5c, -0x19, -0x61, -0x03, -0x53, -0x54, -0x6a, -0x3b, -0x18, -0x70, -0xb6, -0x4f, -0xf1, -0x9c, -0x0a, -0x59, -0x9d, -0x19, -0x92, -0x65, -0x8c, -0x83, -0x14, -0x2d, -0x44, -0x8a, -0x75, -0xa9, -0xf5, -0x90, -0xd2, -0x66, -0x4e, -0xfa, -0x69, -0x0f, -0x5b, -0x0b, -0x98, -0x65, -0xc8, -0x11, -0x42, -0x59, -0x7f, -0xdd, -0x1b, -0x75, -0x17, -0x31, -0x4c, -0x75, -0x58, -0xeb, -0x58, -0x63, -0x7d, -0xf2, -0xa6, -0xc2, -0x6e, -0xb7, -0x3f, -0x3e, -0x5e, -0x47, -0xad, -0xb7, -0x04, -0xe8, -0x05, -0xf8, -0xb2, -0xcf, -0x19, -0xf3, -0xd2, -0x85, -0xfe, -0x3e, -0x3e, -0xb1, -0x62, -0x08, -0x2c, -0x10, -0x07, -0x0d, -0x73, -0x90, -0x17, -0xfa, -0x9b, -0x56, -0x02, -0x75, -0xf9, -0x51, -0xe0, -0xe9, -0x1a, -0x7b, -0x9f, -0xb3, -0xf3, -0x98, -0xb8, -0x1c, -0x9c, -0xe1, -0xd5, -0x35, -0xae, -0xc8, -0x60, -0x48, -0x11, -0x09, -0x94, -0x6b, -0xd0, -0x8b, -0x15, -0xbc, -0x05, -0x68, -0xd3, -0x54, -0x8a, -0x51, -0x39, -0x5c, -0x42, -0x76, -0xce, -0xd8, -0xad, -0x89, -0x30, -0xc9, -0x05, -0x1c, -0xcc, -0x94, -0x3f, -0x0f, -0x90, -0x6f, -0x72, -0x2d, -0x85, -0x64, -0x9a, -0xb9, -0x23, -0xf9, -0x0b, -0xc3, -0x7c, -0x39, -0x0f, -0x97, -0x07, -0x97, -0xda, -0x58, -0x48, -0x33, -0x05, -0x23, -0xb8, -0x82, -0xe8, -0xd3, -0x53, -0x89, -0xaf, -0x33, -0x80, -0x22, -0x84, -0x0c, -0x95, -0x5c, -0x67, -0xb8, -0x77, -0x0c, -0x5c, -0xa2, -0x5f, -0x3d, -0x58, -0x0f, -0x27, -0xf3, -0x2f, -0xae, -0x48, -0xbd, -0x0b, -0x6f, -0x54, -0xfb, -0x67, -0x4c, -0xea, -0x32, -0x27, -0xf1, -0xfa, -0xe2, -0xb0, -0xec, -0x0b, -0x15, -0xb4, -0x70, -0xf6, -0x5c, -0xdd, -0x71, -0x60, -0xc3, -0xc1, -0xa8, -0x32, -0x65, -0xac, -0x7a, -0x77, -0x41, -0xe5, -0xa9, -0x6b, -0x11, -0x81, -0xfa, -0x34, -0x8d, -0xfb, -0xc1, -0x80, -0x6e, -0xc4, -0x60, -0x30, -0x07, -0xd4, -0x8b, -0x67, -0xbd, -0xaa, -0x8c, -0x9c, -0x64, -0xac, -0xdb, -0x0b, -0x24, -0x8b, -0x63, -0x6f, -0xe6, -0xbc, -0xe7, -0x33, -0xa4, -0x4a, -0x4c, -0xa7, -0x9f, -0x43, -0x53, -0xd2, -0xbb, -0x8f, -0x43, -0xc7, -0x3d, -0x78, -0x68, -0x3f, -0xa5, -0x3d, -0xca, -0x69, -0x84, -0xa6, -0x97, -0x2d, -0xc0, -0x7d, -0x31, -0x34, -0x55, -0x1d, -0x07, -0xb1, -0x5f, -0x40, -0x5c, -0x93, -0xb0, -0xbc, -0x7c, -0xb0, -0xbc, -0xe7, -0x12, -0xee, -0x6b, -0x2b, -0xd3, -0x4d, -0x67, -0x70, -0x3a, -0x9a, -0xf2, -0x3c, -0x7c, -0x81, -0xfa, -0xd7, -0xd9, -0x90, -0x91, -0x81, -0xb8, -0xb1, -0xf3, -0x48, -0x6a, -0x26, -0x4f, -0x0c, -0xce, -0xb0, -0x9e, -0xfd, -0x4a, -0x3a, -0xaf, -0xac, -0x5b, -0x3f, -0xbf, -0x44, -0x5a, -0xa3, -0x19, -0x1e, -0x4b, -0xe7, -0x36, -0x6a, -0xd7, -0x20, -0xae, -0xd7, -0x7d, -0x3b, -0xe7, -0xff, -0x3a, -0x86, -0x2e, -0xd0, -0x4a, -0x3e, -0xaf, -0x9f, -0x8e, -0x01, -0xbf, -0xf8, -0x4f, -0xc1, -0xe8, -0x6f, -0x74, -0xe1, -0x45, -0xd3, -0xf7, -0x04, -0x6a, -0x4b, -0x9d, -0xec, -0x33, -0x27, -0x76, -0xd7, -0xc5, -0xe1, -0xb0, -0x3b, -0x0e, -0x23, -0xec, -0xf0, -0x86, -0xd2, -0x1a, -0xbf, -0x3d, -0x04, -0x62, -0xb3, -0x6c, -0xb2, -0xeb, -0x17, -0x05, -0xa6, -0x0a, -0x8a, -0x7e, -0x83, -0x1c, -0xb6, -0x37, -0x09, -0xc6, -0x0b, -0x70, -0x3c, -0xb5, -0x93, -0x81, -0xd8, -0x93, -0xa0, -0x5f, -0x1e, -0x08, -0xe2, -0xc6, -0xe5, -0xc9, -0x72, -0xf1, -0xf1, -0xc1, -0xed, -0xd5, -0x58, -0x93, -0x83, -0xf8, -0x65, -0x67, -0x2e, -0x0d, -0xa9, -0xf1, -0x64, -0x12, -0xe6, -0x4c, -0xea, -0x15, -0x3f, -0x8c, -0x1a, -0xb6, -0xbf, -0xf6, -0xb9, -0x52, -0x35, -0x09, -0xb0, -0xe6, -0xf7, -0xcd, -0xf1, -0xa5, -0xaa, -0x81, -0xd1, -0x81, -0x6f, -0xb4, -0xa9, -0x66, -0x1f, -0xfc, -0x48, -0xc0, -0xb6, -0xd1, -0x8b, -0x06, -0x2f, -0xf6, -0xef, -0x1f, -0x0a, -0xe6, -0xce, -0x3a, -0x4a, -0x55, -0xbf, -0x6d, -0xf9, -0x4d, -0xd4, -0x08, -0x45, -0x4b, -0xc3, -0x66, -0x19, -0x92, -0x10, -0xe1, -0x17, -0x8e, -0x28, -0x91, -0x16, -0xbf, -0x3c, -0xee, -0xa3, -0xa6, -0x99, -0x92, -0x10, -0xe1, -0xf6, -0xcc, -0xac, -0xb8, -0x65, -0x0b, -0x43, -0x66, -0xf8, -0xe3, -0xe5, -0x3f, -0x24, -0x89, -0x47, -0x5d, -0x78, -0x43, -0xd0, -0x61, -0x17, -0xbd, -0x5b, -0x64, -0x54, -0x08, -0x45, -0x59, -0x93, -0xf6, -0x95, -0x8a, -0x41, -0x51, -0x62, -0x4b, -0x51, -0x02, -0x30, -0x73, -0xc7, -0x87, -0xc5, -0x4b, -0xa2, -0x97, -0x0f, -0xe8, -0x46, -0x5f, -0x7e, -0x2a, -0xe1, -0x30, -0x20, -0xb0, -0xfa, -0xe7, -0xce, -0x61, -0x42, -0x57, -0x6e, -0x21, -0xf3, -0x7a, -0xec, -0xe3, -0x25, -0xc7, -0x25, -0xf3, -0x67, -0xa7, -0x57, -0x40, -0x00, -0x02, -0xcf, -0x1c, -0x80, -0x77, -0x67, -0xbd, -0x70, -0xa1, -0x19, -0x92, -0x31, -0x75, -0x93, -0x27, -0x27, -0xb6, -0x82, -0xe4, -0xeb, -0x1d, -0x78, -0x48, -0xe7, -0xa5, -0x5e, -0x57, -0xef, -0x64, -0x28, -0x64, -0x1b, -0xf6, -0x11, -0xb2, -0x03, -0x9d, -0xb9, -0x18, -0x02, -0x27, -0xf7, -0xbe, -0x9d, -0x55, -0xfc, -0x00, -0xd2, -0xc7, -0xae, -0xad, -0x0b, -0xc5, -0xe9, -0x42, -0x41, -0x48, -0xd8, -0x32, -0xcf, -0xf6, -0x0f, -0xf5, -0xbc, -0x97, -0xc6, -0x99, -0x47, -0x76, -0xbd, -0x89, -0x06, -0x0f, -0x63, -0x0c, -0x51, -0xd4, -0x5e, -0xea, -0x48, -0xa8, -0xa2, -0x56, -0x1c, -0x79, -0x84, -0x86, -0x40, -0x88, -0x41, -0x76, -0x55, -0xfc, -0xc2, -0xd7, -0xfd, -0xc9, -0xc7, -0x80, -0x61, -0x35, -0xa7, -0x43, -0x20, -0xf7, -0xeb, -0x6c, -0x66, -0x13, -0xb0, -0xec, -0x02, -0x75, -0x3e, -0x4b, -0xaf, -0xb9, -0x5d, -0x40, -0xda, -0xd6, -0x6e, -0x2d, -0x39, -0x54, -0xc2, -0x95, -0x35, -0x54, -0x25, -0x72, -0xe1, -0x78, -0xb8, -0xeb, -0xc1, -0x16, -0x58, -0x0f, -0x9c, -0x9b, -0xb4, -0xea, -0x37, -0xec, -0x3b, -0x11, -0xba, -0xd5, -0x8a, -0xa9, -0xe3, -0x98, -0x00, -0x51, -0x1c, -0x14, -0xe0, -0x40, -0x96, -0xe5, -0xe9, -0xf2, -0x21, -0x22, -0xb1, -0x23, -0x60, -0x78, -0xd3, -0x17, -0xf8, -0x7a, -0xa5, -0xa8, -0xba, -0x20, -0xd3, -0x15, -0x1e, -0x32, -0xe4, -0x5e, -0x15, -0x48, -0xae, -0xa9, -0xe5, -0xb8, -0x33, -0xec, -0xe8, -0xa2, -0x42, -0xac, -0xbf, -0x10, -0x84, -0x53, -0x87, -0x19, -0xb4, -0x5f, -0x76, -0x4d, -0x01, -0x9d, -0x56, -0x74, -0xd9, -0x5c, -0x97, -0xe7, -0x88, -0xea, -0x3a, -0xbf, -0xdc, -0x4c, -0x33, -0x8a, -0x16, -0xb9, -0x5b, -0xfa, -0xd8, -0x42, -0xa7, -0xbb, -0x3c, -0x04, -0x27, -0x78, -0x49, -0x81, -0x2a, -0x5a, -0x7d, -0x7c, -0x23, -0xa8, -0xba, -0xf7, -0x9a, -0x9f, -0xd2, -0x66, -0x3e, -0x38, -0x3c, -0x75, -0xf9, -0xd1, -0x30, -0x26, -0x30, -0x6e, -0x5a, -0x6e, -0xdc, -0x6a, -0x69, -0x32, -0x50, -0x33, -0x47, -0x9e, -0xa4, -0xa8, -0x64, -0x66, -0xf0, -0x8a, -0xe4, -0xfd, -0x27, -0x6f, -0x51, -0x25, -0x8b, -0x43, -0x74, -0xc9, -0x8e, -0xbd, -0x88, -0x31, -0xbe, -0xec, -0x65, -0xd2, -0xcb, -0x8d, -0x5a, -0x13, -0x48, -0x16, -0x8c, -0x61, -0x0b, -0x11, -0xf6, -0xc6, -0x66, -0xae, -0xc3, -0xcc, -0x0c, -0xd2, -0xe1, -0x9f, -0x82, -0x41, -0x3f, -0x56, -0xf9, -0x73, -0xef, -0xdc, -0x30, -0x50, -0xcf, -0xb6, -0x7f, -0xbc, -0xd0, -0xb3, -0x10, -0xab, -0x24, -0xe4, -0xec, -0xad, -0x18, -0x8c, -0x39, -0x2d, -0x30, -0x4c, -0xc5, -0x40, -0x0d, -0xf6, -0xac, -0xd6, -0x18, -0x5d, -0x96, -0xbf, -0x5f, -0x71, -0x75, -0x96, -0x22, -0x97, -0x0f, -0x02, -0x94, -0x6e, -0xa6, -0xae, -0x6d, -0x8f, -0x1e, -0xca, -0x12, -0x9b, -0x2a, -0x1c, -0xce, -0xa9, -0xee, -0xfd, -0x12, -0x8e, -0xfc, -0xed, -0x09, -0x33, -0xba, -0xf4, -0x1a, -0x15, -0xf6, -0x9d, -0x87, -0x16, -0x43, -0x7c, -0x78, -0x57, -0xe1, -0x44, -0xc9, -0xeb, -0x1f, -0x58, -0x4d, -0xc1, -0x49, -0x11, -0x5c, -0xb2, -0x11, -0xa8, -0x55, -0x16, -0xf1, -0xc6, -0x50, -0xe9, -0x87, -0x89, -0xf6, -0xcf, -0xd8, -0x9c, -0x51, -0xa7, -0xbc, -0x5b, -0x31, -0x6d, -0x4d, -0x51, -0xd0, -0x4c, -0xbc, -0x0d, -0x58, -0x2d, -0x7b, -0x88, -0x7a, -0xf9, -0x8e, -0xd6, -0x40, -0x4d, -0xbb, -0xbe, -0xc4, -0xe5, -0x07, -0xfc, -0xd9, -0x7b, -0x6d, -0xa6, -0x42, -0x57, -0x8f, -0x02, -0x94, -0x4f, -0xe4, -0x2a, -0x65, -0xe2, -0x19, -0x5a, -0x50, -0xe1, -0x25, -0x65, -0x4a, -0x60, -0xc2, -0xcd, -0xa8, -0xec, -0x05, -0x2e, -0x87, -0x7b, -0x95, -0xb7, -0x4f, -0xa0, -0x0b, -0x1b, -0x4a, -0x7f, -0x92, -0xc8, -0x90, -0xee, -0x89, -0x1e, -0x10, -0xd2, -0x85, -0xe4, -0x9f, -0x63, -0xc8, -0x12, -0xbb, -0x4e, -0xb8, -0xcf, -0x0a, -0xec, -0x18, -0x4e, -0xe6, -0x7c, -0xb3, -0x33, -0x26, -0xc7, -0x1f, -0xd2, -0x04, -0x23, -0xea, -0x07, -0x0c, -0x5f, -0x90, -0xbd, -0xa7, -0x6a, -0x0f, -0x4a, -0xd6, -0x10, -0x01, -0x3c, -0x12, -0x29, -0x2e, -0x96, -0xc0, -0x4d, -0xbb, -0xbe, -0xe5, -0xa7, -0x83, -0xd5, -0x6a, -0x3c, -0xe3, -0x5b, -0xb8, -0xf2, -0x5c, -0x6d, -0x1f, -0xa6, -0xf3, -0x12, -0x24, -0xf6, -0xd6, -0x3b, -0x10, -0x14, -0x09, -0x07, -0x82, -0xe8, -0x30, -0x6a, -0x99, -0xdc, -0x95, -0x01, -0x9c, -0xd4, -0x68, -0x3b, -0xca, -0x98, -0x12, -0xab, -0x77, -0x25, -0x15, -0x7d, -0x10, -0x32, -0x45, -0x98, -0xcd, -0x7a, -0xdf, -0x71, -0x8a, -0x75, -0xc1, -0x1c, -0xd4, -0x68, -0x25, -0xeb, -0xbb, -0x54, -0x27, -0x6f, -0x2a, -0xf7, -0xb9, -0x98, -0x03, -0x27, -0xde, -0x24, -0xa8, -0xbb, -0x98, -0xc2, -0x84, -0xff, -0x9b, -0x51, -0xd8, -0x53, -0x50, -0xda, -0xf5, -0x88, -0xaa, -0x87, -0x2f, -0xae, -0xd6, -0xea, -0x6b, -0xde, -0xc8, -0xd7, -0xa7, -0x28, -0x65, -0x81, -0xe8, -0xb2, -0x3b, -0x1d, -0x4f, -0x75, -0x8f, -0x9f, -0x7a, -0x74, -0x8e, -0xc1, -0x5f, -0x9a, -0xa8, -0x9d, -0xfa, -0x03, -0xa3, -0x71, -0x9b, -0x37, -0x6d, -0xd5, -0x0b, -0xf5, -0xe1, -0xa1, -0x1b, -0x01, -0x6a, -0xc6, -0x67, -0xaa, -0xea, -0x2c, -0x9d, -0xa4, -0xd2, -0x6e, -0xfc, -0xde, -0x2e, -0x7f, -0x94, -0x69, -0xe5, -0x4a, -0xe0, -0x01, -0x48, -0x3c, -0x6b, -0xf7, -0x1e, -0xb6, -0x0b, -0x5f, -0xf9, -0x2e, -0x07, -0xc5, -0xe8, -0xae, -0x37, -0x1b, -0xbc, -0x3c, -0xd8, -0xd5, -0x0b, -0x91, -0x9e, -0x80, -0x24, -0xf5, -0x06, -0x0c, -0x0e, -0x98, -0x07, -0x96, -0x2d, -0x19, -0xdc, -0x58, -0x93, -0xcc, -0xfb, -0x4e, -0xeb, -0xbd, -0x0f, -0xf5, -0xaf, -0x01, -0xfa, -0xf1, -0x7c, -0x43, -0x8c, -0xb8, -0x56, -0x3e, -0xbe, -0x77, -0x4e, -0x2b, -0xf7, -0xbb, -0xb7, -0x45, -0x47, -0xcd, -0xcc, -0xa6, -0x4c, -0x72, -0x7b, -0x6a, -0x2a, -0x70, -0x13, -0x07, -0xfd, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x23, -0x67, -0x5b, -0x34, -0xd5, -0x14, -0x0c, -0xab, -0x77, -0x1f, -0xf8, -0x3d, -0x5a, -0x9f, -0x92, -0xb7, -0x2c, -0xad, -0x31, -0xde, -0x61, -0x07, -0xb3, -0x6b, -0xf7, -0x38, -0x15, -0x95, -0x46, -0x14, -0x48, -0x53, -0x69, -0x52, -0x66, -0x07, -0x6d, -0x83, -0x71, -0x8a, -0x67, -0x25, -0x20, -0x0f, -0xfe, -0xd7, -0x02, -0xd7, -0x6e, -0x2c, -0xd2, -0x1a, -0x0a, -0x5d, -0xfd, -0x0f, -0x74, -0xe3, -0xa4, -0x36, -0x07, -0x9a, -0xdf, -0xd4, -0x79, -0xbf, -0xef, -0x59, -0xc0, -0x44, -0x52, -0x87, -0x9a, -0x6e, -0x1d, -0x0e, -0xee, -0xde, -0x2e, -0x1a, -0xa9, -0x8f, -0x3a, -0xc9, -0xba, -0xec, -0x99, -0x78, -0x2d, -0x55, -0x6b, -0x14, -0xc2, -0x06, -0xd5, -0xfc, -0x93, -0x53, -0x4d, -0x11, -0x8c, -0xf8, -0xfa, -0x79, -0x7c, -0xa6, -0x64, -0xae, -0x61, -0xb8, -0x7b, -0x94, -0x56, -0xa6, -0x39, -0x78, -0x9a, -0xe5, -0xc7, -0xdf, -0x18, -0x63, -0x23, -0x9c, -0xfa, -0x66, -0xbb, -0xb7, -0x5a, -0x27, -0x4c, -0xd1, -0xa1, -0x83, -0x22, -0xb3, -0x52, -0x49, -0x35, -0xb0, -0x22, -0x83, -0x59, -0x12, -0x00, -0x16, -0x98, -0xdd, -0xad, -0xc2, -0x94, -0xf9, -0xd3, -0x7b, -0x64, -0x7f, -0x44, -0x3e, -0x3c, -0x8b, -0x9a, -0x83, -0x9c, -0x69, -0x6b, -0xe4, -0xdf, -0x9f, -0xed, -0x54, -0x1f, -0xe5, -0x5d, -0x7a, -0x05, -0x82, -0xb3, -0xdd, -0xef, -0xfc, -0x53, -0x96, -0xb0, -0x2c, -0x5a, -0xf8, -0xdf, -0x9c, -0x8b, -0x16, -0x4e, -0xdf, -0xda, -0x4d, -0x09, -0x09, -0x69, -0x50, -0x03, -0x65, -0xd8, -0x73, -0x70, -0xe8, -0x86, -0xbf, -0xbb, -0x35, -0xce, -0xb2, -0x46, -0xcb, -0x02, -0x00, -0x5b, -0xb4, -0xe2, -0xc6, -0x8f, -0x2f, -0x98, -0xaf, -0x87, -0x4b, -0x48, -0x45, -0xed, -0xcc, -0x1d, -0xe6, -0x58, -0xd6, -0xf2, -0x50, -0x25, -0x9f, -0x52, -0xc7, -0xcb, -0x8a, -0x17, -0x9d, -0x5b, -0xe5, -0xc8, -0xd7, -0x72, -0xb7, -0x52, -0xb2, -0xc4, -0x98, -0xe3, -0x7a, -0x17, -0x3e, -0xc6, -0x60, -0xa7, -0x97, -0xb0, -0xcf, -0x18, -0x81, -0x53, -0x84, -0x4c, -0xd5, -0x17, -0x32, -0x03, -0x13, -0x39, -0x51, -0x09, -0x10, -0xe3, -0x77, -0x49, -0x4f, -0x62, -0x01, -0xbf, -0x8c, -0x9a, -0xe0, -0x41, -0x9e, -0x89, -0x74, -0x36, -0xf9, -0x96, -0x86, -0x2e, -0x96, -0x1c, -0x4a, -0xb7, -0x2b, -0x4a, -0x97, -0xbc, -0x99, -0x40, -0xa3, -0xe0, -0x3d, -0xc8, -0xad, -0x2f, -0xdf, -0x4f, -0x2c, -0xc4, -0x69, -0x82, -0x9f, -0x9b, -0x81, -0x0c, -0x61, -0x5c, -0xa5, -0x9d, -0x8c, -0x89, -0xc0, -0x2c, -0xb4, -0x4a, -0x33, -0x4e, -0xeb, -0xa2, -0x56, -0x40, -0xc0, -0xc2, -0x46, -0xaf, -0x6a, -0xfc, -0x67, -0xd1, -0x80, -0x5e, -0xc5, -0x6d, -0x84, -0x43, -0x27, -0x3f, -0x55, -0x15, -0x96, -0x6a, -0xa0, -0xa5, -0xda, -0xb7, -0xff, -0xb7, -0x75, -0x6e, -0x4c, -0x49, -0x91, -0x9d, -0x22, -0xa3, -0x46, -0xea, -0xed, -0x9a, -0x00, -0xe2, -0x32, -0xc3, -0xd6, -0xa9, -0x71, -0x20, -0x55, -0xa3, -0x19, -0xed, -0xf8, -0x4f, -0xa7, -0x12, -0x9c, -0x66, -0x87, -0xaf, -0x4e, -0xb7, -0xf0, -0xdb, -0xbf, -0xef, -0xf0, -0xf6, -0xaf, -0xea, -0xda, -0x09, -0xfe, -0xde, -0x38, -0x5c, -0xa5, -0xa2, -0xdf, -0x99, -0x45, -0xa8, -0xe4, -0xe7, -0x92, -0xac, -0x67, -0xaa, -0x4f, -0xbf, -0x77, -0x3e, -0xa2, -0x40, -0x49, -0x22, -0x4a, -0x1e, -0x3b, -0xaa, -0x70, -0x7f, -0x95, -0xaf, -0x37, -0x4b, -0xfc, -0x99, -0xe2, -0xe0, -0xba, -0xd7, -0x34, -0xce, -0x55, -0x88, -0x5b, -0x84, -0x1b, -0x57, -0xc4, -0x80, -0x03, -0x53, -0xc9, -0x2f, -0x93, -0x04, -0x4d, -0xd5, -0x96, -0xe5, -0x70, -0xa6, -0x6e, -0x63, -0x5d, -0x9d, -0x6c, -0xdb, -0x02, -0x0a, -0xa9, -0xda, -0x8b, -0x53, -0xdc, -0xd9, -0x9a, -0xc5, -0x94, -0x2c, -0x91, -0x92, -0x2a, -0xde, -0xbb, -0x8b, -0x13, -0xb9, -0x19, -0x96, -0x64, -0xcc, -0xf2, -0x64, -0x39, -0xb7, -0x75, -0x49, -0xe9, -0x86, -0xc2, -0x86, -0x62, -0xd9, -0x24, -0xd3, -0x81, -0x35, -0x49, -0xfc, -0xa0, -0xa5, -0xa0, -0x93, -0x05, -0x64, -0xb4, -0x1a, -0x57, -0xce, -0x0c, -0x90, -0x02, -0x27, -0xc5, -0x7a, -0x2b, -0x5d, -0xae, -0x3e, -0xd5, -0xdd, -0x10, -0x7c, -0x14, -0xea, -0x3a, -0x08, -0xac, -0x72, -0x4e, -0x90, -0x3d, -0x3b, -0x7c, -0x86, -0x2e, -0xeb, -0xd4, -0x06, -0x70, -0xe6, -0xc7, -0xfb, -0x5f, -0xbd, -0x18, -0xf4, -0x11, -0xa4, -0x1a, -0x93, -0xc3, -0xbe, -0xd9, -0xfb, -0x26, -0x48, -0x2f, -0x37, -0x3c, -0xd0, -0x03, -0x47, -0x1a, -0xf7, -0x62, -0x19, -0x24, -0x5c, -0xf4, -0xa8, -0x92, -0x20, -0x7a, -0xf2, -0x9e, -0x2a, -0xc5, -0x95, -0xa2, -0xfb, -0xa4, -0xea, -0x85, -0xd8, -0x56, -0xb7, -0x70, -0xd1, -0x60, -0x30, -0xa5, -0x30, -0x82, -0x70, -0xdc, -0x7a, -0x65, -0x8a, -0x36, -0x3f, -0x5b, -0x0c, -0xae, -0x54, -0x7c, -0xd3, -0x57, -0x84, -0x7b, -0x3a, -0x65, -0x18, -0x81, -0xee, -0x05, -0x9b, -0x44, -0x4d, -0xb8, -0xda, -0xa2, -0xa1, -0xc9, -0x15, -0xd3, -0x73, -0x03, -0x0e, -0x43, -0xe9, -0x8e, -0x15, -0xf9, -0xbe, -0xc6, -0xc5, -0x8a, -0xe5, -0xc0, -0x1e, -0xc2, -0x37, -0x9e, -0x2a, -0x26, -0xa5, -0xa0, -0xbd, -0x24, -0x5f, -0xb9, -0xc1, -0xab, -0x34, -0x48, -0xb9, -0x5d, -0x98, -0xb4, -0x65, -0x18, -0xf3, -0x63, -0x19, -0x44, -0x1b, -0x11, -0x16, -0xff, -0xdc, -0xf1, -0x79, -0x08, -0x86, -0x0f, -0x52, -0x98, -0x73, -0xc4, -0x92, -0x90, -0x2b, -0x47, -0x09, -0xd0, -0x43, -0x6c, -0x2f, -0x20, -0xeb, -0xdc, -0xda, -0xc5, -0x08, -0x7b, -0x94, -0x42, -0x30, -0x6a, -0xc7, -0xda, -0x8c, -0xc3, -0x76, -0xa7, -0xa5, -0xcc, -0x62, -0x13, -0x00, -0x60, -0x31, -0x58, -0x44, -0x9b, -0xf5, -0x64, -0x14, -0xf5, -0x11, -0xc5, -0x54, -0x52, -0x83, -0xd4, -0x73, -0x01, -0x16, -0x0e, -0xb3, -0x7a, -0x29, -0x69, -0x35, -0x56, -0xd4, -0xee, -0x8a, -0x17, -0xa2, -0x99, -0x24, -0x9c, -0xd7, -0x8f, -0xdb, -0x55, -0xb5, -0x3e -}; diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/config.h b/keyboards/htx_studio/one_handed_keyboard_ml/config.h index c2a60b2393c..32de009d5c3 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_ml/config.h @@ -24,6 +24,7 @@ #define POINTING_DEVICE_CS_PIN A4 #define POINTING_DEVICE_MOTION_PIN A3 #define POINTING_DEVICE_TASK_THROTTLE_MS 1 +#define POINTING_DEVICE_INVERT_X 1 #define ENCODER_RESOLUTION 2 @@ -37,3 +38,4 @@ #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP #endif + diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json index f1bcb7df104..4ddede69186 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json @@ -1,231 +1,221 @@ { - "keyboard_name": "One-Handed_Keyboard_ML", "manufacturer": "HTXStudio", - "url": "https://github.com/htx-studio", + "keyboard_name": "One-Handed_Keyboard_ML", "maintainer": "HTXStudio", - "usb": { - "vid": "0x475D", - "pid": "0x03AF", - "device_version": "3.1.0" - }, - "processor": "STM32G431", "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", - "matrix": { - "rows": 6, - "cols": 14 - }, - "features": { - "bootmagic": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true, - "encoder": true, - "rgb_matrix": true - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, "encoder": { "rotary": [ {"pin_a": "A9", "pin_b": "A10"} ] }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true, + "rgb_matrix": true + }, + "matrix": { + "cols": 14, + "rows": 6 + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "processor": "STM32G431", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 51, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 68, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 85, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 102, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 136, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 153, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 170, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 204, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 221, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 85, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 102, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 119, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 204, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 221, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 23, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 40, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 57, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 74, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 91, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 159, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 6, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 31, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 50, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 88, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 107, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 126, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 145, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 180, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 215, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 22, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 43, "y": 64, "flags": 4}, + {"matrix": [4, 4], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 6], "x": 116, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 137, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 158, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 179, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 221, "y": 64, "flags": 4} + ], + "max_brightness": 110, + "sleep": true + }, + "url": "https://github.com/htx-studio", + "usb": { + "device_version": "3.1.0", + "pid": "0x03AF", + "vid": "0x475D" + }, "ws2812": { - "pin": "B4", - "driver": "pwm" + "driver": "pwm", + "pin": "B4" }, "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, - {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, - {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, - {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, - {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, - {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, - {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, - {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, - {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, - {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, - {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, - {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, - {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, - {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, - - {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, - {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, - {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, - {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, - {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, - {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, - {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, - {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, - {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, - {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, - {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, - {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, - {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, - {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, - - {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, - {"matrix": [2, 2], "w":1, "h":1, "x":2, "y":2}, - {"matrix": [2, 3], "w":1, "h":1, "x":3, "y":2}, - {"matrix": [2, 4], "w":1, "h":1, "x":4, "y":2}, - {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, - {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, - {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, - {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, - {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, - {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, - {"matrix": [2, 12], "w":1.5, "h":1, "x":11, "y":2}, - {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, - - {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, - {"matrix": [3, 3], "w":1, "h":1, "x":3, "y":3}, - {"matrix": [3, 4], "w":1, "h":1, "x":4, "y":3}, - {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, - {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, - {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, - {"matrix": [3, 8], "w":1, "h":1, "x":8, "y":3}, - {"matrix": [3, 9], "w":1, "h":1, "x":9, "y":3}, - {"matrix": [3, 10], "w":2, "h":1, "x":10, "y":3}, - {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, - - {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, - {"matrix": [4, 3], "w":1.25, "h":1, "x":2.5, "y":4}, - {"matrix": [4, 4], "w":1.25, "h":1, "x":3.75, "y":4}, - {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, - {"matrix": [4, 6], "w":1.25, "h":1, "x":6.25, "y":4}, - {"matrix": [4, 7], "w":1.25, "h":1, "x":7.5, "y":4}, - {"matrix": [4, 9], "w":1.25, "h":1, "x":8.75, "y":4}, - {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, - {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, - - {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, - {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, - {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, - {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, - {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + {"matrix": [2, 0], "x": 0.5, "y": 2, "w": 1.5}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 12], "x": 11, "y": 2, "w": 1.5}, + {"matrix": [2, 13], "x": 12.5, "y": 2}, + {"matrix": [3, 0], "x": 1, "y": 3, "w": 2}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3, "w": 2}, + {"matrix": [3, 13], "x": 12, "y": 3, "w": 2}, + {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 5, "y": 4, "w": 1.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 7], "x": 7.5, "y": 4, "w": 1.25}, + {"matrix": [4, 9], "x": 8.75, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 10.75, "y": 4, "w": 2}, + {"matrix": [4, 13], "x": 12, "y": 4, "w": 1.25}, + {"matrix": [5, 0], "x": 0, "y": 5}, + {"matrix": [5, 3], "x": 3, "y": 5}, + {"matrix": [5, 4], "x": 4, "y": 5}, + {"matrix": [5, 5], "x": 5, "y": 5}, + {"matrix": [5, 6], "x": 6, "y": 5} ] } - }, - "rgb_matrix": { - "driver": "ws2812", - "max_brightness": 110, - "animations": { - "alphas_mods": true, - "gradient_up_down": true, - "gradient_left_right": true, - "breathing": true, - "band_sat": true, - "band_val": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_up_down": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "rainbow_moving_chevron": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "raindrops": true, - "jellybean_raindrops": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "pixel_fractal": true, - "pixel_flow": true, - "pixel_rain": true, - "typing_heatmap": true, - "digital_rain": true, - "solid_reactive_simple": true, - "solid_reactive": true, - "solid_reactive_wide": true, - "solid_reactive_multiwide": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_nexus": true, - "solid_reactive_multinexus": true, - "splash": true, - "multisplash": true, - "solid_splash": true, - "solid_multisplash": true - }, - "layout": [ - {"matrix": [0,0], "flags":4, "x":0, "y":0}, - {"matrix": [0,1], "flags":4, "x":17, "y":0}, - {"matrix": [0,2], "flags":4, "x":34, "y":0}, - {"matrix": [0,3], "flags":4, "x":51, "y":0}, - {"matrix": [0,4], "flags":4, "x":68, "y":0}, - {"matrix": [0,5], "flags":4, "x":85, "y":0}, - {"matrix": [0,6], "flags":4, "x":102, "y":0}, - {"matrix": [0,7], "flags":4, "x":119, "y":0}, - {"matrix": [0,8], "flags":4, "x":136, "y":0}, - {"matrix": [0,9], "flags":4, "x":153, "y":0}, - {"matrix": [0,10], "flags":4, "x":170, "y":0}, - {"matrix": [0,11], "flags":4, "x":187, "y":0}, - {"matrix": [0,12], "flags":4, "x":204, "y":0}, - {"matrix": [0,13], "flags":4, "x":221, "y":0}, - - {"matrix": [1,0], "flags":4, "x":0, "y":16}, - {"matrix": [1,1], "flags":4, "x":17, "y":16}, - {"matrix": [1,2], "flags":4, "x":34, "y":16}, - {"matrix": [1,3], "flags":4, "x":51, "y":16}, - {"matrix": [1,4], "flags":4, "x":68, "y":16}, - {"matrix": [1,5], "flags":4, "x":85, "y":16}, - {"matrix": [1,6], "flags":4, "x":102, "y":16}, - {"matrix": [1,7], "flags":4, "x":119, "y":16}, - {"matrix": [1,8], "flags":4, "x":136, "y":16}, - {"matrix": [1,9], "flags":4, "x":153, "y":16}, - {"matrix": [1,10], "flags":4, "x":170, "y":16}, - {"matrix": [1,11], "flags":4, "x":187, "y":16}, - {"matrix": [1,12], "flags":4, "x":204, "y":16}, - {"matrix": [1,13], "flags":4, "x":221, "y":16}, - - {"matrix": [2,0], "flags":4, "x":3, "y":32}, - {"matrix": [2,2], "flags":4, "x":23, "y":32}, - {"matrix": [2,3], "flags":4, "x":40, "y":32}, - {"matrix": [2,4], "flags":4, "x":57, "y":32}, - {"matrix": [2,5], "flags":4, "x":74, "y":32}, - {"matrix": [2,6], "flags":4, "x":91, "y":32}, - {"matrix": [2,7], "flags":4, "x":108, "y":32}, - {"matrix": [2,8], "flags":4, "x":125, "y":32}, - {"matrix": [2,9], "flags":4, "x":142, "y":32}, - {"matrix": [2,10], "flags":4, "x":159, "y":32}, - {"matrix": [2,12], "flags":4, "x":176, "y":32}, - {"matrix": [2,13], "flags":4, "x":200, "y":32}, - - {"matrix": [3,0], "flags":4, "x":6, "y":48}, - {"matrix": [3,3], "flags":4, "x":31, "y":48}, - {"matrix": [3,4], "flags":4, "x":50, "y":48}, - {"matrix": [3,5], "flags":4, "x":69, "y":48}, - {"matrix": [3,6], "flags":4, "x":88, "y":48}, - {"matrix": [3,7], "flags":4, "x":107, "y":48}, - {"matrix": [3,8], "flags":4, "x":126, "y":48}, - {"matrix": [3,9], "flags":4, "x":145, "y":48}, - {"matrix": [3,10], "flags":4, "x":180, "y":48}, - {"matrix": [3,13], "flags":4, "x":215, "y":48}, - - {"matrix": [4,0], "flags":4, "x":22, "y":64}, - {"matrix": [4,3], "flags":4, "x":43, "y":64}, - {"matrix": [4,4], "flags":4, "x":64, "y":64}, - {"matrix": [4,5], "flags":4, "x":95, "y":64}, - {"matrix": [4,6], "flags":4, "x":116, "y":64}, - {"matrix": [4,7], "flags":4, "x":137, "y":64}, - {"matrix": [4,9], "flags":4, "x":158, "y":64}, - {"matrix": [4,12], "flags":4, "x":179, "y":64}, - {"matrix": [4,13], "flags":4, "x":221, "y":64} - ], - "sleep": true } } - diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c index 87d0226435b..df7b93f1fff 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c @@ -16,6 +16,22 @@ #include QMK_KEYBOARD_H +#define TRACKBALL_DPI_MIN 1000 +#define TRACKBALL_DPI_MAX 8000 +#define TRACKBALL_DPI_DEFAULT 3000 +#define TRACKBALL_DPI_STEP 1000 + +enum my_keycodes { + DPI_UP = SAFE_RANGE, + DPI_DOWN +}; + +typedef union { + uint16_t TrackballDPI; +} user_config_t; +user_config_t user_config; + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ @@ -46,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ // ┃ ┃ F1 ┃ F2 ┃ F3 ┃ F4 ┃ F5 ┃ F6 ┃ F7 ┃ F8 ┃ F9 ┃ F10 ┃ F11 ┃ F12 ┃ ┃ // ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ -// ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_HUED┃RM_HUEU┃ ┃ ┃ ┃ ┃ +// ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_HUED┃RM_HUEU┃ ┃ DPI_DO┃ DPI_UP┃ ┃ // ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ // ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃RM_SATD┃RM_SATU┃ ┃ ┃ ┃ // ┗━━━┳━━━━━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━┳━━━┻━━━━━━━┻━┳━━━━━┻━━━━━━━┳━━━┛ @@ -61,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, _______, RM_HUED, RM_HUEU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RM_HUED, RM_HUEU, _______, DPI_DOWN, DPI_UP, _______, _______, _______, _______, _______, _______, _______, _______, RM_SATD, RM_SATU, _______, _______, _______, _______, _______, _______, _______, _______, _______, RM_SPDD, RM_SPDU, QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, _______, _______, _______, _______, _______, KC_BSLS, _______, RM_TOGG, KC_DEL, @@ -76,3 +92,59 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [1] = {ENCODER_CCW_CW(MS_WHLD, MS_WHLU)} }; #endif + +void pointing_device_init_kb(void) { + wait_ms(10); + user_config.TrackballDPI = eeconfig_read_user(); + wait_ms(10); + adns9800_init(); + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +// ADNS9800. The CPI range is 800-8200, in increments of 200. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DPI_UP: { + if (record->event.pressed) { + user_config.TrackballDPI += TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { + user_config.TrackballDPI = TRACKBALL_DPI_MAX; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + case DPI_DOWN: { + if (record->event.pressed) { + user_config.TrackballDPI -= TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { + user_config.TrackballDPI = TRACKBALL_DPI_MIN; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + default: + return true; + + } +} + +void eeconfig_init_user(void) { + user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); + eeconfig_update_user(user_config.TrackballDPI); +} + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); + } + return false; +} diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk index 08f4783a51c..737257c5d8d 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk +++ b/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk @@ -1,8 +1,7 @@ -VIA_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += adns.c SPI_DRIVER_REQUIRED = yes ENCODER_MAP_ENABLE = yes RGB_MATRIX_ENABLE = yes WS2812_DRIVER = pwm +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = adns9800 diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/rules.mk b/keyboards/htx_studio/one_handed_keyboard_ml/rules.mk new file mode 100644 index 00000000000..16d33cd89fe --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_ml/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns.c b/keyboards/htx_studio/one_handed_keyboard_mr/adns.c deleted file mode 100644 index ca3cb72c28e..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/adns.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#include "spi_master.h" -#include "adns.h" -#include "debug.h" -#include "wait.h" -#include "pointing_device.h" -#include "adns9800_srom_A6.h" - -// registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 -#define REG_Frame_Period_Max_Bound_Lower 0x1a -#define REG_Frame_Period_Max_Bound_Upper 0x1b -#define REG_Frame_Period_Min_Bound_Lower 0x1c -#define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -// pins -#define NCS A4 - -extern const uint16_t firmware_length; -extern const uint8_t firmware_data[]; - -enum motion_burst_propertr{ - motion = 0, - observation, - delta_x_l, - delta_x_h, - delta_y_l, - delta_y_h, - squal, - pixel_sum, - maximum_pixel, - minimum_pixel, - shutter_upper, - shutter_lower, - frame_period_upper, - frame_period_lower, - end_data -}; - -void adns_begin(void){ - spi_start(NCS, false, 3, 8); -} - -void adns_end(void){ - spi_stop(); -} - -void adns_write(uint8_t reg_addr, uint8_t data){ - - adns_begin(); - //send address of the register, with MSBit = 1 to indicate it's a write - spi_write(reg_addr | 0x80 ); - spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - adns_end(); -} - -uint8_t adns_read(uint8_t reg_addr){ - - - adns_begin(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - adns_end(); - return data; -} - -void pointing_device_init(void) { - dprint("STARTING INTI\n"); - - spi_init(); - // reset serial port - adns_begin(); - adns_end(); - - // reboot - adns_write(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); - - // upload firmware - - // set the configuration_IV register in 3k firmware mode - // bit 1 = 1 for 3k mode, other bits are reserved - adns_write(REG_Configuration_V, 0x02); - - // write 0x1d in SROM_enable reg for initializing - adns_write(REG_SROM_Enable, 0x1d); - - // wait for more than one frame period - // assume that the frame rate is as low as 100fps... even if it should never be that low - wait_ms(10); - - // write 0x18 to SROM_enable to start SROM download - adns_write(REG_SROM_Enable, 0x18); - - // write the SROM file (=firmware data) - - // write burst destination adress - adns_begin(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < firmware_length; i++){ - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - - adns_end(); - wait_ms(10); - - // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) - // reading the actual value of the register is important because the real - // default value is different from what is said in the datasheet, and if you - // change the reserved bytes (like by writing 0x00...) it would not work. - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); - - wait_ms(1); - - // set the configuration_I register to set the CPI - // 0x01 = 50, minimum - // 0x44 = 3400, default - // 0x8e = 7100 - // 0xA4 = 8200, maximum - adns_write(REG_Configuration_I, 0x1A); - - wait_ms(100); - dprint("INIT ENDED\n"); -} - -int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - //int16_t twos_comp = (high << 8) | low; - //return twos_comp; - return (high << 8) | low; -} - -motion_delta_t readSensor(void) { - adns_begin(); - - // read from Motion_Burst to enable burt mode - spi_write(REG_Motion_Burst & 0x7f); - - // Wait one frame per docs, thanks u/kbjunky - wait_us(100); - uint8_t burst_data[pixel_sum]; - - for (int i = 0; i < pixel_sum; ++i) { - burst_data[i] = spi_read(); - } - - uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); - uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); - // Only consider the MSB for motion as this byte has other status bits - uint8_t motion_ind = burst_data[motion] & 0b10000000; - adns_end(); - - motion_delta_t delta = {delta_x, delta_y, motion_ind}; - return delta; -} - -bool pointing_device_task(void) { - motion_delta_t delta = readSensor(); - - report_mouse_t report = pointing_device_get_report(); - - if(delta.motion_ind) { - // clamp deltas from -127 to 127 - report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; - report.x = -report.x; - report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; - } - - pointing_device_set_report(report); - return pointing_device_send(); -} diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns.h b/keyboards/htx_studio/one_handed_keyboard_mr/adns.h deleted file mode 100644 index e557aeb2ece..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/adns.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#pragma once - -#include - -void adns_begin(void); - -void adns_end(void); - -void adns_write(uint8_t reg_addr, uint8_t data); - -uint8_t adns_read(uint8_t reg_addr); - - -int16_t convertDeltaToInt(uint8_t high, uint8_t low); - -struct _motion_delta { - int16_t delta_x; - int16_t delta_y; - int8_t motion_ind; -}; -typedef struct _motion_delta motion_delta_t; - -motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h deleted file mode 100644 index fddf30589d4..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/adns9800_srom_A6.h +++ /dev/null @@ -1,3081 +0,0 @@ -// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. -// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk - -#pragma once - -#include "progmem.h" - -const uint16_t firmware_length = 3070; - -const uint8_t firmware_data[] PROGMEM = { - 0x03, -0xa6, -0x68, -0x1e, -0x7d, -0x10, -0x7e, -0x7e, -0x5f, -0x1c, -0xb8, -0xf2, -0x47, -0x0c, -0x7b, -0x74, -0x4b, -0x14, -0x8b, -0x75, -0x66, -0x51, -0x0b, -0x8c, -0x76, -0x74, -0x4b, -0x14, -0xaa, -0xd6, -0x0f, -0x9c, -0xba, -0xf6, -0x6e, -0x3f, -0xdd, -0x38, -0xd5, -0x02, -0x80, -0x9b, -0x82, -0x6d, -0x58, -0x13, -0xa4, -0xab, -0xb5, -0xc9, -0x10, -0xa2, -0xc6, -0x0a, -0x7f, -0x5d, -0x19, -0x91, -0xa0, -0xa3, -0xce, -0xeb, -0x3e, -0xc9, -0xf1, -0x60, -0x42, -0xe7, -0x4c, -0xfb, -0x74, -0x6a, -0x56, -0x2e, -0xbf, -0xdd, -0x38, -0xd3, -0x05, -0x88, -0x92, -0xa6, -0xce, -0xff, -0x5d, -0x38, -0xd1, -0xcf, -0xef, -0x58, -0xcb, -0x65, -0x48, -0xf0, -0x35, -0x85, -0xa9, -0xb2, -0x8f, -0x5e, -0xf3, -0x80, -0x94, -0x97, -0x7e, -0x75, -0x97, -0x87, -0x73, -0x13, -0xb0, -0x8a, -0x69, -0xd4, -0x0a, -0xde, -0xc1, -0x79, -0x59, -0x36, -0xdb, -0x9d, -0xd6, -0xb8, -0x15, -0x6f, -0xce, -0x3c, -0x72, -0x32, -0x45, -0x88, -0xdf, -0x6c, -0xa5, -0x6d, -0xe8, -0x76, -0x96, -0x14, -0x74, -0x20, -0xdc, -0xf4, -0xfa, -0x37, -0x6a, -0x27, -0x32, -0xe3, -0x29, -0xbf, -0xc4, -0xc7, -0x06, -0x9d, -0x58, -0xe7, -0x87, -0x7c, -0x2e, -0x9f, -0x6e, -0x49, -0x07, -0x5d, -0x23, -0x64, -0x54, -0x83, -0x6e, -0xcb, -0xb7, -0x77, -0xf7, -0x2b, -0x6e, -0x0f, -0x2e, -0x66, -0x12, -0x60, -0x55, -0x65, -0xfc, -0x43, -0xb3, -0x58, -0x73, -0x5b, -0xe8, -0x67, -0x04, -0x43, -0x02, -0xde, -0xb3, -0x89, -0xa0, -0x6d, -0x3a, -0x27, -0x79, -0x64, -0x5b, -0x0c, -0x16, -0x9e, -0x66, -0xb1, -0x8b, -0x87, -0x0c, -0x5d, -0xf2, -0xb6, -0x3d, -0x71, -0xdf, -0x42, -0x03, -0x8a, -0x06, -0x8d, -0xef, -0x1d, -0xa8, -0x96, -0x5c, -0xed, -0x31, -0x61, -0x5c, -0xa1, -0x34, -0xf6, -0x8c, -0x08, -0x60, -0x33, -0x07, -0x00, -0x3e, -0x79, -0x95, -0x1b, -0x43, -0x7f, -0xfe, -0xb6, -0xa6, -0xd4, -0x9d, -0x76, -0x72, -0xbf, -0xad, -0xc0, -0x15, -0xe8, -0x37, -0x31, -0xa3, -0x72, -0x63, -0x52, -0x1d, -0x1c, -0x5d, -0x51, -0x1b, -0xe1, -0xa9, -0xed, -0x60, -0x32, -0x3e, -0xa9, -0x50, -0x28, -0x53, -0x06, -0x59, -0xe2, -0xfc, -0xe7, -0x02, -0x64, -0x39, -0x21, -0x56, -0x4a, -0xa5, -0x40, -0x80, -0x81, -0xd5, -0x5a, -0x60, -0x7b, -0x68, -0x84, -0xf1, -0xe0, -0xb1, -0xb6, -0x5b, -0xdf, -0xa8, -0x1d, -0x6d, -0x65, -0x20, -0xc0, -0xa2, -0xb9, -0xd9, -0xbb, -0x00, -0xa6, -0xdb, -0x8b, -0x01, -0x53, -0x91, -0xfe, -0xc4, -0x51, -0x85, -0xb0, -0x96, -0x7f, -0xfd, -0x51, -0xdd, -0x14, -0x03, -0x67, -0x2e, -0x75, -0x1c, -0x76, -0xd3, -0x6e, -0xdd, -0x99, -0x55, -0x76, -0xe5, -0xab, -0x23, -0xfc, -0x4a, -0xd5, -0xc6, -0xe8, -0x2e, -0xca, -0x8a, -0xb3, -0xf6, -0x8c, -0x6c, -0xb0, -0xe9, -0xf2, -0xe7, -0x9e, -0x69, -0x41, -0xed, -0xf1, -0x6d, -0xd2, -0x86, -0xd8, -0x7e, -0xcb, -0x5d, -0x47, -0x6c, -0x85, -0x6a, -0x23, -0xed, -0x20, -0x40, -0x93, -0xb4, -0x20, -0xc7, -0xa5, -0xc9, -0xaf, -0x03, -0x15, -0xac, -0x19, -0xe5, -0x2a, -0x36, -0xdf, -0x6d, -0xc5, -0x8c, -0x80, -0x07, -0xce, -0x92, -0x0c, -0xd8, -0x06, -0x62, -0x0f, -0xdd, -0x48, -0x46, -0x1a, -0x53, -0xc7, -0x8a, -0x8c, -0x5d, -0x5d, -0xb4, -0xa1, -0x02, -0xd3, -0xa9, -0xb8, -0xf3, -0x94, -0x8f, -0x3f, -0xe5, -0x54, -0xd4, -0x11, -0x65, -0xb2, -0x5e, -0x09, -0x0b, -0x81, -0xe3, -0x75, -0xa7, -0x89, -0x81, -0x39, -0x6c, -0x46, -0xf6, -0x06, -0x9f, -0x27, -0x3b, -0xb6, -0x2d, -0x5f, -0x1d, -0x4b, -0xd4, -0x7b, -0x1d, -0x61, -0x74, -0x89, -0xe4, -0xe3, -0xbd, -0x98, -0x1b, -0xc4, -0x51, -0x3b, -0xa4, -0xfa, -0xe0, -0x92, -0xf7, -0xbe, -0xf2, -0x4d, -0xbb, -0xff, -0xad, -0x4f, -0x6d, -0x68, -0xc2, -0x79, -0x40, -0xaa, -0x9b, -0x8f, -0x0c, -0x32, -0x4b, -0x5f, -0x3e, -0xab, -0x59, -0x98, -0xb3, -0xf5, -0x1d, -0xac, -0x5e, -0xbc, -0x78, -0xd3, -0x01, -0x6c, -0x64, -0x15, -0x2f, -0xd8, -0x71, -0xa6, -0x2d, -0x45, -0xe1, -0x22, -0x42, -0xe4, -0x4e, -0x04, -0x3c, -0x7d, -0xf4, -0x40, -0x21, -0xb4, -0x67, -0x05, -0xa8, -0xe2, -0xf3, -0x72, -0x87, -0x4c, -0x7d, -0xd9, -0x1b, -0x65, -0x97, -0xf3, -0xc2, -0xe3, -0xe4, -0xc8, -0xd2, -0xde, -0xf6, -0xef, -0xdc, -0xbb, -0x44, -0x08, -0x5e, -0xe2, -0x45, -0x27, -0x01, -0xb0, -0xf6, -0x43, -0xe7, -0x3a, -0xf6, -0xdc, -0x9d, -0xed, -0xf3, -0xc5, -0x0c, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x36, -0xee, -0x96, -0x72, -0x67, -0xe7, -0x81, -0x91, -0xd5, -0x05, -0x0a, -0xe0, -0x82, -0xd5, -0x8f, -0xe8, -0xf9, -0xb0, -0xc9, -0xcf, -0x93, -0xe7, -0x04, -0xc5, -0xbc, -0x2b, -0x43, -0x56, -0x7e, -0xe8, -0x67, -0x7c, -0xe5, -0xfb, -0x49, -0xad, -0x5e, -0x9f, -0x25, -0x13, -0xde, -0x6e, -0x6e, -0xe9, -0xf1, -0xec, -0x87, -0x0b, -0x59, -0x81, -0x76, -0x84, -0x76, -0xb3, -0x24, -0xaf, -0x30, -0xfd, -0x27, -0x8b, -0xab, -0xd8, -0x00, -0x8b, -0x9b, -0x0c, -0xd2, -0xb2, -0x4e, -0x5e, -0x9d, -0x1d, -0x96, -0x01, -0x00, -0x67, -0xc1, -0x5f, -0x02, -0x20, -0xfd, -0x45, -0x6a, -0x01, -0x60, -0x58, -0x45, -0xca, -0x47, -0x21, -0x90, -0x5a, -0xc4, -0x43, -0x26, -0x1a, -0xd7, -0xa5, -0x4a, -0xb2, -0x5d, -0x2b, -0x35, -0x49, -0xfb, -0xa5, -0x17, -0x92, -0x21, -0x1e, -0x93, -0x96, -0x67, -0xa2, -0x7e, -0x36, -0x7a, -0xde, -0x5f, -0xbe, -0x7a, -0x58, -0x9d, -0xf8, -0x78, -0xa3, -0xfa, -0xc8, -0xd5, -0x17, -0xf0, -0x21, -0x97, -0x8c, -0x80, -0xb5, -0x4b, -0x3b, -0xbd, -0xbb, -0x41, -0x21, -0xa8, -0x50, -0x67, -0xf7, -0xe7, -0x19, -0x80, -0x10, -0x8e, -0xce, -0x04, -0x18, -0x3f, -0x51, -0x6b, -0x77, -0xd8, -0x9e, -0x16, -0xaf, -0xec, -0xef, -0x48, -0x16, -0x4d, -0x9e, -0x85, -0x38, -0x18, -0x3e, -0xd4, -0x28, -0x87, -0x60, -0x2a, -0xf6, -0x7f, -0x09, -0x86, -0x6f, -0x9c, -0x3c, -0x3a, -0xff, -0xab, -0xd0, -0x61, -0xa2, -0x97, -0x0d, -0x71, -0x94, -0x7e, -0xfd, -0xb9, -0x80, -0x02, -0x89, -0x6a, -0xb3, -0x84, -0x6c, -0x2a, -0x77, -0x62, -0xbe, -0x0b, -0xf4, -0xaf, -0xac, -0x7b, -0x7c, -0x8e, -0xca, -0x01, -0xba, -0x71, -0x78, -0x94, -0xfd, -0xb5, -0x39, -0xa4, -0x4d, -0x2f, -0x78, -0xcf, -0xca, -0x92, -0x0c, -0x1a, -0x99, -0x48, -0x4c, -0x11, -0x96, -0xb5, -0x4e, -0x41, -0x28, -0xe4, -0xa6, -0xfe, -0x4b, -0x72, -0x91, -0xe7, -0xd4, -0xdd, -0x9f, -0x12, -0xe6, -0x29, -0x38, -0xce, -0x45, -0xae, -0x02, -0xb8, -0x24, -0xae, -0xbd, -0xe9, -0x66, -0x08, -0x62, -0xa2, -0x2c, -0x2b, -0x00, -0xe2, -0x23, -0xd9, -0xc4, -0x48, -0xe4, -0xd3, -0xac, -0xbb, -0x34, -0xc7, -0xf0, -0xe3, -0x4f, -0xb9, -0x30, -0xea, -0xa2, -0x12, -0xf1, -0x30, -0x2c, -0x36, -0xde, -0x48, -0xf2, -0xb0, -0x4c, -0x43, -0x3f, -0x2e, -0x58, -0xe4, -0x20, -0xe3, -0x58, -0xcd, -0x31, -0x22, -0xf0, -0xa2, -0x2a, -0xe6, -0x19, -0x90, -0x55, -0x86, -0xf6, -0x55, -0x79, -0xd1, -0xd7, -0x46, -0x2f, -0xc0, -0xdc, -0x99, -0xe8, -0xf3, -0x6a, -0xdf, -0x7f, -0xeb, -0x24, -0x4a, -0x1e, -0x5a, -0x75, -0xde, -0x2f, -0x5c, -0x19, -0x61, -0x03, -0x53, -0x54, -0x6a, -0x3b, -0x18, -0x70, -0xb6, -0x4f, -0xf1, -0x9c, -0x0a, -0x59, -0x9d, -0x19, -0x92, -0x65, -0x8c, -0x83, -0x14, -0x2d, -0x44, -0x8a, -0x75, -0xa9, -0xf5, -0x90, -0xd2, -0x66, -0x4e, -0xfa, -0x69, -0x0f, -0x5b, -0x0b, -0x98, -0x65, -0xc8, -0x11, -0x42, -0x59, -0x7f, -0xdd, -0x1b, -0x75, -0x17, -0x31, -0x4c, -0x75, -0x58, -0xeb, -0x58, -0x63, -0x7d, -0xf2, -0xa6, -0xc2, -0x6e, -0xb7, -0x3f, -0x3e, -0x5e, -0x47, -0xad, -0xb7, -0x04, -0xe8, -0x05, -0xf8, -0xb2, -0xcf, -0x19, -0xf3, -0xd2, -0x85, -0xfe, -0x3e, -0x3e, -0xb1, -0x62, -0x08, -0x2c, -0x10, -0x07, -0x0d, -0x73, -0x90, -0x17, -0xfa, -0x9b, -0x56, -0x02, -0x75, -0xf9, -0x51, -0xe0, -0xe9, -0x1a, -0x7b, -0x9f, -0xb3, -0xf3, -0x98, -0xb8, -0x1c, -0x9c, -0xe1, -0xd5, -0x35, -0xae, -0xc8, -0x60, -0x48, -0x11, -0x09, -0x94, -0x6b, -0xd0, -0x8b, -0x15, -0xbc, -0x05, -0x68, -0xd3, -0x54, -0x8a, -0x51, -0x39, -0x5c, -0x42, -0x76, -0xce, -0xd8, -0xad, -0x89, -0x30, -0xc9, -0x05, -0x1c, -0xcc, -0x94, -0x3f, -0x0f, -0x90, -0x6f, -0x72, -0x2d, -0x85, -0x64, -0x9a, -0xb9, -0x23, -0xf9, -0x0b, -0xc3, -0x7c, -0x39, -0x0f, -0x97, -0x07, -0x97, -0xda, -0x58, -0x48, -0x33, -0x05, -0x23, -0xb8, -0x82, -0xe8, -0xd3, -0x53, -0x89, -0xaf, -0x33, -0x80, -0x22, -0x84, -0x0c, -0x95, -0x5c, -0x67, -0xb8, -0x77, -0x0c, -0x5c, -0xa2, -0x5f, -0x3d, -0x58, -0x0f, -0x27, -0xf3, -0x2f, -0xae, -0x48, -0xbd, -0x0b, -0x6f, -0x54, -0xfb, -0x67, -0x4c, -0xea, -0x32, -0x27, -0xf1, -0xfa, -0xe2, -0xb0, -0xec, -0x0b, -0x15, -0xb4, -0x70, -0xf6, -0x5c, -0xdd, -0x71, -0x60, -0xc3, -0xc1, -0xa8, -0x32, -0x65, -0xac, -0x7a, -0x77, -0x41, -0xe5, -0xa9, -0x6b, -0x11, -0x81, -0xfa, -0x34, -0x8d, -0xfb, -0xc1, -0x80, -0x6e, -0xc4, -0x60, -0x30, -0x07, -0xd4, -0x8b, -0x67, -0xbd, -0xaa, -0x8c, -0x9c, -0x64, -0xac, -0xdb, -0x0b, -0x24, -0x8b, -0x63, -0x6f, -0xe6, -0xbc, -0xe7, -0x33, -0xa4, -0x4a, -0x4c, -0xa7, -0x9f, -0x43, -0x53, -0xd2, -0xbb, -0x8f, -0x43, -0xc7, -0x3d, -0x78, -0x68, -0x3f, -0xa5, -0x3d, -0xca, -0x69, -0x84, -0xa6, -0x97, -0x2d, -0xc0, -0x7d, -0x31, -0x34, -0x55, -0x1d, -0x07, -0xb1, -0x5f, -0x40, -0x5c, -0x93, -0xb0, -0xbc, -0x7c, -0xb0, -0xbc, -0xe7, -0x12, -0xee, -0x6b, -0x2b, -0xd3, -0x4d, -0x67, -0x70, -0x3a, -0x9a, -0xf2, -0x3c, -0x7c, -0x81, -0xfa, -0xd7, -0xd9, -0x90, -0x91, -0x81, -0xb8, -0xb1, -0xf3, -0x48, -0x6a, -0x26, -0x4f, -0x0c, -0xce, -0xb0, -0x9e, -0xfd, -0x4a, -0x3a, -0xaf, -0xac, -0x5b, -0x3f, -0xbf, -0x44, -0x5a, -0xa3, -0x19, -0x1e, -0x4b, -0xe7, -0x36, -0x6a, -0xd7, -0x20, -0xae, -0xd7, -0x7d, -0x3b, -0xe7, -0xff, -0x3a, -0x86, -0x2e, -0xd0, -0x4a, -0x3e, -0xaf, -0x9f, -0x8e, -0x01, -0xbf, -0xf8, -0x4f, -0xc1, -0xe8, -0x6f, -0x74, -0xe1, -0x45, -0xd3, -0xf7, -0x04, -0x6a, -0x4b, -0x9d, -0xec, -0x33, -0x27, -0x76, -0xd7, -0xc5, -0xe1, -0xb0, -0x3b, -0x0e, -0x23, -0xec, -0xf0, -0x86, -0xd2, -0x1a, -0xbf, -0x3d, -0x04, -0x62, -0xb3, -0x6c, -0xb2, -0xeb, -0x17, -0x05, -0xa6, -0x0a, -0x8a, -0x7e, -0x83, -0x1c, -0xb6, -0x37, -0x09, -0xc6, -0x0b, -0x70, -0x3c, -0xb5, -0x93, -0x81, -0xd8, -0x93, -0xa0, -0x5f, -0x1e, -0x08, -0xe2, -0xc6, -0xe5, -0xc9, -0x72, -0xf1, -0xf1, -0xc1, -0xed, -0xd5, -0x58, -0x93, -0x83, -0xf8, -0x65, -0x67, -0x2e, -0x0d, -0xa9, -0xf1, -0x64, -0x12, -0xe6, -0x4c, -0xea, -0x15, -0x3f, -0x8c, -0x1a, -0xb6, -0xbf, -0xf6, -0xb9, -0x52, -0x35, -0x09, -0xb0, -0xe6, -0xf7, -0xcd, -0xf1, -0xa5, -0xaa, -0x81, -0xd1, -0x81, -0x6f, -0xb4, -0xa9, -0x66, -0x1f, -0xfc, -0x48, -0xc0, -0xb6, -0xd1, -0x8b, -0x06, -0x2f, -0xf6, -0xef, -0x1f, -0x0a, -0xe6, -0xce, -0x3a, -0x4a, -0x55, -0xbf, -0x6d, -0xf9, -0x4d, -0xd4, -0x08, -0x45, -0x4b, -0xc3, -0x66, -0x19, -0x92, -0x10, -0xe1, -0x17, -0x8e, -0x28, -0x91, -0x16, -0xbf, -0x3c, -0xee, -0xa3, -0xa6, -0x99, -0x92, -0x10, -0xe1, -0xf6, -0xcc, -0xac, -0xb8, -0x65, -0x0b, -0x43, -0x66, -0xf8, -0xe3, -0xe5, -0x3f, -0x24, -0x89, -0x47, -0x5d, -0x78, -0x43, -0xd0, -0x61, -0x17, -0xbd, -0x5b, -0x64, -0x54, -0x08, -0x45, -0x59, -0x93, -0xf6, -0x95, -0x8a, -0x41, -0x51, -0x62, -0x4b, -0x51, -0x02, -0x30, -0x73, -0xc7, -0x87, -0xc5, -0x4b, -0xa2, -0x97, -0x0f, -0xe8, -0x46, -0x5f, -0x7e, -0x2a, -0xe1, -0x30, -0x20, -0xb0, -0xfa, -0xe7, -0xce, -0x61, -0x42, -0x57, -0x6e, -0x21, -0xf3, -0x7a, -0xec, -0xe3, -0x25, -0xc7, -0x25, -0xf3, -0x67, -0xa7, -0x57, -0x40, -0x00, -0x02, -0xcf, -0x1c, -0x80, -0x77, -0x67, -0xbd, -0x70, -0xa1, -0x19, -0x92, -0x31, -0x75, -0x93, -0x27, -0x27, -0xb6, -0x82, -0xe4, -0xeb, -0x1d, -0x78, -0x48, -0xe7, -0xa5, -0x5e, -0x57, -0xef, -0x64, -0x28, -0x64, -0x1b, -0xf6, -0x11, -0xb2, -0x03, -0x9d, -0xb9, -0x18, -0x02, -0x27, -0xf7, -0xbe, -0x9d, -0x55, -0xfc, -0x00, -0xd2, -0xc7, -0xae, -0xad, -0x0b, -0xc5, -0xe9, -0x42, -0x41, -0x48, -0xd8, -0x32, -0xcf, -0xf6, -0x0f, -0xf5, -0xbc, -0x97, -0xc6, -0x99, -0x47, -0x76, -0xbd, -0x89, -0x06, -0x0f, -0x63, -0x0c, -0x51, -0xd4, -0x5e, -0xea, -0x48, -0xa8, -0xa2, -0x56, -0x1c, -0x79, -0x84, -0x86, -0x40, -0x88, -0x41, -0x76, -0x55, -0xfc, -0xc2, -0xd7, -0xfd, -0xc9, -0xc7, -0x80, -0x61, -0x35, -0xa7, -0x43, -0x20, -0xf7, -0xeb, -0x6c, -0x66, -0x13, -0xb0, -0xec, -0x02, -0x75, -0x3e, -0x4b, -0xaf, -0xb9, -0x5d, -0x40, -0xda, -0xd6, -0x6e, -0x2d, -0x39, -0x54, -0xc2, -0x95, -0x35, -0x54, -0x25, -0x72, -0xe1, -0x78, -0xb8, -0xeb, -0xc1, -0x16, -0x58, -0x0f, -0x9c, -0x9b, -0xb4, -0xea, -0x37, -0xec, -0x3b, -0x11, -0xba, -0xd5, -0x8a, -0xa9, -0xe3, -0x98, -0x00, -0x51, -0x1c, -0x14, -0xe0, -0x40, -0x96, -0xe5, -0xe9, -0xf2, -0x21, -0x22, -0xb1, -0x23, -0x60, -0x78, -0xd3, -0x17, -0xf8, -0x7a, -0xa5, -0xa8, -0xba, -0x20, -0xd3, -0x15, -0x1e, -0x32, -0xe4, -0x5e, -0x15, -0x48, -0xae, -0xa9, -0xe5, -0xb8, -0x33, -0xec, -0xe8, -0xa2, -0x42, -0xac, -0xbf, -0x10, -0x84, -0x53, -0x87, -0x19, -0xb4, -0x5f, -0x76, -0x4d, -0x01, -0x9d, -0x56, -0x74, -0xd9, -0x5c, -0x97, -0xe7, -0x88, -0xea, -0x3a, -0xbf, -0xdc, -0x4c, -0x33, -0x8a, -0x16, -0xb9, -0x5b, -0xfa, -0xd8, -0x42, -0xa7, -0xbb, -0x3c, -0x04, -0x27, -0x78, -0x49, -0x81, -0x2a, -0x5a, -0x7d, -0x7c, -0x23, -0xa8, -0xba, -0xf7, -0x9a, -0x9f, -0xd2, -0x66, -0x3e, -0x38, -0x3c, -0x75, -0xf9, -0xd1, -0x30, -0x26, -0x30, -0x6e, -0x5a, -0x6e, -0xdc, -0x6a, -0x69, -0x32, -0x50, -0x33, -0x47, -0x9e, -0xa4, -0xa8, -0x64, -0x66, -0xf0, -0x8a, -0xe4, -0xfd, -0x27, -0x6f, -0x51, -0x25, -0x8b, -0x43, -0x74, -0xc9, -0x8e, -0xbd, -0x88, -0x31, -0xbe, -0xec, -0x65, -0xd2, -0xcb, -0x8d, -0x5a, -0x13, -0x48, -0x16, -0x8c, -0x61, -0x0b, -0x11, -0xf6, -0xc6, -0x66, -0xae, -0xc3, -0xcc, -0x0c, -0xd2, -0xe1, -0x9f, -0x82, -0x41, -0x3f, -0x56, -0xf9, -0x73, -0xef, -0xdc, -0x30, -0x50, -0xcf, -0xb6, -0x7f, -0xbc, -0xd0, -0xb3, -0x10, -0xab, -0x24, -0xe4, -0xec, -0xad, -0x18, -0x8c, -0x39, -0x2d, -0x30, -0x4c, -0xc5, -0x40, -0x0d, -0xf6, -0xac, -0xd6, -0x18, -0x5d, -0x96, -0xbf, -0x5f, -0x71, -0x75, -0x96, -0x22, -0x97, -0x0f, -0x02, -0x94, -0x6e, -0xa6, -0xae, -0x6d, -0x8f, -0x1e, -0xca, -0x12, -0x9b, -0x2a, -0x1c, -0xce, -0xa9, -0xee, -0xfd, -0x12, -0x8e, -0xfc, -0xed, -0x09, -0x33, -0xba, -0xf4, -0x1a, -0x15, -0xf6, -0x9d, -0x87, -0x16, -0x43, -0x7c, -0x78, -0x57, -0xe1, -0x44, -0xc9, -0xeb, -0x1f, -0x58, -0x4d, -0xc1, -0x49, -0x11, -0x5c, -0xb2, -0x11, -0xa8, -0x55, -0x16, -0xf1, -0xc6, -0x50, -0xe9, -0x87, -0x89, -0xf6, -0xcf, -0xd8, -0x9c, -0x51, -0xa7, -0xbc, -0x5b, -0x31, -0x6d, -0x4d, -0x51, -0xd0, -0x4c, -0xbc, -0x0d, -0x58, -0x2d, -0x7b, -0x88, -0x7a, -0xf9, -0x8e, -0xd6, -0x40, -0x4d, -0xbb, -0xbe, -0xc4, -0xe5, -0x07, -0xfc, -0xd9, -0x7b, -0x6d, -0xa6, -0x42, -0x57, -0x8f, -0x02, -0x94, -0x4f, -0xe4, -0x2a, -0x65, -0xe2, -0x19, -0x5a, -0x50, -0xe1, -0x25, -0x65, -0x4a, -0x60, -0xc2, -0xcd, -0xa8, -0xec, -0x05, -0x2e, -0x87, -0x7b, -0x95, -0xb7, -0x4f, -0xa0, -0x0b, -0x1b, -0x4a, -0x7f, -0x92, -0xc8, -0x90, -0xee, -0x89, -0x1e, -0x10, -0xd2, -0x85, -0xe4, -0x9f, -0x63, -0xc8, -0x12, -0xbb, -0x4e, -0xb8, -0xcf, -0x0a, -0xec, -0x18, -0x4e, -0xe6, -0x7c, -0xb3, -0x33, -0x26, -0xc7, -0x1f, -0xd2, -0x04, -0x23, -0xea, -0x07, -0x0c, -0x5f, -0x90, -0xbd, -0xa7, -0x6a, -0x0f, -0x4a, -0xd6, -0x10, -0x01, -0x3c, -0x12, -0x29, -0x2e, -0x96, -0xc0, -0x4d, -0xbb, -0xbe, -0xe5, -0xa7, -0x83, -0xd5, -0x6a, -0x3c, -0xe3, -0x5b, -0xb8, -0xf2, -0x5c, -0x6d, -0x1f, -0xa6, -0xf3, -0x12, -0x24, -0xf6, -0xd6, -0x3b, -0x10, -0x14, -0x09, -0x07, -0x82, -0xe8, -0x30, -0x6a, -0x99, -0xdc, -0x95, -0x01, -0x9c, -0xd4, -0x68, -0x3b, -0xca, -0x98, -0x12, -0xab, -0x77, -0x25, -0x15, -0x7d, -0x10, -0x32, -0x45, -0x98, -0xcd, -0x7a, -0xdf, -0x71, -0x8a, -0x75, -0xc1, -0x1c, -0xd4, -0x68, -0x25, -0xeb, -0xbb, -0x54, -0x27, -0x6f, -0x2a, -0xf7, -0xb9, -0x98, -0x03, -0x27, -0xde, -0x24, -0xa8, -0xbb, -0x98, -0xc2, -0x84, -0xff, -0x9b, -0x51, -0xd8, -0x53, -0x50, -0xda, -0xf5, -0x88, -0xaa, -0x87, -0x2f, -0xae, -0xd6, -0xea, -0x6b, -0xde, -0xc8, -0xd7, -0xa7, -0x28, -0x65, -0x81, -0xe8, -0xb2, -0x3b, -0x1d, -0x4f, -0x75, -0x8f, -0x9f, -0x7a, -0x74, -0x8e, -0xc1, -0x5f, -0x9a, -0xa8, -0x9d, -0xfa, -0x03, -0xa3, -0x71, -0x9b, -0x37, -0x6d, -0xd5, -0x0b, -0xf5, -0xe1, -0xa1, -0x1b, -0x01, -0x6a, -0xc6, -0x67, -0xaa, -0xea, -0x2c, -0x9d, -0xa4, -0xd2, -0x6e, -0xfc, -0xde, -0x2e, -0x7f, -0x94, -0x69, -0xe5, -0x4a, -0xe0, -0x01, -0x48, -0x3c, -0x6b, -0xf7, -0x1e, -0xb6, -0x0b, -0x5f, -0xf9, -0x2e, -0x07, -0xc5, -0xe8, -0xae, -0x37, -0x1b, -0xbc, -0x3c, -0xd8, -0xd5, -0x0b, -0x91, -0x9e, -0x80, -0x24, -0xf5, -0x06, -0x0c, -0x0e, -0x98, -0x07, -0x96, -0x2d, -0x19, -0xdc, -0x58, -0x93, -0xcc, -0xfb, -0x4e, -0xeb, -0xbd, -0x0f, -0xf5, -0xaf, -0x01, -0xfa, -0xf1, -0x7c, -0x43, -0x8c, -0xb8, -0x56, -0x3e, -0xbe, -0x77, -0x4e, -0x2b, -0xf7, -0xbb, -0xb7, -0x45, -0x47, -0xcd, -0xcc, -0xa6, -0x4c, -0x72, -0x7b, -0x6a, -0x2a, -0x70, -0x13, -0x07, -0xfd, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x23, -0x67, -0x5b, -0x34, -0xd5, -0x14, -0x0c, -0xab, -0x77, -0x1f, -0xf8, -0x3d, -0x5a, -0x9f, -0x92, -0xb7, -0x2c, -0xad, -0x31, -0xde, -0x61, -0x07, -0xb3, -0x6b, -0xf7, -0x38, -0x15, -0x95, -0x46, -0x14, -0x48, -0x53, -0x69, -0x52, -0x66, -0x07, -0x6d, -0x83, -0x71, -0x8a, -0x67, -0x25, -0x20, -0x0f, -0xfe, -0xd7, -0x02, -0xd7, -0x6e, -0x2c, -0xd2, -0x1a, -0x0a, -0x5d, -0xfd, -0x0f, -0x74, -0xe3, -0xa4, -0x36, -0x07, -0x9a, -0xdf, -0xd4, -0x79, -0xbf, -0xef, -0x59, -0xc0, -0x44, -0x52, -0x87, -0x9a, -0x6e, -0x1d, -0x0e, -0xee, -0xde, -0x2e, -0x1a, -0xa9, -0x8f, -0x3a, -0xc9, -0xba, -0xec, -0x99, -0x78, -0x2d, -0x55, -0x6b, -0x14, -0xc2, -0x06, -0xd5, -0xfc, -0x93, -0x53, -0x4d, -0x11, -0x8c, -0xf8, -0xfa, -0x79, -0x7c, -0xa6, -0x64, -0xae, -0x61, -0xb8, -0x7b, -0x94, -0x56, -0xa6, -0x39, -0x78, -0x9a, -0xe5, -0xc7, -0xdf, -0x18, -0x63, -0x23, -0x9c, -0xfa, -0x66, -0xbb, -0xb7, -0x5a, -0x27, -0x4c, -0xd1, -0xa1, -0x83, -0x22, -0xb3, -0x52, -0x49, -0x35, -0xb0, -0x22, -0x83, -0x59, -0x12, -0x00, -0x16, -0x98, -0xdd, -0xad, -0xc2, -0x94, -0xf9, -0xd3, -0x7b, -0x64, -0x7f, -0x44, -0x3e, -0x3c, -0x8b, -0x9a, -0x83, -0x9c, -0x69, -0x6b, -0xe4, -0xdf, -0x9f, -0xed, -0x54, -0x1f, -0xe5, -0x5d, -0x7a, -0x05, -0x82, -0xb3, -0xdd, -0xef, -0xfc, -0x53, -0x96, -0xb0, -0x2c, -0x5a, -0xf8, -0xdf, -0x9c, -0x8b, -0x16, -0x4e, -0xdf, -0xda, -0x4d, -0x09, -0x09, -0x69, -0x50, -0x03, -0x65, -0xd8, -0x73, -0x70, -0xe8, -0x86, -0xbf, -0xbb, -0x35, -0xce, -0xb2, -0x46, -0xcb, -0x02, -0x00, -0x5b, -0xb4, -0xe2, -0xc6, -0x8f, -0x2f, -0x98, -0xaf, -0x87, -0x4b, -0x48, -0x45, -0xed, -0xcc, -0x1d, -0xe6, -0x58, -0xd6, -0xf2, -0x50, -0x25, -0x9f, -0x52, -0xc7, -0xcb, -0x8a, -0x17, -0x9d, -0x5b, -0xe5, -0xc8, -0xd7, -0x72, -0xb7, -0x52, -0xb2, -0xc4, -0x98, -0xe3, -0x7a, -0x17, -0x3e, -0xc6, -0x60, -0xa7, -0x97, -0xb0, -0xcf, -0x18, -0x81, -0x53, -0x84, -0x4c, -0xd5, -0x17, -0x32, -0x03, -0x13, -0x39, -0x51, -0x09, -0x10, -0xe3, -0x77, -0x49, -0x4f, -0x62, -0x01, -0xbf, -0x8c, -0x9a, -0xe0, -0x41, -0x9e, -0x89, -0x74, -0x36, -0xf9, -0x96, -0x86, -0x2e, -0x96, -0x1c, -0x4a, -0xb7, -0x2b, -0x4a, -0x97, -0xbc, -0x99, -0x40, -0xa3, -0xe0, -0x3d, -0xc8, -0xad, -0x2f, -0xdf, -0x4f, -0x2c, -0xc4, -0x69, -0x82, -0x9f, -0x9b, -0x81, -0x0c, -0x61, -0x5c, -0xa5, -0x9d, -0x8c, -0x89, -0xc0, -0x2c, -0xb4, -0x4a, -0x33, -0x4e, -0xeb, -0xa2, -0x56, -0x40, -0xc0, -0xc2, -0x46, -0xaf, -0x6a, -0xfc, -0x67, -0xd1, -0x80, -0x5e, -0xc5, -0x6d, -0x84, -0x43, -0x27, -0x3f, -0x55, -0x15, -0x96, -0x6a, -0xa0, -0xa5, -0xda, -0xb7, -0xff, -0xb7, -0x75, -0x6e, -0x4c, -0x49, -0x91, -0x9d, -0x22, -0xa3, -0x46, -0xea, -0xed, -0x9a, -0x00, -0xe2, -0x32, -0xc3, -0xd6, -0xa9, -0x71, -0x20, -0x55, -0xa3, -0x19, -0xed, -0xf8, -0x4f, -0xa7, -0x12, -0x9c, -0x66, -0x87, -0xaf, -0x4e, -0xb7, -0xf0, -0xdb, -0xbf, -0xef, -0xf0, -0xf6, -0xaf, -0xea, -0xda, -0x09, -0xfe, -0xde, -0x38, -0x5c, -0xa5, -0xa2, -0xdf, -0x99, -0x45, -0xa8, -0xe4, -0xe7, -0x92, -0xac, -0x67, -0xaa, -0x4f, -0xbf, -0x77, -0x3e, -0xa2, -0x40, -0x49, -0x22, -0x4a, -0x1e, -0x3b, -0xaa, -0x70, -0x7f, -0x95, -0xaf, -0x37, -0x4b, -0xfc, -0x99, -0xe2, -0xe0, -0xba, -0xd7, -0x34, -0xce, -0x55, -0x88, -0x5b, -0x84, -0x1b, -0x57, -0xc4, -0x80, -0x03, -0x53, -0xc9, -0x2f, -0x93, -0x04, -0x4d, -0xd5, -0x96, -0xe5, -0x70, -0xa6, -0x6e, -0x63, -0x5d, -0x9d, -0x6c, -0xdb, -0x02, -0x0a, -0xa9, -0xda, -0x8b, -0x53, -0xdc, -0xd9, -0x9a, -0xc5, -0x94, -0x2c, -0x91, -0x92, -0x2a, -0xde, -0xbb, -0x8b, -0x13, -0xb9, -0x19, -0x96, -0x64, -0xcc, -0xf2, -0x64, -0x39, -0xb7, -0x75, -0x49, -0xe9, -0x86, -0xc2, -0x86, -0x62, -0xd9, -0x24, -0xd3, -0x81, -0x35, -0x49, -0xfc, -0xa0, -0xa5, -0xa0, -0x93, -0x05, -0x64, -0xb4, -0x1a, -0x57, -0xce, -0x0c, -0x90, -0x02, -0x27, -0xc5, -0x7a, -0x2b, -0x5d, -0xae, -0x3e, -0xd5, -0xdd, -0x10, -0x7c, -0x14, -0xea, -0x3a, -0x08, -0xac, -0x72, -0x4e, -0x90, -0x3d, -0x3b, -0x7c, -0x86, -0x2e, -0xeb, -0xd4, -0x06, -0x70, -0xe6, -0xc7, -0xfb, -0x5f, -0xbd, -0x18, -0xf4, -0x11, -0xa4, -0x1a, -0x93, -0xc3, -0xbe, -0xd9, -0xfb, -0x26, -0x48, -0x2f, -0x37, -0x3c, -0xd0, -0x03, -0x47, -0x1a, -0xf7, -0x62, -0x19, -0x24, -0x5c, -0xf4, -0xa8, -0x92, -0x20, -0x7a, -0xf2, -0x9e, -0x2a, -0xc5, -0x95, -0xa2, -0xfb, -0xa4, -0xea, -0x85, -0xd8, -0x56, -0xb7, -0x70, -0xd1, -0x60, -0x30, -0xa5, -0x30, -0x82, -0x70, -0xdc, -0x7a, -0x65, -0x8a, -0x36, -0x3f, -0x5b, -0x0c, -0xae, -0x54, -0x7c, -0xd3, -0x57, -0x84, -0x7b, -0x3a, -0x65, -0x18, -0x81, -0xee, -0x05, -0x9b, -0x44, -0x4d, -0xb8, -0xda, -0xa2, -0xa1, -0xc9, -0x15, -0xd3, -0x73, -0x03, -0x0e, -0x43, -0xe9, -0x8e, -0x15, -0xf9, -0xbe, -0xc6, -0xc5, -0x8a, -0xe5, -0xc0, -0x1e, -0xc2, -0x37, -0x9e, -0x2a, -0x26, -0xa5, -0xa0, -0xbd, -0x24, -0x5f, -0xb9, -0xc1, -0xab, -0x34, -0x48, -0xb9, -0x5d, -0x98, -0xb4, -0x65, -0x18, -0xf3, -0x63, -0x19, -0x44, -0x1b, -0x11, -0x16, -0xff, -0xdc, -0xf1, -0x79, -0x08, -0x86, -0x0f, -0x52, -0x98, -0x73, -0xc4, -0x92, -0x90, -0x2b, -0x47, -0x09, -0xd0, -0x43, -0x6c, -0x2f, -0x20, -0xeb, -0xdc, -0xda, -0xc5, -0x08, -0x7b, -0x94, -0x42, -0x30, -0x6a, -0xc7, -0xda, -0x8c, -0xc3, -0x76, -0xa7, -0xa5, -0xcc, -0x62, -0x13, -0x00, -0x60, -0x31, -0x58, -0x44, -0x9b, -0xf5, -0x64, -0x14, -0xf5, -0x11, -0xc5, -0x54, -0x52, -0x83, -0xd4, -0x73, -0x01, -0x16, -0x0e, -0xb3, -0x7a, -0x29, -0x69, -0x35, -0x56, -0xd4, -0xee, -0x8a, -0x17, -0xa2, -0x99, -0x24, -0x9c, -0xd7, -0x8f, -0xdb, -0x55, -0xb5, -0x3e -}; diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/config.h b/keyboards/htx_studio/one_handed_keyboard_mr/config.h index 16d6192182a..b5c60197c4d 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_mr/config.h @@ -24,6 +24,7 @@ #define POINTING_DEVICE_CS_PIN A4 #define POINTING_DEVICE_MOTION_PIN A3 #define POINTING_DEVICE_TASK_THROTTLE_MS 1 +#define POINTING_DEVICE_INVERT_X 1 #define ENCODER_RESOLUTION 2 diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json index 927c8b4dfe9..9408f198087 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json @@ -1,232 +1,221 @@ { - "keyboard_name": "One-Handed_Keyboard_MR", "manufacturer": "HTXStudio", - "url": "https://github.com/htx-studio", + "keyboard_name": "One-Handed_Keyboard_MR", "maintainer": "HTXStudio", - "usb": { - "vid": "0x475D", - "pid": "0x03BF", - "device_version": "3.1.0" - }, - "processor": "STM32G431", "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", - "matrix": { - "rows": 6, - "cols": 14 - }, - "features": { - "bootmagic": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true, - "encoder": true, - "rgb_matrix": true - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, "encoder": { "rotary": [ {"pin_a": "A9", "pin_b": "A10"} ] }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true, + "rgb_matrix": true + }, + "matrix": { + "cols": 14, + "rows": 6 + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "processor": "STM32G431", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 17, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 34, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 51, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 68, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 85, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 102, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 119, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 136, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 153, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 170, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 187, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 204, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 221, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 16, "flags": 4}, + {"matrix": [1, 1], "x": 17, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 34, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 68, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 85, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 102, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 119, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 153, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 170, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 187, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 204, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 221, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 32, "flags": 4}, + {"matrix": [2, 1], "x": 23, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 57, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 74, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 91, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 125, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 159, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 176, "y": 32, "flags": 4}, + {"matrix": [2, 13], "x": 200, "y": 32, "flags": 4}, + {"matrix": [3, 0], "x": 21, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 42, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 62, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 81, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 100, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 119, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 138, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 157, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 200, "y": 48, "flags": 4}, + {"matrix": [4, 0], "x": 24, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 64, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 5], "x": 116, "y": 64, "flags": 4}, + {"matrix": [4, 7], "x": 137, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 158, "y": 64, "flags": 4}, + {"matrix": [4, 10], "x": 179, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 200, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 221, "y": 64, "flags": 4} + ], + "max_brightness": 110, + "sleep": true + }, + "url": "https://github.com/htx-studio", + "usb": { + "device_version": "3.1.0", + "pid": "0x03BF", + "vid": "0x475D" + }, "ws2812": { - "pin": "B4", - "driver": "pwm" + "driver": "pwm", + "pin": "B4" }, "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, - {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, - {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, - {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, - {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, - {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, - {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, - {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, - {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, - {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, - {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, - {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, - {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, - {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, - - {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, - {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, - {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, - {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, - {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, - {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, - {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, - {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, - {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, - {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, - {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, - {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, - {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, - {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, - - {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, - {"matrix": [2, 1], "w":1, "h":1, "x":2, "y":2}, - {"matrix": [2, 2], "w":1, "h":1, "x":3, "y":2}, - {"matrix": [2, 3], "w":1, "h":1, "x":4, "y":2}, - {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, - {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, - {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, - {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, - {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, - {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, - {"matrix": [2, 11], "w":1.5, "h":1, "x":11, "y":2}, - {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, - - {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, - {"matrix": [3, 2], "w":1, "h":1, "x":3, "y":3}, - {"matrix": [3, 3], "w":1, "h":1, "x":4, "y":3}, - {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, - {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, - {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, - {"matrix": [3, 9], "w":1, "h":1, "x":8, "y":3}, - {"matrix": [3, 10], "w":1, "h":1, "x":9, "y":3}, - {"matrix": [3, 11], "w":2, "h":1, "x":10, "y":3}, - {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, - - {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, - {"matrix": [4, 2], "w":1.25, "h":1, "x":2.5, "y":4}, - {"matrix": [4, 3], "w":1.25, "h":1, "x":3.75, "y":4}, - {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, - {"matrix": [4, 7], "w":1.25, "h":1, "x":6.25, "y":4}, - {"matrix": [4, 9], "w":1.25, "h":1, "x":7.5, "y":4}, - {"matrix": [4, 10], "w":1.25, "h":1, "x":8.75, "y":4}, - {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, - {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, - - {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, - {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, - {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, - {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, - {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + {"matrix": [2, 0], "x": 0.5, "y": 2, "w": 1.5}, + {"matrix": [2, 1], "x": 2, "y": 2}, + {"matrix": [2, 2], "x": 3, "y": 2}, + {"matrix": [2, 3], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2, "w": 1.5}, + {"matrix": [2, 13], "x": 12.5, "y": 2}, + {"matrix": [3, 0], "x": 1, "y": 3, "w": 2}, + {"matrix": [3, 2], "x": 3, "y": 3}, + {"matrix": [3, 3], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 9], "x": 8, "y": 3}, + {"matrix": [3, 10], "x": 9, "y": 3}, + {"matrix": [3, 11], "x": 10, "y": 3, "w": 2}, + {"matrix": [3, 13], "x": 12, "y": 3, "w": 2}, + {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 3.75, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 5, "y": 4, "w": 1.25}, + {"matrix": [4, 7], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 9], "x": 7.5, "y": 4, "w": 1.25}, + {"matrix": [4, 10], "x": 8.75, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 10.75, "y": 4, "w": 2}, + {"matrix": [4, 13], "x": 12, "y": 4, "w": 1.25}, + {"matrix": [5, 0], "x": 0, "y": 5}, + {"matrix": [5, 3], "x": 3, "y": 5}, + {"matrix": [5, 4], "x": 4, "y": 5}, + {"matrix": [5, 5], "x": 5, "y": 5}, + {"matrix": [5, 6], "x": 6, "y": 5} ] } - - }, - "rgb_matrix": { - "driver": "ws2812", - "max_brightness": 110, - "animations": { - "alphas_mods": true, - "gradient_up_down": true, - "gradient_left_right": true, - "breathing": true, - "band_sat": true, - "band_val": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_up_down": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "rainbow_moving_chevron": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "raindrops": true, - "jellybean_raindrops": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "pixel_fractal": true, - "pixel_flow": true, - "pixel_rain": true, - "typing_heatmap": true, - "digital_rain": true, - "solid_reactive_simple": true, - "solid_reactive": true, - "solid_reactive_wide": true, - "solid_reactive_multiwide": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_nexus": true, - "solid_reactive_multinexus": true, - "splash": true, - "multisplash": true, - "solid_splash": true, - "solid_multisplash": true - }, - "layout": [ - {"matrix": [0,0], "flags":4, "x":0, "y":0}, - {"matrix": [0,1], "flags":4, "x":17, "y":0}, - {"matrix": [0,2], "flags":4, "x":34, "y":0}, - {"matrix": [0,3], "flags":4, "x":51, "y":0}, - {"matrix": [0,4], "flags":4, "x":68, "y":0}, - {"matrix": [0,5], "flags":4, "x":85, "y":0}, - {"matrix": [0,6], "flags":4, "x":102, "y":0}, - {"matrix": [0,7], "flags":4, "x":119, "y":0}, - {"matrix": [0,8], "flags":4, "x":136, "y":0}, - {"matrix": [0,9], "flags":4, "x":153, "y":0}, - {"matrix": [0,10], "flags":4, "x":170, "y":0}, - {"matrix": [0,11], "flags":4, "x":187, "y":0}, - {"matrix": [0,12], "flags":4, "x":204, "y":0}, - {"matrix": [0,13], "flags":4, "x":221, "y":0}, - - {"matrix": [1,0], "flags":4, "x":0, "y":16}, - {"matrix": [1,1], "flags":4, "x":17, "y":16}, - {"matrix": [1,2], "flags":4, "x":34, "y":16}, - {"matrix": [1,3], "flags":4, "x":51, "y":16}, - {"matrix": [1,4], "flags":4, "x":68, "y":16}, - {"matrix": [1,5], "flags":4, "x":85, "y":16}, - {"matrix": [1,6], "flags":4, "x":102, "y":16}, - {"matrix": [1,7], "flags":4, "x":119, "y":16}, - {"matrix": [1,8], "flags":4, "x":136, "y":16}, - {"matrix": [1,9], "flags":4, "x":153, "y":16}, - {"matrix": [1,10], "flags":4, "x":170, "y":16}, - {"matrix": [1,11], "flags":4, "x":187, "y":16}, - {"matrix": [1,12], "flags":4, "x":204, "y":16}, - {"matrix": [1,13], "flags":4, "x":221, "y":16}, - - {"matrix": [2,0], "flags":4, "x":3, "y":32}, - {"matrix": [2,1], "flags":4, "x":23, "y":32}, - {"matrix": [2,2], "flags":4, "x":40, "y":32}, - {"matrix": [2,3], "flags":4, "x":57, "y":32}, - {"matrix": [2,5], "flags":4, "x":74, "y":32}, - {"matrix": [2,6], "flags":4, "x":91, "y":32}, - {"matrix": [2,7], "flags":4, "x":108, "y":32}, - {"matrix": [2,8], "flags":4, "x":125, "y":32}, - {"matrix": [2,9], "flags":4, "x":142, "y":32}, - {"matrix": [2,10], "flags":4, "x":159, "y":32}, - {"matrix": [2,11], "flags":4, "x":176, "y":32}, - {"matrix": [2,13], "flags":4, "x":200, "y":32}, - - {"matrix": [3,0], "flags":4, "x":21, "y":48}, - {"matrix": [3,2], "flags":4, "x":42, "y":48}, - {"matrix": [3,3], "flags":4, "x":62, "y":48}, - {"matrix": [3,5], "flags":4, "x":81, "y":48}, - {"matrix": [3,6], "flags":4, "x":100, "y":48}, - {"matrix": [3,7], "flags":4, "x":119, "y":48}, - {"matrix": [3,9], "flags":4, "x":138, "y":48}, - {"matrix": [3,10], "flags":4, "x":157, "y":48}, - {"matrix": [3,11], "flags":4, "x":176, "y":48}, - {"matrix": [3,13], "flags":4, "x":200, "y":48}, - - {"matrix": [4,0], "flags":4, "x":24, "y":64}, - {"matrix": [4,2], "flags":4, "x":64, "y":64}, - {"matrix": [4,3], "flags":4, "x":95, "y":64}, - {"matrix": [4,5], "flags":4, "x":116, "y":64}, - {"matrix": [4,7], "flags":4, "x":137, "y":64}, - {"matrix": [4,9], "flags":4, "x":158, "y":64}, - {"matrix": [4,10], "flags":4, "x":179, "y":64}, - {"matrix": [4,12], "flags":4, "x":200, "y":64}, - {"matrix": [4,13], "flags":4, "x":221, "y":64} - ], - "sleep": true } } - diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c index 5205f78bdf0..e3dc303db5b 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c @@ -16,6 +16,21 @@ #include QMK_KEYBOARD_H +#define TRACKBALL_DPI_MIN 1000 +#define TRACKBALL_DPI_MAX 8000 +#define TRACKBALL_DPI_DEFAULT 3000 +#define TRACKBALL_DPI_STEP 1000 + +enum my_keycodes { + DPI_UP = SAFE_RANGE, + DPI_DOWN +}; + +typedef union { + uint16_t TrackballDPI; +} user_config_t; +user_config_t user_config; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ @@ -45,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ // ┃ ┃ ┃ F1 ┃ F2 ┃ F3 ┃ F4 ┃ F5 ┃ F6 ┃ F7 ┃ F8 ┃ F9 ┃ F10 ┃ F11 ┃ F12 ┃ // ┣━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┫ -// ┃ ┃ ┃ ┃RM_HUEU┃RM_HUED┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ +// ┃ ┃ ┃ ┃RM_HUEU┃RM_HUED┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ DPI_DO┃ DPI_UP┃ // ┗━━━┳━━━┻━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━╋━━━━━━━┻━━━┳━━━┛ // ┃ ┃ ┃ ┃RM_SATU┃RM_SATD┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ // ┗━━━┳━━━━━━━┻━━┳━━━━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━┳━┻━━━━━━━┻━━━━━━━┳━━━┛ @@ -59,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, _______, _______, RM_HUEU, RM_HUED, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RM_HUEU, RM_HUED, _______, _______, _______, _______, _______, _______, _______, DPI_DOWN, DPI_UP, _______, _______, _______, RM_SATU, RM_SATD, _______, _______, _______, _______, _______, _______, _______, QK_MOUSE_BUTTON_1, QK_MOUSE_BUTTON_2, RM_SPDU, RM_SPDD, _______, _______, _______, _______, _______, _______, KC_DEL, RM_TOGG, _______, _______, _______, KC_BSLS, _______, _______, _______, @@ -73,3 +88,60 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [1] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)} }; #endif + +void pointing_device_init_kb(void) { + wait_ms(10); + user_config.TrackballDPI = eeconfig_read_user(); + wait_ms(10); + adns9800_init(); + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +// ADNS9800. The CPI range is 800-8200, in increments of 200. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DPI_UP: { + if (record->event.pressed) { + user_config.TrackballDPI += TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { + user_config.TrackballDPI = TRACKBALL_DPI_MAX; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + case DPI_DOWN: { + if (record->event.pressed) { + user_config.TrackballDPI -= TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { + user_config.TrackballDPI = TRACKBALL_DPI_MIN; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + default: + return true; + + } +} + +void eeconfig_init_user(void) { + user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); + eeconfig_update_user(user_config.TrackballDPI); +} + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); + } + return false; +} + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk index 08f4783a51c..a94d33f67be 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk @@ -1,8 +1,8 @@ -VIA_ENABLE = yes -POINTING_DEVICE_DRIVER = custom -SRC += adns.c SPI_DRIVER_REQUIRED = yes ENCODER_MAP_ENABLE = yes RGB_MATRIX_ENABLE = yes WS2812_DRIVER = pwm +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = adns9800 + diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk b/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk new file mode 100644 index 00000000000..16d33cd89fe --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json index 01af4f177d1..3da67c86693 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json @@ -1,112 +1,105 @@ { - "keyboard_name": "One-Handed_Keyboard_SL", "manufacturer": "HTXStudio", - "url": "https://github.com/htx-studio", + "keyboard_name": "One-Handed_Keyboard_SL", "maintainer": "HTXStudio", - "usb": { - "vid": "0x475D", - "pid": "0x03BE", - "device_version": "3.1.0" - }, - "processor": "STM32G431", "bootloader": "stm32-dfu", "diode_direction": "ROW2COL", - "matrix": { - "rows": 6, - "cols": 14 - }, - "features": { - "bootmagic": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true, - "encoder": true - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, "encoder": { "rotary": [ {"pin_a": "A9", "pin_b": "A10"} ] }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true + }, + "matrix": { + "cols": 14, + "rows": 6 + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "processor": "STM32G431", + "url": "https://github.com/htx-studio", + "usb": { + "device_version": "3.1.0", + "pid": "0x03BE", + "vid": "0x475D" + }, "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "w":1, "h":1, "x":0, "y":0}, - {"matrix": [0, 1], "w":1, "h":1, "x":1, "y":0}, - {"matrix": [0, 2], "w":1, "h":1, "x":2, "y":0}, - {"matrix": [0, 3], "w":1, "h":1, "x":3, "y":0}, - {"matrix": [0, 4], "w":1, "h":1, "x":4, "y":0}, - {"matrix": [0, 5], "w":1, "h":1, "x":5, "y":0}, - {"matrix": [0, 6], "w":1, "h":1, "x":6, "y":0}, - {"matrix": [0, 7], "w":1, "h":1, "x":7, "y":0}, - {"matrix": [0, 8], "w":1, "h":1, "x":8, "y":0}, - {"matrix": [0, 9], "w":1, "h":1, "x":9, "y":0}, - {"matrix": [0, 10], "w":1, "h":1, "x":10, "y":0}, - {"matrix": [0, 11], "w":1, "h":1, "x":11, "y":0}, - {"matrix": [0, 12], "w":1, "h":1, "x":12, "y":0}, - {"matrix": [0, 13], "w":1, "h":1, "x":13, "y":0}, - - {"matrix": [1, 0], "w":1, "h":1, "x":0, "y":1}, - {"matrix": [1, 1], "w":1, "h":1, "x":1, "y":1}, - {"matrix": [1, 2], "w":1, "h":1, "x":2, "y":1}, - {"matrix": [1, 3], "w":1, "h":1, "x":3, "y":1}, - {"matrix": [1, 4], "w":1, "h":1, "x":4, "y":1}, - {"matrix": [1, 5], "w":1, "h":1, "x":5, "y":1}, - {"matrix": [1, 6], "w":1, "h":1, "x":6, "y":1}, - {"matrix": [1, 7], "w":1, "h":1, "x":7, "y":1}, - {"matrix": [1, 8], "w":1, "h":1, "x":8, "y":1}, - {"matrix": [1, 9], "w":1, "h":1, "x":9, "y":1}, - {"matrix": [1, 10], "w":1, "h":1, "x":10, "y":1}, - {"matrix": [1, 11], "w":1, "h":1, "x":11, "y":1}, - {"matrix": [1, 12], "w":1, "h":1, "x":12, "y":1}, - {"matrix": [1, 13], "w":1, "h":1, "x":13, "y":1}, - - {"matrix": [2, 0], "w":1.5, "h":1, "x":0.5, "y":2}, - {"matrix": [2, 2], "w":1, "h":1, "x":2, "y":2}, - {"matrix": [2, 3], "w":1, "h":1, "x":3, "y":2}, - {"matrix": [2, 4], "w":1, "h":1, "x":4, "y":2}, - {"matrix": [2, 5], "w":1, "h":1, "x":5, "y":2}, - {"matrix": [2, 6], "w":1, "h":1, "x":6, "y":2}, - {"matrix": [2, 7], "w":1, "h":1, "x":7, "y":2}, - {"matrix": [2, 8], "w":1, "h":1, "x":8, "y":2}, - {"matrix": [2, 9], "w":1, "h":1, "x":9, "y":2}, - {"matrix": [2, 10], "w":1, "h":1, "x":10, "y":2}, - {"matrix": [2, 12], "w":1.5, "h":1, "x":11, "y":2}, - {"matrix": [2, 13], "w":1, "h":1, "x":12.5, "y":2}, - - {"matrix": [3, 0], "w":2, "h":1, "x":1, "y":3}, - {"matrix": [3, 3], "w":1, "h":1, "x":3, "y":3}, - {"matrix": [3, 4], "w":1, "h":1, "x":4, "y":3}, - {"matrix": [3, 5], "w":1, "h":1, "x":5, "y":3}, - {"matrix": [3, 6], "w":1, "h":1, "x":6, "y":3}, - {"matrix": [3, 7], "w":1, "h":1, "x":7, "y":3}, - {"matrix": [3, 8], "w":1, "h":1, "x":8, "y":3}, - {"matrix": [3, 9], "w":1, "h":1, "x":9, "y":3}, - {"matrix": [3, 10], "w":2, "h":1, "x":10, "y":3}, - {"matrix": [3, 13], "w":2, "h":1, "x":12, "y":3}, - - {"matrix": [4, 0], "w":1.25, "h":1, "x":1.25, "y":4}, - {"matrix": [4, 3], "w":1.25, "h":1, "x":2.5, "y":4}, - {"matrix": [4, 4], "w":1.25, "h":1, "x":3.75, "y":4}, - {"matrix": [4, 5], "w":1.25, "h":1, "x":5, "y":4}, - {"matrix": [4, 6], "w":1.25, "h":1, "x":6.25, "y":4}, - {"matrix": [4, 7], "w":1.25, "h":1, "x":7.5, "y":4}, - {"matrix": [4, 9], "w":1.25, "h":1, "x":8.75, "y":4}, - {"matrix": [4, 12], "w":2, "h":1, "x":10.75, "y":4}, - {"matrix": [4, 13], "w":1.25, "h":1, "x":12, "y":4}, - - {"matrix": [5, 0], "w":1, "h":1, "x":0, "y":5}, - {"matrix": [5, 3], "w":1, "h":1, "x":3, "y":5}, - {"matrix": [5, 4], "w":1, "h":1, "x":4, "y":5}, - {"matrix": [5, 5], "w":1, "h":1, "x":5, "y":5}, - {"matrix": [5, 6], "w":1, "h":1, "x":6, "y":5} + {"matrix": [0, 0], "x": 0, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 1], "x": 1, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 2], "x": 2, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 3], "x": 3, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 4], "x": 4, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 5], "x": 5, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 6], "x": 6, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 7], "x": 7, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 8], "x": 8, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 9], "x": 9, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 10], "x": 10, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 11], "x": 11, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 12], "x": 12, "y": 0, "w": 1, "h": 1}, + {"matrix": [0, 13], "x": 13, "y": 0, "w": 1, "h": 1}, + {"matrix": [1, 0], "x": 0, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 1], "x": 1, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 2], "x": 2, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 3], "x": 3, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 4], "x": 4, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 5], "x": 5, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 6], "x": 6, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 7], "x": 7, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 8], "x": 8, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 9], "x": 9, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 10], "x": 10, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 11], "x": 11, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 12], "x": 12, "y": 1, "w": 1, "h": 1}, + {"matrix": [1, 13], "x": 13, "y": 1, "w": 1, "h": 1}, + {"matrix": [2, 0], "x": 0.5, "y": 2, "w": 1.5, "h": 1}, + {"matrix": [2, 2], "x": 2, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 3], "x": 3, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 4], "x": 4, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 5], "x": 5, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 6], "x": 6, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 7], "x": 7, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 8], "x": 8, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 9], "x": 9, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 10], "x": 10, "y": 2, "w": 1, "h": 1}, + {"matrix": [2, 12], "x": 11, "y": 2, "w": 1.5, "h": 1}, + {"matrix": [2, 13], "x": 12.5, "y": 2, "w": 1, "h": 1}, + {"matrix": [3, 0], "x": 1, "y": 3, "w": 2, "h": 1}, + {"matrix": [3, 3], "x": 3, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 4], "x": 4, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 5], "x": 5, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 6], "x": 6, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 7], "x": 7, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 8], "x": 8, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 9], "x": 9, "y": 3, "w": 1, "h": 1}, + {"matrix": [3, 10], "x": 10, "y": 3, "w": 2, "h": 1}, + {"matrix": [3, 13], "x": 12, "y": 3, "w": 2, "h": 1}, + {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 5], "x": 5, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 7], "x": 7.5, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 9], "x": 8.75, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [4, 12], "x": 10.75, "y": 4, "w": 2, "h": 1}, + {"matrix": [4, 13], "x": 12, "y": 4, "w": 1.25, "h": 1}, + {"matrix": [5, 0], "x": 0, "y": 5, "w": 1, "h": 1}, + {"matrix": [5, 3], "x": 3, "y": 5, "w": 1, "h": 1}, + {"matrix": [5, 4], "x": 4, "y": 5, "w": 1, "h": 1}, + {"matrix": [5, 5], "x": 5, "y": 5, "w": 1, "h": 1}, + {"matrix": [5, 6], "x": 6, "y": 5, "w": 1, "h": 1} ] } - } } - diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk index 382f3a9f618..94839da6607 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk @@ -1,5 +1,4 @@ -VIA_ENABLE = yes POINTING_DEVICE_DRIVER = custom SRC += adns.c SPI_DRIVER_REQUIRED = yes -ENCODER_MAP_ENABLE = yes \ No newline at end of file +ENCODER_MAP_ENABLE = yes From da773676790c63a12baadccb65818807d3dd1b80 Mon Sep 17 00:00:00 2001 From: htx_studio Date: Tue, 6 May 2025 20:18:02 +0800 Subject: [PATCH 4/7] one_handed_keyboard_sl add trackball DPI control --- .../keymaps/default/rules.mk | 1 - .../one_handed_keyboard_mr/rules.mk | 2 - .../htx_studio/one_handed_keyboard_sl/adns.c | 254 -- .../htx_studio/one_handed_keyboard_sl/adns.h | 38 - .../one_handed_keyboard_sl/adns9800_srom_A6.h | 3081 ----------------- .../one_handed_keyboard_sl/config.h | 1 + .../one_handed_keyboard_sl/keyboard.json | 128 +- .../keymaps/default/keymap.c | 62 + .../keymaps/default/rules.mk | 5 +- .../{one_handed_keyboard_ml => }/rules.mk | 1 - 10 files changed, 130 insertions(+), 3443 deletions(-) delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/rules.mk delete mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns.c delete mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h rename keyboards/htx_studio/{one_handed_keyboard_ml => }/rules.mk (94%) diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk index a94d33f67be..737257c5d8d 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk +++ b/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk @@ -5,4 +5,3 @@ WS2812_DRIVER = pwm POINTING_DEVICE_ENABLE = yes POINTING_DEVICE_DRIVER = adns9800 - diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk b/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk deleted file mode 100644 index 16d33cd89fe..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes - diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns.c b/keyboards/htx_studio/one_handed_keyboard_sl/adns.c deleted file mode 100644 index 32703a65c46..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_sl/adns.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#include "spi_master.h" -#include "adns.h" -#include "debug.h" -#include "wait.h" -#include "pointing_device.h" -#include "adns9800_srom_A6.h" - -// registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 -#define REG_Frame_Period_Max_Bound_Lower 0x1a -#define REG_Frame_Period_Max_Bound_Upper 0x1b -#define REG_Frame_Period_Min_Bound_Lower 0x1c -#define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -// pins -#define NCS A4 - -extern const uint16_t firmware_length; -extern const uint8_t firmware_data[]; - -enum motion_burst_propertr{ - motion = 0, - observation, - delta_x_l, - delta_x_h, - delta_y_l, - delta_y_h, - squal, - pixel_sum, - maximum_pixel, - minimum_pixel, - shutter_upper, - shutter_lower, - frame_period_upper, - frame_period_lower, - end_data -}; - -void adns_begin(void){ - spi_start(NCS, false, 3, 8); -} - -void adns_end(void){ - spi_stop(); -} - -void adns_write(uint8_t reg_addr, uint8_t data){ - - adns_begin(); - //send address of the register, with MSBit = 1 to indicate it's a write - spi_write(reg_addr | 0x80 ); - spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - adns_end(); -} - -uint8_t adns_read(uint8_t reg_addr){ - - - adns_begin(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - adns_end(); - return data; -} - -void pointing_device_init(void) { - dprint("STARTING INTI\n"); - - spi_init(); - // reset serial port - adns_begin(); - adns_end(); - - // reboot - adns_write(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); - - // upload firmware - - // set the configuration_IV register in 3k firmware mode - // bit 1 = 1 for 3k mode, other bits are reserved - adns_write(REG_Configuration_IV, 0x02); - - // write 0x1d in SROM_enable reg for initializing - adns_write(REG_SROM_Enable, 0x1d); - - // wait for more than one frame period - // assume that the frame rate is as low as 100fps... even if it should never be that low - wait_ms(10); - - // write 0x18 to SROM_enable to start SROM download - adns_write(REG_SROM_Enable, 0x18); - - // write the SROM file (=firmware data) - - // write burst destination adress - adns_begin(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < firmware_length; i++){ - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - - adns_end(); - wait_ms(10); - - // enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b) - // reading the actual value of the register is important because the real - // default value is different from what is said in the datasheet, and if you - // change the reserved bytes (like by writing 0x00...) it would not work. - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); - - wait_ms(1); - - // set the configuration_I register to set the CPI - // 0x01 = 50, minimum - // 0x44 = 3400, default - // 0x8e = 7100 - // 0xA4 = 8200, maximum - adns_write(REG_Configuration_I, 0x30); - - wait_ms(100); - dprint("INIT ENDED\n"); -} - -int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - //int16_t twos_comp = (high << 8) | low; - //return twos_comp; - return (high << 8) | low; -} - -motion_delta_t readSensor(void) { - adns_begin(); - - // read from Motion_Burst to enable burt mode - spi_write(REG_Motion_Burst & 0x7f); - - // Wait one frame per docs, thanks u/kbjunky - wait_us(100); - uint8_t burst_data[pixel_sum]; - - for (int i = 0; i < pixel_sum; ++i) { - burst_data[i] = spi_read(); - } - - uint16_t delta_x = convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); - uint16_t delta_y = convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); - // Only consider the MSB for motion as this byte has other status bits - uint8_t motion_ind = burst_data[motion] & 0b10000000; - adns_end(); - - motion_delta_t delta = {delta_x, delta_y, motion_ind}; - return delta; -} - -bool pointing_device_task(void) { - motion_delta_t delta = readSensor(); - - report_mouse_t report = pointing_device_get_report(); - - if(delta.motion_ind) { - // clamp deltas from -127 to 127 - report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x; - report.x = -report.x; - report.y = delta.delta_y < -127 ? -127 : delta.delta_y > 127 ? 127 : delta.delta_y; - } - - pointing_device_set_report(report); - return pointing_device_send(); -} diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns.h b/keyboards/htx_studio/one_handed_keyboard_sl/adns.h deleted file mode 100644 index e557aeb2ece..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_sl/adns.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2020 Richard Sutherland - * - * 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 . - */ -#pragma once - -#include - -void adns_begin(void); - -void adns_end(void); - -void adns_write(uint8_t reg_addr, uint8_t data); - -uint8_t adns_read(uint8_t reg_addr); - - -int16_t convertDeltaToInt(uint8_t high, uint8_t low); - -struct _motion_delta { - int16_t delta_x; - int16_t delta_y; - int8_t motion_ind; -}; -typedef struct _motion_delta motion_delta_t; - -motion_delta_t readSensor(void); diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h b/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h deleted file mode 100644 index fddf30589d4..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_sl/adns9800_srom_A6.h +++ /dev/null @@ -1,3081 +0,0 @@ -// ADNS-9800 Firmware bytecode is Copyright Avago Technologies. -// Originally formatted for Arduino use by MrJohnK - https://github.com/mrjohnk - -#pragma once - -#include "progmem.h" - -const uint16_t firmware_length = 3070; - -const uint8_t firmware_data[] PROGMEM = { - 0x03, -0xa6, -0x68, -0x1e, -0x7d, -0x10, -0x7e, -0x7e, -0x5f, -0x1c, -0xb8, -0xf2, -0x47, -0x0c, -0x7b, -0x74, -0x4b, -0x14, -0x8b, -0x75, -0x66, -0x51, -0x0b, -0x8c, -0x76, -0x74, -0x4b, -0x14, -0xaa, -0xd6, -0x0f, -0x9c, -0xba, -0xf6, -0x6e, -0x3f, -0xdd, -0x38, -0xd5, -0x02, -0x80, -0x9b, -0x82, -0x6d, -0x58, -0x13, -0xa4, -0xab, -0xb5, -0xc9, -0x10, -0xa2, -0xc6, -0x0a, -0x7f, -0x5d, -0x19, -0x91, -0xa0, -0xa3, -0xce, -0xeb, -0x3e, -0xc9, -0xf1, -0x60, -0x42, -0xe7, -0x4c, -0xfb, -0x74, -0x6a, -0x56, -0x2e, -0xbf, -0xdd, -0x38, -0xd3, -0x05, -0x88, -0x92, -0xa6, -0xce, -0xff, -0x5d, -0x38, -0xd1, -0xcf, -0xef, -0x58, -0xcb, -0x65, -0x48, -0xf0, -0x35, -0x85, -0xa9, -0xb2, -0x8f, -0x5e, -0xf3, -0x80, -0x94, -0x97, -0x7e, -0x75, -0x97, -0x87, -0x73, -0x13, -0xb0, -0x8a, -0x69, -0xd4, -0x0a, -0xde, -0xc1, -0x79, -0x59, -0x36, -0xdb, -0x9d, -0xd6, -0xb8, -0x15, -0x6f, -0xce, -0x3c, -0x72, -0x32, -0x45, -0x88, -0xdf, -0x6c, -0xa5, -0x6d, -0xe8, -0x76, -0x96, -0x14, -0x74, -0x20, -0xdc, -0xf4, -0xfa, -0x37, -0x6a, -0x27, -0x32, -0xe3, -0x29, -0xbf, -0xc4, -0xc7, -0x06, -0x9d, -0x58, -0xe7, -0x87, -0x7c, -0x2e, -0x9f, -0x6e, -0x49, -0x07, -0x5d, -0x23, -0x64, -0x54, -0x83, -0x6e, -0xcb, -0xb7, -0x77, -0xf7, -0x2b, -0x6e, -0x0f, -0x2e, -0x66, -0x12, -0x60, -0x55, -0x65, -0xfc, -0x43, -0xb3, -0x58, -0x73, -0x5b, -0xe8, -0x67, -0x04, -0x43, -0x02, -0xde, -0xb3, -0x89, -0xa0, -0x6d, -0x3a, -0x27, -0x79, -0x64, -0x5b, -0x0c, -0x16, -0x9e, -0x66, -0xb1, -0x8b, -0x87, -0x0c, -0x5d, -0xf2, -0xb6, -0x3d, -0x71, -0xdf, -0x42, -0x03, -0x8a, -0x06, -0x8d, -0xef, -0x1d, -0xa8, -0x96, -0x5c, -0xed, -0x31, -0x61, -0x5c, -0xa1, -0x34, -0xf6, -0x8c, -0x08, -0x60, -0x33, -0x07, -0x00, -0x3e, -0x79, -0x95, -0x1b, -0x43, -0x7f, -0xfe, -0xb6, -0xa6, -0xd4, -0x9d, -0x76, -0x72, -0xbf, -0xad, -0xc0, -0x15, -0xe8, -0x37, -0x31, -0xa3, -0x72, -0x63, -0x52, -0x1d, -0x1c, -0x5d, -0x51, -0x1b, -0xe1, -0xa9, -0xed, -0x60, -0x32, -0x3e, -0xa9, -0x50, -0x28, -0x53, -0x06, -0x59, -0xe2, -0xfc, -0xe7, -0x02, -0x64, -0x39, -0x21, -0x56, -0x4a, -0xa5, -0x40, -0x80, -0x81, -0xd5, -0x5a, -0x60, -0x7b, -0x68, -0x84, -0xf1, -0xe0, -0xb1, -0xb6, -0x5b, -0xdf, -0xa8, -0x1d, -0x6d, -0x65, -0x20, -0xc0, -0xa2, -0xb9, -0xd9, -0xbb, -0x00, -0xa6, -0xdb, -0x8b, -0x01, -0x53, -0x91, -0xfe, -0xc4, -0x51, -0x85, -0xb0, -0x96, -0x7f, -0xfd, -0x51, -0xdd, -0x14, -0x03, -0x67, -0x2e, -0x75, -0x1c, -0x76, -0xd3, -0x6e, -0xdd, -0x99, -0x55, -0x76, -0xe5, -0xab, -0x23, -0xfc, -0x4a, -0xd5, -0xc6, -0xe8, -0x2e, -0xca, -0x8a, -0xb3, -0xf6, -0x8c, -0x6c, -0xb0, -0xe9, -0xf2, -0xe7, -0x9e, -0x69, -0x41, -0xed, -0xf1, -0x6d, -0xd2, -0x86, -0xd8, -0x7e, -0xcb, -0x5d, -0x47, -0x6c, -0x85, -0x6a, -0x23, -0xed, -0x20, -0x40, -0x93, -0xb4, -0x20, -0xc7, -0xa5, -0xc9, -0xaf, -0x03, -0x15, -0xac, -0x19, -0xe5, -0x2a, -0x36, -0xdf, -0x6d, -0xc5, -0x8c, -0x80, -0x07, -0xce, -0x92, -0x0c, -0xd8, -0x06, -0x62, -0x0f, -0xdd, -0x48, -0x46, -0x1a, -0x53, -0xc7, -0x8a, -0x8c, -0x5d, -0x5d, -0xb4, -0xa1, -0x02, -0xd3, -0xa9, -0xb8, -0xf3, -0x94, -0x8f, -0x3f, -0xe5, -0x54, -0xd4, -0x11, -0x65, -0xb2, -0x5e, -0x09, -0x0b, -0x81, -0xe3, -0x75, -0xa7, -0x89, -0x81, -0x39, -0x6c, -0x46, -0xf6, -0x06, -0x9f, -0x27, -0x3b, -0xb6, -0x2d, -0x5f, -0x1d, -0x4b, -0xd4, -0x7b, -0x1d, -0x61, -0x74, -0x89, -0xe4, -0xe3, -0xbd, -0x98, -0x1b, -0xc4, -0x51, -0x3b, -0xa4, -0xfa, -0xe0, -0x92, -0xf7, -0xbe, -0xf2, -0x4d, -0xbb, -0xff, -0xad, -0x4f, -0x6d, -0x68, -0xc2, -0x79, -0x40, -0xaa, -0x9b, -0x8f, -0x0c, -0x32, -0x4b, -0x5f, -0x3e, -0xab, -0x59, -0x98, -0xb3, -0xf5, -0x1d, -0xac, -0x5e, -0xbc, -0x78, -0xd3, -0x01, -0x6c, -0x64, -0x15, -0x2f, -0xd8, -0x71, -0xa6, -0x2d, -0x45, -0xe1, -0x22, -0x42, -0xe4, -0x4e, -0x04, -0x3c, -0x7d, -0xf4, -0x40, -0x21, -0xb4, -0x67, -0x05, -0xa8, -0xe2, -0xf3, -0x72, -0x87, -0x4c, -0x7d, -0xd9, -0x1b, -0x65, -0x97, -0xf3, -0xc2, -0xe3, -0xe4, -0xc8, -0xd2, -0xde, -0xf6, -0xef, -0xdc, -0xbb, -0x44, -0x08, -0x5e, -0xe2, -0x45, -0x27, -0x01, -0xb0, -0xf6, -0x43, -0xe7, -0x3a, -0xf6, -0xdc, -0x9d, -0xed, -0xf3, -0xc5, -0x0c, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x36, -0xee, -0x96, -0x72, -0x67, -0xe7, -0x81, -0x91, -0xd5, -0x05, -0x0a, -0xe0, -0x82, -0xd5, -0x8f, -0xe8, -0xf9, -0xb0, -0xc9, -0xcf, -0x93, -0xe7, -0x04, -0xc5, -0xbc, -0x2b, -0x43, -0x56, -0x7e, -0xe8, -0x67, -0x7c, -0xe5, -0xfb, -0x49, -0xad, -0x5e, -0x9f, -0x25, -0x13, -0xde, -0x6e, -0x6e, -0xe9, -0xf1, -0xec, -0x87, -0x0b, -0x59, -0x81, -0x76, -0x84, -0x76, -0xb3, -0x24, -0xaf, -0x30, -0xfd, -0x27, -0x8b, -0xab, -0xd8, -0x00, -0x8b, -0x9b, -0x0c, -0xd2, -0xb2, -0x4e, -0x5e, -0x9d, -0x1d, -0x96, -0x01, -0x00, -0x67, -0xc1, -0x5f, -0x02, -0x20, -0xfd, -0x45, -0x6a, -0x01, -0x60, -0x58, -0x45, -0xca, -0x47, -0x21, -0x90, -0x5a, -0xc4, -0x43, -0x26, -0x1a, -0xd7, -0xa5, -0x4a, -0xb2, -0x5d, -0x2b, -0x35, -0x49, -0xfb, -0xa5, -0x17, -0x92, -0x21, -0x1e, -0x93, -0x96, -0x67, -0xa2, -0x7e, -0x36, -0x7a, -0xde, -0x5f, -0xbe, -0x7a, -0x58, -0x9d, -0xf8, -0x78, -0xa3, -0xfa, -0xc8, -0xd5, -0x17, -0xf0, -0x21, -0x97, -0x8c, -0x80, -0xb5, -0x4b, -0x3b, -0xbd, -0xbb, -0x41, -0x21, -0xa8, -0x50, -0x67, -0xf7, -0xe7, -0x19, -0x80, -0x10, -0x8e, -0xce, -0x04, -0x18, -0x3f, -0x51, -0x6b, -0x77, -0xd8, -0x9e, -0x16, -0xaf, -0xec, -0xef, -0x48, -0x16, -0x4d, -0x9e, -0x85, -0x38, -0x18, -0x3e, -0xd4, -0x28, -0x87, -0x60, -0x2a, -0xf6, -0x7f, -0x09, -0x86, -0x6f, -0x9c, -0x3c, -0x3a, -0xff, -0xab, -0xd0, -0x61, -0xa2, -0x97, -0x0d, -0x71, -0x94, -0x7e, -0xfd, -0xb9, -0x80, -0x02, -0x89, -0x6a, -0xb3, -0x84, -0x6c, -0x2a, -0x77, -0x62, -0xbe, -0x0b, -0xf4, -0xaf, -0xac, -0x7b, -0x7c, -0x8e, -0xca, -0x01, -0xba, -0x71, -0x78, -0x94, -0xfd, -0xb5, -0x39, -0xa4, -0x4d, -0x2f, -0x78, -0xcf, -0xca, -0x92, -0x0c, -0x1a, -0x99, -0x48, -0x4c, -0x11, -0x96, -0xb5, -0x4e, -0x41, -0x28, -0xe4, -0xa6, -0xfe, -0x4b, -0x72, -0x91, -0xe7, -0xd4, -0xdd, -0x9f, -0x12, -0xe6, -0x29, -0x38, -0xce, -0x45, -0xae, -0x02, -0xb8, -0x24, -0xae, -0xbd, -0xe9, -0x66, -0x08, -0x62, -0xa2, -0x2c, -0x2b, -0x00, -0xe2, -0x23, -0xd9, -0xc4, -0x48, -0xe4, -0xd3, -0xac, -0xbb, -0x34, -0xc7, -0xf0, -0xe3, -0x4f, -0xb9, -0x30, -0xea, -0xa2, -0x12, -0xf1, -0x30, -0x2c, -0x36, -0xde, -0x48, -0xf2, -0xb0, -0x4c, -0x43, -0x3f, -0x2e, -0x58, -0xe4, -0x20, -0xe3, -0x58, -0xcd, -0x31, -0x22, -0xf0, -0xa2, -0x2a, -0xe6, -0x19, -0x90, -0x55, -0x86, -0xf6, -0x55, -0x79, -0xd1, -0xd7, -0x46, -0x2f, -0xc0, -0xdc, -0x99, -0xe8, -0xf3, -0x6a, -0xdf, -0x7f, -0xeb, -0x24, -0x4a, -0x1e, -0x5a, -0x75, -0xde, -0x2f, -0x5c, -0x19, -0x61, -0x03, -0x53, -0x54, -0x6a, -0x3b, -0x18, -0x70, -0xb6, -0x4f, -0xf1, -0x9c, -0x0a, -0x59, -0x9d, -0x19, -0x92, -0x65, -0x8c, -0x83, -0x14, -0x2d, -0x44, -0x8a, -0x75, -0xa9, -0xf5, -0x90, -0xd2, -0x66, -0x4e, -0xfa, -0x69, -0x0f, -0x5b, -0x0b, -0x98, -0x65, -0xc8, -0x11, -0x42, -0x59, -0x7f, -0xdd, -0x1b, -0x75, -0x17, -0x31, -0x4c, -0x75, -0x58, -0xeb, -0x58, -0x63, -0x7d, -0xf2, -0xa6, -0xc2, -0x6e, -0xb7, -0x3f, -0x3e, -0x5e, -0x47, -0xad, -0xb7, -0x04, -0xe8, -0x05, -0xf8, -0xb2, -0xcf, -0x19, -0xf3, -0xd2, -0x85, -0xfe, -0x3e, -0x3e, -0xb1, -0x62, -0x08, -0x2c, -0x10, -0x07, -0x0d, -0x73, -0x90, -0x17, -0xfa, -0x9b, -0x56, -0x02, -0x75, -0xf9, -0x51, -0xe0, -0xe9, -0x1a, -0x7b, -0x9f, -0xb3, -0xf3, -0x98, -0xb8, -0x1c, -0x9c, -0xe1, -0xd5, -0x35, -0xae, -0xc8, -0x60, -0x48, -0x11, -0x09, -0x94, -0x6b, -0xd0, -0x8b, -0x15, -0xbc, -0x05, -0x68, -0xd3, -0x54, -0x8a, -0x51, -0x39, -0x5c, -0x42, -0x76, -0xce, -0xd8, -0xad, -0x89, -0x30, -0xc9, -0x05, -0x1c, -0xcc, -0x94, -0x3f, -0x0f, -0x90, -0x6f, -0x72, -0x2d, -0x85, -0x64, -0x9a, -0xb9, -0x23, -0xf9, -0x0b, -0xc3, -0x7c, -0x39, -0x0f, -0x97, -0x07, -0x97, -0xda, -0x58, -0x48, -0x33, -0x05, -0x23, -0xb8, -0x82, -0xe8, -0xd3, -0x53, -0x89, -0xaf, -0x33, -0x80, -0x22, -0x84, -0x0c, -0x95, -0x5c, -0x67, -0xb8, -0x77, -0x0c, -0x5c, -0xa2, -0x5f, -0x3d, -0x58, -0x0f, -0x27, -0xf3, -0x2f, -0xae, -0x48, -0xbd, -0x0b, -0x6f, -0x54, -0xfb, -0x67, -0x4c, -0xea, -0x32, -0x27, -0xf1, -0xfa, -0xe2, -0xb0, -0xec, -0x0b, -0x15, -0xb4, -0x70, -0xf6, -0x5c, -0xdd, -0x71, -0x60, -0xc3, -0xc1, -0xa8, -0x32, -0x65, -0xac, -0x7a, -0x77, -0x41, -0xe5, -0xa9, -0x6b, -0x11, -0x81, -0xfa, -0x34, -0x8d, -0xfb, -0xc1, -0x80, -0x6e, -0xc4, -0x60, -0x30, -0x07, -0xd4, -0x8b, -0x67, -0xbd, -0xaa, -0x8c, -0x9c, -0x64, -0xac, -0xdb, -0x0b, -0x24, -0x8b, -0x63, -0x6f, -0xe6, -0xbc, -0xe7, -0x33, -0xa4, -0x4a, -0x4c, -0xa7, -0x9f, -0x43, -0x53, -0xd2, -0xbb, -0x8f, -0x43, -0xc7, -0x3d, -0x78, -0x68, -0x3f, -0xa5, -0x3d, -0xca, -0x69, -0x84, -0xa6, -0x97, -0x2d, -0xc0, -0x7d, -0x31, -0x34, -0x55, -0x1d, -0x07, -0xb1, -0x5f, -0x40, -0x5c, -0x93, -0xb0, -0xbc, -0x7c, -0xb0, -0xbc, -0xe7, -0x12, -0xee, -0x6b, -0x2b, -0xd3, -0x4d, -0x67, -0x70, -0x3a, -0x9a, -0xf2, -0x3c, -0x7c, -0x81, -0xfa, -0xd7, -0xd9, -0x90, -0x91, -0x81, -0xb8, -0xb1, -0xf3, -0x48, -0x6a, -0x26, -0x4f, -0x0c, -0xce, -0xb0, -0x9e, -0xfd, -0x4a, -0x3a, -0xaf, -0xac, -0x5b, -0x3f, -0xbf, -0x44, -0x5a, -0xa3, -0x19, -0x1e, -0x4b, -0xe7, -0x36, -0x6a, -0xd7, -0x20, -0xae, -0xd7, -0x7d, -0x3b, -0xe7, -0xff, -0x3a, -0x86, -0x2e, -0xd0, -0x4a, -0x3e, -0xaf, -0x9f, -0x8e, -0x01, -0xbf, -0xf8, -0x4f, -0xc1, -0xe8, -0x6f, -0x74, -0xe1, -0x45, -0xd3, -0xf7, -0x04, -0x6a, -0x4b, -0x9d, -0xec, -0x33, -0x27, -0x76, -0xd7, -0xc5, -0xe1, -0xb0, -0x3b, -0x0e, -0x23, -0xec, -0xf0, -0x86, -0xd2, -0x1a, -0xbf, -0x3d, -0x04, -0x62, -0xb3, -0x6c, -0xb2, -0xeb, -0x17, -0x05, -0xa6, -0x0a, -0x8a, -0x7e, -0x83, -0x1c, -0xb6, -0x37, -0x09, -0xc6, -0x0b, -0x70, -0x3c, -0xb5, -0x93, -0x81, -0xd8, -0x93, -0xa0, -0x5f, -0x1e, -0x08, -0xe2, -0xc6, -0xe5, -0xc9, -0x72, -0xf1, -0xf1, -0xc1, -0xed, -0xd5, -0x58, -0x93, -0x83, -0xf8, -0x65, -0x67, -0x2e, -0x0d, -0xa9, -0xf1, -0x64, -0x12, -0xe6, -0x4c, -0xea, -0x15, -0x3f, -0x8c, -0x1a, -0xb6, -0xbf, -0xf6, -0xb9, -0x52, -0x35, -0x09, -0xb0, -0xe6, -0xf7, -0xcd, -0xf1, -0xa5, -0xaa, -0x81, -0xd1, -0x81, -0x6f, -0xb4, -0xa9, -0x66, -0x1f, -0xfc, -0x48, -0xc0, -0xb6, -0xd1, -0x8b, -0x06, -0x2f, -0xf6, -0xef, -0x1f, -0x0a, -0xe6, -0xce, -0x3a, -0x4a, -0x55, -0xbf, -0x6d, -0xf9, -0x4d, -0xd4, -0x08, -0x45, -0x4b, -0xc3, -0x66, -0x19, -0x92, -0x10, -0xe1, -0x17, -0x8e, -0x28, -0x91, -0x16, -0xbf, -0x3c, -0xee, -0xa3, -0xa6, -0x99, -0x92, -0x10, -0xe1, -0xf6, -0xcc, -0xac, -0xb8, -0x65, -0x0b, -0x43, -0x66, -0xf8, -0xe3, -0xe5, -0x3f, -0x24, -0x89, -0x47, -0x5d, -0x78, -0x43, -0xd0, -0x61, -0x17, -0xbd, -0x5b, -0x64, -0x54, -0x08, -0x45, -0x59, -0x93, -0xf6, -0x95, -0x8a, -0x41, -0x51, -0x62, -0x4b, -0x51, -0x02, -0x30, -0x73, -0xc7, -0x87, -0xc5, -0x4b, -0xa2, -0x97, -0x0f, -0xe8, -0x46, -0x5f, -0x7e, -0x2a, -0xe1, -0x30, -0x20, -0xb0, -0xfa, -0xe7, -0xce, -0x61, -0x42, -0x57, -0x6e, -0x21, -0xf3, -0x7a, -0xec, -0xe3, -0x25, -0xc7, -0x25, -0xf3, -0x67, -0xa7, -0x57, -0x40, -0x00, -0x02, -0xcf, -0x1c, -0x80, -0x77, -0x67, -0xbd, -0x70, -0xa1, -0x19, -0x92, -0x31, -0x75, -0x93, -0x27, -0x27, -0xb6, -0x82, -0xe4, -0xeb, -0x1d, -0x78, -0x48, -0xe7, -0xa5, -0x5e, -0x57, -0xef, -0x64, -0x28, -0x64, -0x1b, -0xf6, -0x11, -0xb2, -0x03, -0x9d, -0xb9, -0x18, -0x02, -0x27, -0xf7, -0xbe, -0x9d, -0x55, -0xfc, -0x00, -0xd2, -0xc7, -0xae, -0xad, -0x0b, -0xc5, -0xe9, -0x42, -0x41, -0x48, -0xd8, -0x32, -0xcf, -0xf6, -0x0f, -0xf5, -0xbc, -0x97, -0xc6, -0x99, -0x47, -0x76, -0xbd, -0x89, -0x06, -0x0f, -0x63, -0x0c, -0x51, -0xd4, -0x5e, -0xea, -0x48, -0xa8, -0xa2, -0x56, -0x1c, -0x79, -0x84, -0x86, -0x40, -0x88, -0x41, -0x76, -0x55, -0xfc, -0xc2, -0xd7, -0xfd, -0xc9, -0xc7, -0x80, -0x61, -0x35, -0xa7, -0x43, -0x20, -0xf7, -0xeb, -0x6c, -0x66, -0x13, -0xb0, -0xec, -0x02, -0x75, -0x3e, -0x4b, -0xaf, -0xb9, -0x5d, -0x40, -0xda, -0xd6, -0x6e, -0x2d, -0x39, -0x54, -0xc2, -0x95, -0x35, -0x54, -0x25, -0x72, -0xe1, -0x78, -0xb8, -0xeb, -0xc1, -0x16, -0x58, -0x0f, -0x9c, -0x9b, -0xb4, -0xea, -0x37, -0xec, -0x3b, -0x11, -0xba, -0xd5, -0x8a, -0xa9, -0xe3, -0x98, -0x00, -0x51, -0x1c, -0x14, -0xe0, -0x40, -0x96, -0xe5, -0xe9, -0xf2, -0x21, -0x22, -0xb1, -0x23, -0x60, -0x78, -0xd3, -0x17, -0xf8, -0x7a, -0xa5, -0xa8, -0xba, -0x20, -0xd3, -0x15, -0x1e, -0x32, -0xe4, -0x5e, -0x15, -0x48, -0xae, -0xa9, -0xe5, -0xb8, -0x33, -0xec, -0xe8, -0xa2, -0x42, -0xac, -0xbf, -0x10, -0x84, -0x53, -0x87, -0x19, -0xb4, -0x5f, -0x76, -0x4d, -0x01, -0x9d, -0x56, -0x74, -0xd9, -0x5c, -0x97, -0xe7, -0x88, -0xea, -0x3a, -0xbf, -0xdc, -0x4c, -0x33, -0x8a, -0x16, -0xb9, -0x5b, -0xfa, -0xd8, -0x42, -0xa7, -0xbb, -0x3c, -0x04, -0x27, -0x78, -0x49, -0x81, -0x2a, -0x5a, -0x7d, -0x7c, -0x23, -0xa8, -0xba, -0xf7, -0x9a, -0x9f, -0xd2, -0x66, -0x3e, -0x38, -0x3c, -0x75, -0xf9, -0xd1, -0x30, -0x26, -0x30, -0x6e, -0x5a, -0x6e, -0xdc, -0x6a, -0x69, -0x32, -0x50, -0x33, -0x47, -0x9e, -0xa4, -0xa8, -0x64, -0x66, -0xf0, -0x8a, -0xe4, -0xfd, -0x27, -0x6f, -0x51, -0x25, -0x8b, -0x43, -0x74, -0xc9, -0x8e, -0xbd, -0x88, -0x31, -0xbe, -0xec, -0x65, -0xd2, -0xcb, -0x8d, -0x5a, -0x13, -0x48, -0x16, -0x8c, -0x61, -0x0b, -0x11, -0xf6, -0xc6, -0x66, -0xae, -0xc3, -0xcc, -0x0c, -0xd2, -0xe1, -0x9f, -0x82, -0x41, -0x3f, -0x56, -0xf9, -0x73, -0xef, -0xdc, -0x30, -0x50, -0xcf, -0xb6, -0x7f, -0xbc, -0xd0, -0xb3, -0x10, -0xab, -0x24, -0xe4, -0xec, -0xad, -0x18, -0x8c, -0x39, -0x2d, -0x30, -0x4c, -0xc5, -0x40, -0x0d, -0xf6, -0xac, -0xd6, -0x18, -0x5d, -0x96, -0xbf, -0x5f, -0x71, -0x75, -0x96, -0x22, -0x97, -0x0f, -0x02, -0x94, -0x6e, -0xa6, -0xae, -0x6d, -0x8f, -0x1e, -0xca, -0x12, -0x9b, -0x2a, -0x1c, -0xce, -0xa9, -0xee, -0xfd, -0x12, -0x8e, -0xfc, -0xed, -0x09, -0x33, -0xba, -0xf4, -0x1a, -0x15, -0xf6, -0x9d, -0x87, -0x16, -0x43, -0x7c, -0x78, -0x57, -0xe1, -0x44, -0xc9, -0xeb, -0x1f, -0x58, -0x4d, -0xc1, -0x49, -0x11, -0x5c, -0xb2, -0x11, -0xa8, -0x55, -0x16, -0xf1, -0xc6, -0x50, -0xe9, -0x87, -0x89, -0xf6, -0xcf, -0xd8, -0x9c, -0x51, -0xa7, -0xbc, -0x5b, -0x31, -0x6d, -0x4d, -0x51, -0xd0, -0x4c, -0xbc, -0x0d, -0x58, -0x2d, -0x7b, -0x88, -0x7a, -0xf9, -0x8e, -0xd6, -0x40, -0x4d, -0xbb, -0xbe, -0xc4, -0xe5, -0x07, -0xfc, -0xd9, -0x7b, -0x6d, -0xa6, -0x42, -0x57, -0x8f, -0x02, -0x94, -0x4f, -0xe4, -0x2a, -0x65, -0xe2, -0x19, -0x5a, -0x50, -0xe1, -0x25, -0x65, -0x4a, -0x60, -0xc2, -0xcd, -0xa8, -0xec, -0x05, -0x2e, -0x87, -0x7b, -0x95, -0xb7, -0x4f, -0xa0, -0x0b, -0x1b, -0x4a, -0x7f, -0x92, -0xc8, -0x90, -0xee, -0x89, -0x1e, -0x10, -0xd2, -0x85, -0xe4, -0x9f, -0x63, -0xc8, -0x12, -0xbb, -0x4e, -0xb8, -0xcf, -0x0a, -0xec, -0x18, -0x4e, -0xe6, -0x7c, -0xb3, -0x33, -0x26, -0xc7, -0x1f, -0xd2, -0x04, -0x23, -0xea, -0x07, -0x0c, -0x5f, -0x90, -0xbd, -0xa7, -0x6a, -0x0f, -0x4a, -0xd6, -0x10, -0x01, -0x3c, -0x12, -0x29, -0x2e, -0x96, -0xc0, -0x4d, -0xbb, -0xbe, -0xe5, -0xa7, -0x83, -0xd5, -0x6a, -0x3c, -0xe3, -0x5b, -0xb8, -0xf2, -0x5c, -0x6d, -0x1f, -0xa6, -0xf3, -0x12, -0x24, -0xf6, -0xd6, -0x3b, -0x10, -0x14, -0x09, -0x07, -0x82, -0xe8, -0x30, -0x6a, -0x99, -0xdc, -0x95, -0x01, -0x9c, -0xd4, -0x68, -0x3b, -0xca, -0x98, -0x12, -0xab, -0x77, -0x25, -0x15, -0x7d, -0x10, -0x32, -0x45, -0x98, -0xcd, -0x7a, -0xdf, -0x71, -0x8a, -0x75, -0xc1, -0x1c, -0xd4, -0x68, -0x25, -0xeb, -0xbb, -0x54, -0x27, -0x6f, -0x2a, -0xf7, -0xb9, -0x98, -0x03, -0x27, -0xde, -0x24, -0xa8, -0xbb, -0x98, -0xc2, -0x84, -0xff, -0x9b, -0x51, -0xd8, -0x53, -0x50, -0xda, -0xf5, -0x88, -0xaa, -0x87, -0x2f, -0xae, -0xd6, -0xea, -0x6b, -0xde, -0xc8, -0xd7, -0xa7, -0x28, -0x65, -0x81, -0xe8, -0xb2, -0x3b, -0x1d, -0x4f, -0x75, -0x8f, -0x9f, -0x7a, -0x74, -0x8e, -0xc1, -0x5f, -0x9a, -0xa8, -0x9d, -0xfa, -0x03, -0xa3, -0x71, -0x9b, -0x37, -0x6d, -0xd5, -0x0b, -0xf5, -0xe1, -0xa1, -0x1b, -0x01, -0x6a, -0xc6, -0x67, -0xaa, -0xea, -0x2c, -0x9d, -0xa4, -0xd2, -0x6e, -0xfc, -0xde, -0x2e, -0x7f, -0x94, -0x69, -0xe5, -0x4a, -0xe0, -0x01, -0x48, -0x3c, -0x6b, -0xf7, -0x1e, -0xb6, -0x0b, -0x5f, -0xf9, -0x2e, -0x07, -0xc5, -0xe8, -0xae, -0x37, -0x1b, -0xbc, -0x3c, -0xd8, -0xd5, -0x0b, -0x91, -0x9e, -0x80, -0x24, -0xf5, -0x06, -0x0c, -0x0e, -0x98, -0x07, -0x96, -0x2d, -0x19, -0xdc, -0x58, -0x93, -0xcc, -0xfb, -0x4e, -0xeb, -0xbd, -0x0f, -0xf5, -0xaf, -0x01, -0xfa, -0xf1, -0x7c, -0x43, -0x8c, -0xb8, -0x56, -0x3e, -0xbe, -0x77, -0x4e, -0x2b, -0xf7, -0xbb, -0xb7, -0x45, -0x47, -0xcd, -0xcc, -0xa6, -0x4c, -0x72, -0x7b, -0x6a, -0x2a, -0x70, -0x13, -0x07, -0xfd, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x23, -0x67, -0x5b, -0x34, -0xd5, -0x14, -0x0c, -0xab, -0x77, -0x1f, -0xf8, -0x3d, -0x5a, -0x9f, -0x92, -0xb7, -0x2c, -0xad, -0x31, -0xde, -0x61, -0x07, -0xb3, -0x6b, -0xf7, -0x38, -0x15, -0x95, -0x46, -0x14, -0x48, -0x53, -0x69, -0x52, -0x66, -0x07, -0x6d, -0x83, -0x71, -0x8a, -0x67, -0x25, -0x20, -0x0f, -0xfe, -0xd7, -0x02, -0xd7, -0x6e, -0x2c, -0xd2, -0x1a, -0x0a, -0x5d, -0xfd, -0x0f, -0x74, -0xe3, -0xa4, -0x36, -0x07, -0x9a, -0xdf, -0xd4, -0x79, -0xbf, -0xef, -0x59, -0xc0, -0x44, -0x52, -0x87, -0x9a, -0x6e, -0x1d, -0x0e, -0xee, -0xde, -0x2e, -0x1a, -0xa9, -0x8f, -0x3a, -0xc9, -0xba, -0xec, -0x99, -0x78, -0x2d, -0x55, -0x6b, -0x14, -0xc2, -0x06, -0xd5, -0xfc, -0x93, -0x53, -0x4d, -0x11, -0x8c, -0xf8, -0xfa, -0x79, -0x7c, -0xa6, -0x64, -0xae, -0x61, -0xb8, -0x7b, -0x94, -0x56, -0xa6, -0x39, -0x78, -0x9a, -0xe5, -0xc7, -0xdf, -0x18, -0x63, -0x23, -0x9c, -0xfa, -0x66, -0xbb, -0xb7, -0x5a, -0x27, -0x4c, -0xd1, -0xa1, -0x83, -0x22, -0xb3, -0x52, -0x49, -0x35, -0xb0, -0x22, -0x83, -0x59, -0x12, -0x00, -0x16, -0x98, -0xdd, -0xad, -0xc2, -0x94, -0xf9, -0xd3, -0x7b, -0x64, -0x7f, -0x44, -0x3e, -0x3c, -0x8b, -0x9a, -0x83, -0x9c, -0x69, -0x6b, -0xe4, -0xdf, -0x9f, -0xed, -0x54, -0x1f, -0xe5, -0x5d, -0x7a, -0x05, -0x82, -0xb3, -0xdd, -0xef, -0xfc, -0x53, -0x96, -0xb0, -0x2c, -0x5a, -0xf8, -0xdf, -0x9c, -0x8b, -0x16, -0x4e, -0xdf, -0xda, -0x4d, -0x09, -0x09, -0x69, -0x50, -0x03, -0x65, -0xd8, -0x73, -0x70, -0xe8, -0x86, -0xbf, -0xbb, -0x35, -0xce, -0xb2, -0x46, -0xcb, -0x02, -0x00, -0x5b, -0xb4, -0xe2, -0xc6, -0x8f, -0x2f, -0x98, -0xaf, -0x87, -0x4b, -0x48, -0x45, -0xed, -0xcc, -0x1d, -0xe6, -0x58, -0xd6, -0xf2, -0x50, -0x25, -0x9f, -0x52, -0xc7, -0xcb, -0x8a, -0x17, -0x9d, -0x5b, -0xe5, -0xc8, -0xd7, -0x72, -0xb7, -0x52, -0xb2, -0xc4, -0x98, -0xe3, -0x7a, -0x17, -0x3e, -0xc6, -0x60, -0xa7, -0x97, -0xb0, -0xcf, -0x18, -0x81, -0x53, -0x84, -0x4c, -0xd5, -0x17, -0x32, -0x03, -0x13, -0x39, -0x51, -0x09, -0x10, -0xe3, -0x77, -0x49, -0x4f, -0x62, -0x01, -0xbf, -0x8c, -0x9a, -0xe0, -0x41, -0x9e, -0x89, -0x74, -0x36, -0xf9, -0x96, -0x86, -0x2e, -0x96, -0x1c, -0x4a, -0xb7, -0x2b, -0x4a, -0x97, -0xbc, -0x99, -0x40, -0xa3, -0xe0, -0x3d, -0xc8, -0xad, -0x2f, -0xdf, -0x4f, -0x2c, -0xc4, -0x69, -0x82, -0x9f, -0x9b, -0x81, -0x0c, -0x61, -0x5c, -0xa5, -0x9d, -0x8c, -0x89, -0xc0, -0x2c, -0xb4, -0x4a, -0x33, -0x4e, -0xeb, -0xa2, -0x56, -0x40, -0xc0, -0xc2, -0x46, -0xaf, -0x6a, -0xfc, -0x67, -0xd1, -0x80, -0x5e, -0xc5, -0x6d, -0x84, -0x43, -0x27, -0x3f, -0x55, -0x15, -0x96, -0x6a, -0xa0, -0xa5, -0xda, -0xb7, -0xff, -0xb7, -0x75, -0x6e, -0x4c, -0x49, -0x91, -0x9d, -0x22, -0xa3, -0x46, -0xea, -0xed, -0x9a, -0x00, -0xe2, -0x32, -0xc3, -0xd6, -0xa9, -0x71, -0x20, -0x55, -0xa3, -0x19, -0xed, -0xf8, -0x4f, -0xa7, -0x12, -0x9c, -0x66, -0x87, -0xaf, -0x4e, -0xb7, -0xf0, -0xdb, -0xbf, -0xef, -0xf0, -0xf6, -0xaf, -0xea, -0xda, -0x09, -0xfe, -0xde, -0x38, -0x5c, -0xa5, -0xa2, -0xdf, -0x99, -0x45, -0xa8, -0xe4, -0xe7, -0x92, -0xac, -0x67, -0xaa, -0x4f, -0xbf, -0x77, -0x3e, -0xa2, -0x40, -0x49, -0x22, -0x4a, -0x1e, -0x3b, -0xaa, -0x70, -0x7f, -0x95, -0xaf, -0x37, -0x4b, -0xfc, -0x99, -0xe2, -0xe0, -0xba, -0xd7, -0x34, -0xce, -0x55, -0x88, -0x5b, -0x84, -0x1b, -0x57, -0xc4, -0x80, -0x03, -0x53, -0xc9, -0x2f, -0x93, -0x04, -0x4d, -0xd5, -0x96, -0xe5, -0x70, -0xa6, -0x6e, -0x63, -0x5d, -0x9d, -0x6c, -0xdb, -0x02, -0x0a, -0xa9, -0xda, -0x8b, -0x53, -0xdc, -0xd9, -0x9a, -0xc5, -0x94, -0x2c, -0x91, -0x92, -0x2a, -0xde, -0xbb, -0x8b, -0x13, -0xb9, -0x19, -0x96, -0x64, -0xcc, -0xf2, -0x64, -0x39, -0xb7, -0x75, -0x49, -0xe9, -0x86, -0xc2, -0x86, -0x62, -0xd9, -0x24, -0xd3, -0x81, -0x35, -0x49, -0xfc, -0xa0, -0xa5, -0xa0, -0x93, -0x05, -0x64, -0xb4, -0x1a, -0x57, -0xce, -0x0c, -0x90, -0x02, -0x27, -0xc5, -0x7a, -0x2b, -0x5d, -0xae, -0x3e, -0xd5, -0xdd, -0x10, -0x7c, -0x14, -0xea, -0x3a, -0x08, -0xac, -0x72, -0x4e, -0x90, -0x3d, -0x3b, -0x7c, -0x86, -0x2e, -0xeb, -0xd4, -0x06, -0x70, -0xe6, -0xc7, -0xfb, -0x5f, -0xbd, -0x18, -0xf4, -0x11, -0xa4, -0x1a, -0x93, -0xc3, -0xbe, -0xd9, -0xfb, -0x26, -0x48, -0x2f, -0x37, -0x3c, -0xd0, -0x03, -0x47, -0x1a, -0xf7, -0x62, -0x19, -0x24, -0x5c, -0xf4, -0xa8, -0x92, -0x20, -0x7a, -0xf2, -0x9e, -0x2a, -0xc5, -0x95, -0xa2, -0xfb, -0xa4, -0xea, -0x85, -0xd8, -0x56, -0xb7, -0x70, -0xd1, -0x60, -0x30, -0xa5, -0x30, -0x82, -0x70, -0xdc, -0x7a, -0x65, -0x8a, -0x36, -0x3f, -0x5b, -0x0c, -0xae, -0x54, -0x7c, -0xd3, -0x57, -0x84, -0x7b, -0x3a, -0x65, -0x18, -0x81, -0xee, -0x05, -0x9b, -0x44, -0x4d, -0xb8, -0xda, -0xa2, -0xa1, -0xc9, -0x15, -0xd3, -0x73, -0x03, -0x0e, -0x43, -0xe9, -0x8e, -0x15, -0xf9, -0xbe, -0xc6, -0xc5, -0x8a, -0xe5, -0xc0, -0x1e, -0xc2, -0x37, -0x9e, -0x2a, -0x26, -0xa5, -0xa0, -0xbd, -0x24, -0x5f, -0xb9, -0xc1, -0xab, -0x34, -0x48, -0xb9, -0x5d, -0x98, -0xb4, -0x65, -0x18, -0xf3, -0x63, -0x19, -0x44, -0x1b, -0x11, -0x16, -0xff, -0xdc, -0xf1, -0x79, -0x08, -0x86, -0x0f, -0x52, -0x98, -0x73, -0xc4, -0x92, -0x90, -0x2b, -0x47, -0x09, -0xd0, -0x43, -0x6c, -0x2f, -0x20, -0xeb, -0xdc, -0xda, -0xc5, -0x08, -0x7b, -0x94, -0x42, -0x30, -0x6a, -0xc7, -0xda, -0x8c, -0xc3, -0x76, -0xa7, -0xa5, -0xcc, -0x62, -0x13, -0x00, -0x60, -0x31, -0x58, -0x44, -0x9b, -0xf5, -0x64, -0x14, -0xf5, -0x11, -0xc5, -0x54, -0x52, -0x83, -0xd4, -0x73, -0x01, -0x16, -0x0e, -0xb3, -0x7a, -0x29, -0x69, -0x35, -0x56, -0xd4, -0xee, -0x8a, -0x17, -0xa2, -0x99, -0x24, -0x9c, -0xd7, -0x8f, -0xdb, -0x55, -0xb5, -0x3e -}; diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/config.h b/keyboards/htx_studio/one_handed_keyboard_sl/config.h index 822ccdf4461..c264940916a 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/config.h +++ b/keyboards/htx_studio/one_handed_keyboard_sl/config.h @@ -24,6 +24,7 @@ #define POINTING_DEVICE_CS_PIN A4 #define POINTING_DEVICE_MOTION_PIN A3 #define POINTING_DEVICE_TASK_THROTTLE_MS 1 +#define POINTING_DEVICE_INVERT_X 1 #define ENCODER_RESOLUTION 2 diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json index 3da67c86693..e26444299c3 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json @@ -35,70 +35,70 @@ "layouts": { "LAYOUT": { "layout": [ - {"matrix": [0, 0], "x": 0, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 1], "x": 1, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 2], "x": 2, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 3], "x": 3, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 4], "x": 4, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 5], "x": 5, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 6], "x": 6, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 7], "x": 7, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 8], "x": 8, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 9], "x": 9, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 10], "x": 10, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 11], "x": 11, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 12], "x": 12, "y": 0, "w": 1, "h": 1}, - {"matrix": [0, 13], "x": 13, "y": 0, "w": 1, "h": 1}, - {"matrix": [1, 0], "x": 0, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 1], "x": 1, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 2], "x": 2, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 3], "x": 3, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 4], "x": 4, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 5], "x": 5, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 6], "x": 6, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 7], "x": 7, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 8], "x": 8, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 9], "x": 9, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 10], "x": 10, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 11], "x": 11, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 12], "x": 12, "y": 1, "w": 1, "h": 1}, - {"matrix": [1, 13], "x": 13, "y": 1, "w": 1, "h": 1}, - {"matrix": [2, 0], "x": 0.5, "y": 2, "w": 1.5, "h": 1}, - {"matrix": [2, 2], "x": 2, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 3], "x": 3, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 4], "x": 4, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 5], "x": 5, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 6], "x": 6, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 7], "x": 7, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 8], "x": 8, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 9], "x": 9, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 10], "x": 10, "y": 2, "w": 1, "h": 1}, - {"matrix": [2, 12], "x": 11, "y": 2, "w": 1.5, "h": 1}, - {"matrix": [2, 13], "x": 12.5, "y": 2, "w": 1, "h": 1}, - {"matrix": [3, 0], "x": 1, "y": 3, "w": 2, "h": 1}, - {"matrix": [3, 3], "x": 3, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 4], "x": 4, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 5], "x": 5, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 6], "x": 6, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 7], "x": 7, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 8], "x": 8, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 9], "x": 9, "y": 3, "w": 1, "h": 1}, - {"matrix": [3, 10], "x": 10, "y": 3, "w": 2, "h": 1}, - {"matrix": [3, 13], "x": 12, "y": 3, "w": 2, "h": 1}, - {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 5], "x": 5, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 7], "x": 7.5, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 9], "x": 8.75, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [4, 12], "x": 10.75, "y": 4, "w": 2, "h": 1}, - {"matrix": [4, 13], "x": 12, "y": 4, "w": 1.25, "h": 1}, - {"matrix": [5, 0], "x": 0, "y": 5, "w": 1, "h": 1}, - {"matrix": [5, 3], "x": 3, "y": 5, "w": 1, "h": 1}, - {"matrix": [5, 4], "x": 4, "y": 5, "w": 1, "h": 1}, - {"matrix": [5, 5], "x": 5, "y": 5, "w": 1, "h": 1}, - {"matrix": [5, 6], "x": 6, "y": 5, "w": 1, "h": 1} + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + {"matrix": [2, 0], "x": 0.5, "y": 2, "w": 1.5}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 12], "x": 11, "y": 2, "w": 1.5}, + {"matrix": [2, 13], "x": 12.5, "y": 2}, + {"matrix": [3, 0], "x": 1, "y": 3, "w": 2}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3, "w": 2}, + {"matrix": [3, 13], "x": 12, "y": 3, "w": 2}, + {"matrix": [4, 0], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [4, 4], "x": 3.75, "y": 4, "w": 1.25}, + {"matrix": [4, 5], "x": 5, "y": 4, "w": 1.25}, + {"matrix": [4, 6], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [4, 7], "x": 7.5, "y": 4, "w": 1.25}, + {"matrix": [4, 9], "x": 8.75, "y": 4, "w": 1.25}, + {"matrix": [4, 12], "x": 10.75, "y": 4, "w": 2}, + {"matrix": [4, 13], "x": 12, "y": 4, "w": 1.25}, + {"matrix": [5, 0], "x": 0, "y": 5}, + {"matrix": [5, 3], "x": 3, "y": 5}, + {"matrix": [5, 4], "x": 4, "y": 5}, + {"matrix": [5, 5], "x": 5, "y": 5}, + {"matrix": [5, 6], "x": 6, "y": 5} ] } } diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c index 0986deba026..4628a681f62 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c @@ -16,6 +16,21 @@ #include QMK_KEYBOARD_H +#define TRACKBALL_DPI_MIN 1000 +#define TRACKBALL_DPI_MAX 8000 +#define TRACKBALL_DPI_DEFAULT 3000 +#define TRACKBALL_DPI_STEP 1000 + +enum my_keycodes { + DPI_UP = SAFE_RANGE, + DPI_DOWN +}; + +typedef union { + uint16_t TrackballDPI; +} user_config_t; +user_config_t user_config; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -56,3 +71,50 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = {ENCODER_CCW_CW(MS_WHLU, MS_WHLD)} }; #endif + +void pointing_device_init_kb(void) { + wait_ms(10); + user_config.TrackballDPI = eeconfig_read_user(); + wait_ms(10); + adns9800_init(); + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +// ADNS9800. The CPI range is 800-8200, in increments of 200. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DPI_UP: { + if (record->event.pressed) { + user_config.TrackballDPI += TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { + user_config.TrackballDPI = TRACKBALL_DPI_MAX; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + case DPI_DOWN: { + if (record->event.pressed) { + user_config.TrackballDPI -= TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { + user_config.TrackballDPI = TRACKBALL_DPI_MIN; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); + return false; + } + } + default: + return true; + + } +} + +void eeconfig_init_user(void) { + user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); + eeconfig_update_user(user_config.TrackballDPI); +} diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk index 94839da6607..0309523fc35 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk +++ b/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk @@ -1,4 +1,5 @@ -POINTING_DEVICE_DRIVER = custom -SRC += adns.c SPI_DRIVER_REQUIRED = yes ENCODER_MAP_ENABLE = yes + +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = adns9800 diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/rules.mk b/keyboards/htx_studio/rules.mk similarity index 94% rename from keyboards/htx_studio/one_handed_keyboard_ml/rules.mk rename to keyboards/htx_studio/rules.mk index 16d33cd89fe..1e5b99807cb 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/rules.mk +++ b/keyboards/htx_studio/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes - From e6ea61000bad36b07d77816d6d63515b1925d631 Mon Sep 17 00:00:00 2001 From: htx_studio Date: Tue, 6 May 2025 20:35:16 +0800 Subject: [PATCH 5/7] fix rules --- keyboards/htx_studio/rules.mk | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/htx_studio/rules.mk diff --git a/keyboards/htx_studio/rules.mk b/keyboards/htx_studio/rules.mk deleted file mode 100644 index 1e5b99807cb..00000000000 --- a/keyboards/htx_studio/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes From 71d6c9eafd454b38ed28a4f77f3d162019a84bbd Mon Sep 17 00:00:00 2001 From: htx_studio Date: Tue, 13 May 2025 17:54:19 +0800 Subject: [PATCH 6/7] one_handed_keyboard --- keyboards/htx_studio/.vscode/settings.json | 5 ++ .../config.h | 2 - .../halconf.h | 0 .../htx_studio/one_handed_keyboard/info.json | 25 ++++++++ .../mcuconf.h | 0 .../ml}/keyboard.json | 25 -------- .../ml}/keymaps/default/keymap.c | 58 +++--------------- .../ml}/keymaps/default/rules.mk | 0 .../halconf.h => one_handed_keyboard/ml/ml.c} | 20 +++--- .../ml}/readme.md | 4 +- .../mr}/keyboard.json | 25 -------- .../mr}/keymaps/default/keymap.c | 58 +++--------------- .../mr}/keymaps/default/rules.mk | 0 .../htx_studio/one_handed_keyboard/mr/mr.c | 27 ++++++++ .../mr}/readme.md | 4 +- .../one_handed_keyboard/one_handed_keyboard.c | 61 +++++++++++++++++++ .../one_handed_keyboard.h} | 20 +++--- .../sl}/keyboard.json | 27 -------- .../sl}/keymaps/default/keymap.c | 48 +++------------ .../sl}/keymaps/default/rules.mk | 0 .../sl}/readme.md | 4 +- .../one_handed_keyboard_mr/config.h | 42 ------------- .../one_handed_keyboard_mr/mcuconf.h | 27 -------- .../one_handed_keyboard_sl/halconf.h | 24 -------- .../one_handed_keyboard_sl/mcuconf.h | 23 ------- 25 files changed, 169 insertions(+), 360 deletions(-) create mode 100644 keyboards/htx_studio/.vscode/settings.json rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard}/config.h (97%) rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard}/halconf.h (100%) create mode 100644 keyboards/htx_studio/one_handed_keyboard/info.json rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard}/mcuconf.h (100%) rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard/ml}/keyboard.json (92%) rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard/ml}/keymaps/default/keymap.c (85%) rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard/ml}/keymaps/default/rules.mk (100%) rename keyboards/htx_studio/{one_handed_keyboard_mr/halconf.h => one_handed_keyboard/ml/ml.c} (61%) rename keyboards/htx_studio/{one_handed_keyboard_ml => one_handed_keyboard/ml}/readme.md (91%) rename keyboards/htx_studio/{one_handed_keyboard_mr => one_handed_keyboard/mr}/keyboard.json (92%) rename keyboards/htx_studio/{one_handed_keyboard_mr => one_handed_keyboard/mr}/keymaps/default/keymap.c (85%) rename keyboards/htx_studio/{one_handed_keyboard_mr => one_handed_keyboard/mr}/keymaps/default/rules.mk (100%) create mode 100644 keyboards/htx_studio/one_handed_keyboard/mr/mr.c rename keyboards/htx_studio/{one_handed_keyboard_mr => one_handed_keyboard/mr}/readme.md (91%) create mode 100644 keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.c rename keyboards/htx_studio/{one_handed_keyboard_sl/config.h => one_handed_keyboard/one_handed_keyboard.h} (71%) rename keyboards/htx_studio/{one_handed_keyboard_sl => one_handed_keyboard/sl}/keyboard.json (83%) rename keyboards/htx_studio/{one_handed_keyboard_sl => one_handed_keyboard/sl}/keymaps/default/keymap.c (81%) rename keyboards/htx_studio/{one_handed_keyboard_sl => one_handed_keyboard/sl}/keymaps/default/rules.mk (100%) rename keyboards/htx_studio/{one_handed_keyboard_sl => one_handed_keyboard/sl}/readme.md (91%) delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/config.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/halconf.h delete mode 100644 keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h diff --git a/keyboards/htx_studio/.vscode/settings.json b/keyboards/htx_studio/.vscode/settings.json new file mode 100644 index 00000000000..aad33c3e489 --- /dev/null +++ b/keyboards/htx_studio/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "one_handed_keyboard.h": "c" + } +} \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/config.h b/keyboards/htx_studio/one_handed_keyboard/config.h similarity index 97% rename from keyboards/htx_studio/one_handed_keyboard_ml/config.h rename to keyboards/htx_studio/one_handed_keyboard/config.h index 32de009d5c3..3aae0ddf059 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/config.h +++ b/keyboards/htx_studio/one_handed_keyboard/config.h @@ -30,7 +30,6 @@ #ifdef RGB_MATRIX_ENABLE -#define WS2812_BITBANG_NOP_FUDGE 0 #define WS2812_PWM_DRIVER PWMD3 #define WS2812_PWM_CHANNEL 1 #define WS2812_DMA_STREAM STM32_DMA1_STREAM1 @@ -38,4 +37,3 @@ #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP #endif - diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/halconf.h b/keyboards/htx_studio/one_handed_keyboard/halconf.h similarity index 100% rename from keyboards/htx_studio/one_handed_keyboard_ml/halconf.h rename to keyboards/htx_studio/one_handed_keyboard/halconf.h diff --git a/keyboards/htx_studio/one_handed_keyboard/info.json b/keyboards/htx_studio/one_handed_keyboard/info.json new file mode 100644 index 00000000000..cc1e79ca309 --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard/info.json @@ -0,0 +1,25 @@ +{ + "manufacturer": "HTXStudio", + "maintainer": "HTXStudio", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "encoder": { + "rotary": [ + {"pin_a": "A9", "pin_b": "A10"} + ] + }, + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "pointing_device": true + }, + "matrix_pins": { + "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], + "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] + }, + "processor": "STM32G431", + "url": "https://github.com/htx-studio" +} diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard/mcuconf.h similarity index 100% rename from keyboards/htx_studio/one_handed_keyboard_ml/mcuconf.h rename to keyboards/htx_studio/one_handed_keyboard/mcuconf.h diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json b/keyboards/htx_studio/one_handed_keyboard/ml/keyboard.json similarity index 92% rename from keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json rename to keyboards/htx_studio/one_handed_keyboard/ml/keyboard.json index 4ddede69186..5c50ad6f8a2 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard/ml/keyboard.json @@ -1,32 +1,8 @@ { - "manufacturer": "HTXStudio", "keyboard_name": "One-Handed_Keyboard_ML", - "maintainer": "HTXStudio", - "bootloader": "stm32-dfu", - "diode_direction": "ROW2COL", - "encoder": { - "rotary": [ - {"pin_a": "A9", "pin_b": "A10"} - ] - }, "features": { - "bootmagic": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true, "rgb_matrix": true }, - "matrix": { - "cols": 14, - "rows": 6 - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, - "processor": "STM32G431", "rgb_matrix": { "animations": { "alphas_mods": true, @@ -138,7 +114,6 @@ "max_brightness": 110, "sleep": true }, - "url": "https://github.com/htx-studio", "usb": { "device_version": "3.1.0", "pid": "0x03AF", diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard/ml/keymaps/default/keymap.c similarity index 85% rename from keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c rename to keyboards/htx_studio/one_handed_keyboard/ml/keymaps/default/keymap.c index df7b93f1fff..dcf2cb1b0fa 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard/ml/keymaps/default/keymap.c @@ -15,23 +15,13 @@ */ #include QMK_KEYBOARD_H - -#define TRACKBALL_DPI_MIN 1000 -#define TRACKBALL_DPI_MAX 8000 -#define TRACKBALL_DPI_DEFAULT 3000 -#define TRACKBALL_DPI_STEP 1000 +#include "one_handed_keyboard.h" enum my_keycodes { DPI_UP = SAFE_RANGE, DPI_DOWN }; -typedef union { - uint16_t TrackballDPI; -} user_config_t; -user_config_t user_config; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ @@ -93,58 +83,26 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { }; #endif -void pointing_device_init_kb(void) { - wait_ms(10); - user_config.TrackballDPI = eeconfig_read_user(); - wait_ms(10); - adns9800_init(); - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); -} - // ADNS9800. The CPI range is 800-8200, in increments of 200. bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case DPI_UP: { if (record->event.pressed) { - user_config.TrackballDPI += TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { - user_config.TrackballDPI = TRACKBALL_DPI_MAX; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_up(); } + break; } case DPI_DOWN: { if (record->event.pressed) { - user_config.TrackballDPI -= TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { - user_config.TrackballDPI = TRACKBALL_DPI_MIN; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_down(); } + break; + } + default: break; } - default: return true; - - } } void eeconfig_init_user(void) { - user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); - eeconfig_update_user(user_config.TrackballDPI); -} - -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 - } else { - RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); - } - return false; + pointing_adns9800_reset(); } diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard/ml/keymaps/default/rules.mk similarity index 100% rename from keyboards/htx_studio/one_handed_keyboard_ml/keymaps/default/rules.mk rename to keyboards/htx_studio/one_handed_keyboard/ml/keymaps/default/rules.mk diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/halconf.h b/keyboards/htx_studio/one_handed_keyboard/ml/ml.c similarity index 61% rename from keyboards/htx_studio/one_handed_keyboard_mr/halconf.h rename to keyboards/htx_studio/one_handed_keyboard/ml/ml.c index 111ec84f282..6deb797a4ab 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/halconf.h +++ b/keyboards/htx_studio/one_handed_keyboard/ml/ml.c @@ -1,4 +1,4 @@ -/* Copyright 2020 QMK +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) * * 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 @@ -14,12 +14,14 @@ * along with this program. If not, see . */ - #pragma once +#include "rgb_matrix.h" +#include "host.h" - #define HAL_USE_PWM TRUE - #define HAL_USE_SPI TRUE - #define SPI_USE_WAIT TRUE - #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD - - #include_next - \ No newline at end of file +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); + } + return false; +} diff --git a/keyboards/htx_studio/one_handed_keyboard_ml/readme.md b/keyboards/htx_studio/one_handed_keyboard/ml/readme.md similarity index 91% rename from keyboards/htx_studio/one_handed_keyboard_ml/readme.md rename to keyboards/htx_studio/one_handed_keyboard/ml/readme.md index 1933b96610a..dd49d41133a 100644 --- a/keyboards/htx_studio/one_handed_keyboard_ml/readme.md +++ b/keyboards/htx_studio/one_handed_keyboard/ml/readme.md @@ -12,11 +12,11 @@ This is a keyboard with a fan-shaped layout and 59 keys.The commonly used button Make example for this keyboard (after setting up your build environment): - `make htx_studio/one_handed_keyboard_ml:default` + `make htx_studio/one_handed_keyboard/ml:default` Flashing example for this keyboard: - `make htx_studio/one_handed_keyboard_ml:default:flash` + `make htx_studio/one_handed_keyboard/ml:default:flash` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json b/keyboards/htx_studio/one_handed_keyboard/mr/keyboard.json similarity index 92% rename from keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json rename to keyboards/htx_studio/one_handed_keyboard/mr/keyboard.json index 9408f198087..c543b1643b1 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard/mr/keyboard.json @@ -1,32 +1,8 @@ { - "manufacturer": "HTXStudio", "keyboard_name": "One-Handed_Keyboard_MR", - "maintainer": "HTXStudio", - "bootloader": "stm32-dfu", - "diode_direction": "ROW2COL", - "encoder": { - "rotary": [ - {"pin_a": "A9", "pin_b": "A10"} - ] - }, "features": { - "bootmagic": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true, "rgb_matrix": true }, - "matrix": { - "cols": 14, - "rows": 6 - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, - "processor": "STM32G431", "rgb_matrix": { "animations": { "alphas_mods": true, @@ -138,7 +114,6 @@ "max_brightness": 110, "sleep": true }, - "url": "https://github.com/htx-studio", "usb": { "device_version": "3.1.0", "pid": "0x03BF", diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard/mr/keymaps/default/keymap.c similarity index 85% rename from keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c rename to keyboards/htx_studio/one_handed_keyboard/mr/keymaps/default/keymap.c index e3dc303db5b..de1ac56bd74 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard/mr/keymaps/default/keymap.c @@ -15,22 +15,13 @@ */ #include QMK_KEYBOARD_H - -#define TRACKBALL_DPI_MIN 1000 -#define TRACKBALL_DPI_MAX 8000 -#define TRACKBALL_DPI_DEFAULT 3000 -#define TRACKBALL_DPI_STEP 1000 +#include "one_handed_keyboard.h" enum my_keycodes { DPI_UP = SAFE_RANGE, DPI_DOWN }; -typedef union { - uint16_t TrackballDPI; -} user_config_t; -user_config_t user_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ @@ -89,59 +80,26 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { }; #endif -void pointing_device_init_kb(void) { - wait_ms(10); - user_config.TrackballDPI = eeconfig_read_user(); - wait_ms(10); - adns9800_init(); - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); -} - // ADNS9800. The CPI range is 800-8200, in increments of 200. bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case DPI_UP: { if (record->event.pressed) { - user_config.TrackballDPI += TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { - user_config.TrackballDPI = TRACKBALL_DPI_MAX; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_up(); } + break; } case DPI_DOWN: { if (record->event.pressed) { - user_config.TrackballDPI -= TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { - user_config.TrackballDPI = TRACKBALL_DPI_MIN; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_down(); } + break; + } + default: break; } - default: return true; - - } } void eeconfig_init_user(void) { - user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); - eeconfig_update_user(user_config.TrackballDPI); + pointing_adns9800_reset(); } - -bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (host_keyboard_led_state().caps_lock) { - RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 - } else { - RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); - } - return false; -} - diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard/mr/keymaps/default/rules.mk similarity index 100% rename from keyboards/htx_studio/one_handed_keyboard_mr/keymaps/default/rules.mk rename to keyboards/htx_studio/one_handed_keyboard/mr/keymaps/default/rules.mk diff --git a/keyboards/htx_studio/one_handed_keyboard/mr/mr.c b/keyboards/htx_studio/one_handed_keyboard/mr/mr.c new file mode 100644 index 00000000000..6deb797a4ab --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard/mr/mr.c @@ -0,0 +1,27 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + +#include "rgb_matrix.h" +#include "host.h" + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 255, 255, 255); // assuming caps lock is at led #5 + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(28, 0, 0, 0); + } + return false; +} diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/readme.md b/keyboards/htx_studio/one_handed_keyboard/mr/readme.md similarity index 91% rename from keyboards/htx_studio/one_handed_keyboard_mr/readme.md rename to keyboards/htx_studio/one_handed_keyboard/mr/readme.md index 5c7cb56993e..19c85dcc9de 100644 --- a/keyboards/htx_studio/one_handed_keyboard_mr/readme.md +++ b/keyboards/htx_studio/one_handed_keyboard/mr/readme.md @@ -12,11 +12,11 @@ This is a keyboard with a fan-shaped layout and 59 keys.The commonly used button Make example for this keyboard (after setting up your build environment): - `make htx_studio/one_handed_keyboard_mr:default` + `make htx_studio/one_handed_keyboard/mr:default` Flashing example for this keyboard: - `make htx_studio/one_handed_keyboard_mr:default:flash` + `make htx_studio/one_handed_keyboard/mr:default:flash` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.c b/keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.c new file mode 100644 index 00000000000..83ab44968ad --- /dev/null +++ b/keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.c @@ -0,0 +1,61 @@ +/* Copyright 2025 htx-studio (@https://github.com/htx-studio) + * + * 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 . + */ + +#include "wait.h" +#include "eeconfig.h" +#include "pointing_device.h" +#include "one_handed_keyboard.h" + +#define TRACKBALL_DPI_MIN 1000 +#define TRACKBALL_DPI_MAX 8000 +#define TRACKBALL_DPI_DEFAULT 3000 +#define TRACKBALL_DPI_STEP 1000 + +user_config_t user_config; + +void pointing_device_init_kb(void) { + wait_ms(10); + user_config.TrackballDPI = eeconfig_read_user(); + wait_ms(10); + adns9800_init(); + wait_ms(10); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +void pointing_adns9800_cpi_up(void) { + user_config.TrackballDPI += TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { + user_config.TrackballDPI = TRACKBALL_DPI_MAX; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +void pointing_adns9800_cpi_down(void) { + user_config.TrackballDPI -= TRACKBALL_DPI_STEP; + if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { + user_config.TrackballDPI = TRACKBALL_DPI_MIN; + } + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); +} + +void pointing_adns9800_reset(void) { + user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; + wait_ms(10); + eeconfig_update_user(user_config.TrackballDPI); + pointing_device_set_cpi(user_config.TrackballDPI); +} diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/config.h b/keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.h similarity index 71% rename from keyboards/htx_studio/one_handed_keyboard_sl/config.h rename to keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.h index c264940916a..8acc36782a3 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/config.h +++ b/keyboards/htx_studio/one_handed_keyboard/one_handed_keyboard.h @@ -14,17 +14,17 @@ * along with this program. If not, see . */ -#pragma once +#ifndef ONE_HANDED_KEYBOARD_H +#define ONE_HANDED_KEYBOARD_H -#define SPI_DRIVER SPID1 -#define SPI_SCK_PIN A5 -#define SPI_MISO_PIN A6 -#define SPI_MOSI_PIN A7 +#include "quantum.h" -#define POINTING_DEVICE_CS_PIN A4 -#define POINTING_DEVICE_MOTION_PIN A3 -#define POINTING_DEVICE_TASK_THROTTLE_MS 1 -#define POINTING_DEVICE_INVERT_X 1 +typedef union { + uint16_t TrackballDPI; +} user_config_t; -#define ENCODER_RESOLUTION 2 +void pointing_adns9800_cpi_up(void); +void pointing_adns9800_cpi_down(void); +void pointing_adns9800_reset(void); +#endif // ONE_HANDED_KEYBOARD_H diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json b/keyboards/htx_studio/one_handed_keyboard/sl/keyboard.json similarity index 83% rename from keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json rename to keyboards/htx_studio/one_handed_keyboard/sl/keyboard.json index e26444299c3..1cec49bf020 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keyboard.json +++ b/keyboards/htx_studio/one_handed_keyboard/sl/keyboard.json @@ -1,32 +1,5 @@ { - "manufacturer": "HTXStudio", "keyboard_name": "One-Handed_Keyboard_SL", - "maintainer": "HTXStudio", - "bootloader": "stm32-dfu", - "diode_direction": "ROW2COL", - "encoder": { - "rotary": [ - {"pin_a": "A9", "pin_b": "A10"} - ] - }, - "features": { - "bootmagic": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": true, - "pointing_device": true - }, - "matrix": { - "cols": 14, - "rows": 6 - }, - "matrix_pins": { - "cols": ["A0", "A1", "A2", "C4", "B0", "B1", "B2", "B7", "B5", "B3", "B10", "C11", "C10", "A15"], - "rows": ["B12", "B15", "C6", "B13", "B14", "A8"] - }, - "processor": "STM32G431", - "url": "https://github.com/htx-studio", "usb": { "device_version": "3.1.0", "pid": "0x03BE", diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c b/keyboards/htx_studio/one_handed_keyboard/sl/keymaps/default/keymap.c similarity index 81% rename from keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c rename to keyboards/htx_studio/one_handed_keyboard/sl/keymaps/default/keymap.c index 4628a681f62..e47400517ec 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/keymap.c +++ b/keyboards/htx_studio/one_handed_keyboard/sl/keymaps/default/keymap.c @@ -15,22 +15,13 @@ */ #include QMK_KEYBOARD_H - -#define TRACKBALL_DPI_MIN 1000 -#define TRACKBALL_DPI_MAX 8000 -#define TRACKBALL_DPI_DEFAULT 3000 -#define TRACKBALL_DPI_STEP 1000 +#include "one_handed_keyboard.h" enum my_keycodes { DPI_UP = SAFE_RANGE, DPI_DOWN }; -typedef union { - uint16_t TrackballDPI; -} user_config_t; -user_config_t user_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -72,49 +63,26 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { }; #endif -void pointing_device_init_kb(void) { - wait_ms(10); - user_config.TrackballDPI = eeconfig_read_user(); - wait_ms(10); - adns9800_init(); - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); -} - // ADNS9800. The CPI range is 800-8200, in increments of 200. bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case DPI_UP: { if (record->event.pressed) { - user_config.TrackballDPI += TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI > TRACKBALL_DPI_MAX) { - user_config.TrackballDPI = TRACKBALL_DPI_MAX; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_up(); } + break; } case DPI_DOWN: { if (record->event.pressed) { - user_config.TrackballDPI -= TRACKBALL_DPI_STEP; - if(user_config.TrackballDPI < TRACKBALL_DPI_MIN) { - user_config.TrackballDPI = TRACKBALL_DPI_MIN; - } - eeconfig_update_user(user_config.TrackballDPI); - pointing_device_set_cpi(user_config.TrackballDPI); - return false; + pointing_adns9800_cpi_down(); } + break; + } + default: break; } - default: return true; - - } } void eeconfig_init_user(void) { - user_config.TrackballDPI = TRACKBALL_DPI_DEFAULT; - wait_ms(10); - pointing_device_set_cpi(user_config.TrackballDPI); - eeconfig_update_user(user_config.TrackballDPI); + pointing_adns9800_reset(); } diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk b/keyboards/htx_studio/one_handed_keyboard/sl/keymaps/default/rules.mk similarity index 100% rename from keyboards/htx_studio/one_handed_keyboard_sl/keymaps/default/rules.mk rename to keyboards/htx_studio/one_handed_keyboard/sl/keymaps/default/rules.mk diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/readme.md b/keyboards/htx_studio/one_handed_keyboard/sl/readme.md similarity index 91% rename from keyboards/htx_studio/one_handed_keyboard_sl/readme.md rename to keyboards/htx_studio/one_handed_keyboard/sl/readme.md index 3bbd7137094..b27b4adb954 100644 --- a/keyboards/htx_studio/one_handed_keyboard_sl/readme.md +++ b/keyboards/htx_studio/one_handed_keyboard/sl/readme.md @@ -12,11 +12,11 @@ This is a keyboard with a fan-shaped layout and 59 keys.The commonly used button Make example for this keyboard (after setting up your build environment): - `make htx_studio/one_handed_keyboard_sl:default` + `make htx_studio/one_handed_keyboard/sl:default` Flashing example for this keyboard: - `make htx_studio/one_handed_keyboard_sl:default:flash` + `make htx_studio/one_handed_keyboard/sl:default:flash` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/config.h b/keyboards/htx_studio/one_handed_keyboard_mr/config.h deleted file mode 100644 index b5c60197c4d..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/config.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2025 htx-studio (@https://github.com/htx-studio) - * - * 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 . - */ - -#pragma once - -#define SPI_DRIVER SPID1 -#define SPI_SCK_PIN A5 -#define SPI_MISO_PIN A6 -#define SPI_MOSI_PIN A7 - -#define POINTING_DEVICE_CS_PIN A4 -#define POINTING_DEVICE_MOTION_PIN A3 -#define POINTING_DEVICE_TASK_THROTTLE_MS 1 -#define POINTING_DEVICE_INVERT_X 1 - -#define ENCODER_RESOLUTION 2 - -#ifdef RGB_MATRIX_ENABLE - -#define WS2812_BITBANG_NOP_FUDGE 0 -#define WS2812_PWM_DRIVER PWMD3 -#define WS2812_PWM_CHANNEL 1 -#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 -#define WS2812_DMA_CHANNEL 1 -#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP - -#endif - - diff --git a/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h deleted file mode 100644 index 348aebd3014..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_mr/mcuconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - - #pragma once - - #include_next - -#undef STM32_SPI_USE_SPI1 -#define STM32_SPI_USE_SPI1 TRUE - -/* enable TIM3, used for RGB LED PWM driver */ -#undef STM32_PWM_USE_TIM3 -#define STM32_PWM_USE_TIM3 TRUE - diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h b/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h deleted file mode 100644 index 493d3687da7..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_sl/halconf.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - - #pragma once - - #define HAL_USE_SPI TRUE - #define SPI_USE_WAIT TRUE - #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD - - #include_next - \ No newline at end of file diff --git a/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h b/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h deleted file mode 100644 index 0ee034d9740..00000000000 --- a/keyboards/htx_studio/one_handed_keyboard_sl/mcuconf.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - - #pragma once - - #include_next - -#undef STM32_SPI_USE_SPI1 -#define STM32_SPI_USE_SPI1 TRUE - From 4ef64784e4d4121a9711880eb92f6c109a6e39ca Mon Sep 17 00:00:00 2001 From: htx_studio Date: Tue, 13 May 2025 17:57:04 +0800 Subject: [PATCH 7/7] discard --- keyboards/htx_studio/.vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 keyboards/htx_studio/.vscode/settings.json diff --git a/keyboards/htx_studio/.vscode/settings.json b/keyboards/htx_studio/.vscode/settings.json deleted file mode 100644 index aad33c3e489..00000000000 --- a/keyboards/htx_studio/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files.associations": { - "one_handed_keyboard.h": "c" - } -} \ No newline at end of file