diff options
-rw-r--r-- | keyboards/oddball/adns.c | 270 | ||||
-rw-r--r-- | keyboards/oddball/adns9800_srom_A4.h | 212 | ||||
-rw-r--r-- | keyboards/oddball/config.h | 255 | ||||
-rw-r--r-- | keyboards/oddball/info.json | 21 | ||||
-rw-r--r-- | keyboards/oddball/keymaps/default/keymap.c | 46 | ||||
-rw-r--r-- | keyboards/oddball/oddball.c | 17 | ||||
-rw-r--r-- | keyboards/oddball/oddball.h | 44 | ||||
-rw-r--r-- | keyboards/oddball/readme.md | 13 | ||||
-rw-r--r-- | keyboards/oddball/rules.mk | 39 |
9 files changed, 917 insertions, 0 deletions
diff --git a/keyboards/oddball/adns.c b/keyboards/oddball/adns.c new file mode 100644 index 0000000000..35225f042b --- /dev/null +++ b/keyboards/oddball/adns.c @@ -0,0 +1,270 @@ +#include <avr/io.h> +#include <avr/interrupt.h> +#include "quantum.h" +#include "pointing_device.h" +#include "adns9800_srom_A4.h" +#include "../../lib/lufa/LUFA/Drivers/Peripheral/SPI.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 0 + +extern const uint16_t firmware_length; +extern const uint8_t firmware_data[]; + +enum motion_burst_property{ + 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 +}; + +// used to track the motion delta between updates +volatile int32_t delta_x; +volatile int32_t delta_y; + +void adns_begin(void){ + PORTB &= ~ (1 << NCS); +} + +void adns_end(void){ + PORTB |= (1 << NCS); +} + +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_TransferByte(reg_addr | 0x80 ); + SPI_TransferByte(data); + + // tSCLK-NCS for write operation + wait_us(20); + + adns_end(); + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); +} + +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_TransferByte(reg_addr & 0x7f ); + uint8_t data = SPI_TransferByte(0); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + adns_end(); + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + return data; +} + +void pointing_device_init(void) { + + if(!is_keyboard_master()) + return; + + // interrupt 2 + EICRA &= ~(1 << 4); + EICRA |= (1 << 5); + EIMSK |= (1<<INT2); + + // mode 3 + SPI_Init( + SPI_SPEED_FCPU_DIV_8 | + SPI_ORDER_MSB_FIRST | + SPI_SCK_LEAD_FALLING | + SPI_SAMPLE_TRAILING | + SPI_MODE_MASTER); + + // set B0 output + DDRB |= (1 << 0); + + // reset serial port + adns_end(); + 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) + adns_begin(); + + // write burst destination adress + SPI_TransferByte(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_TransferByte(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, 0x04); + + wait_ms(100); +} + +void pointing_device_task(void) { + + if(!is_keyboard_master()) + return; + + report_mouse_t report = pointing_device_get_report(); + + // clamp deltas from -127 to 127 + report.x = delta_x < -127 ? 127 : delta_x > 127 ? 127 : delta_x; + report.x = -report.x; + + report.y = delta_y < -127 ? 127 : delta_y > 127 ? 127 : delta_y; + + // reset deltas + delta_x = 0; + delta_y = 0; + + pointing_device_set_report(report); + pointing_device_send(); +} + +int16_t convertDeltaToInt(uint8_t high, uint8_t low){ + + // join bytes into twos compliment + uint16_t twos_comp = (high << 8) | low; + + // convert twos comp to int + if (twos_comp & 0x8000) + return -1 * ((twos_comp ^ 0xffff) + 1); + + return twos_comp; +} + +ISR(INT2_vect) { + // called on interrupt 2 when sensed motion + // copy burst data from the respective registers + + adns_begin(); + + // send adress of the register, with MSBit = 1 to indicate it's a write + SPI_TransferByte(REG_Motion_Burst & 0x7f); + + uint8_t burst_data[pixel_sum]; + + for (int i = 0; i < pixel_sum; ++i) { + burst_data[i] = SPI_TransferByte(0); + } + + delta_x += convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]); + delta_y += convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]); + + adns_end(); +} diff --git a/keyboards/oddball/adns9800_srom_A4.h b/keyboards/oddball/adns9800_srom_A4.h new file mode 100644 index 0000000000..11958d21ef --- /dev/null +++ b/keyboards/oddball/adns9800_srom_A4.h @@ -0,0 +1,212 @@ +#pragma once + +#include <avr/pgmspace.h> + +const uint16_t firmware_length = 3070; + +const uint8_t firmware_data[] PROGMEM = { +0x03, 0xa4, 0x6e, 0x16, 0x6d, 0x89, 0x3e, 0xfe, 0x5f, 0x1c, 0xb8, 0xf2, 0x47, 0x0c, 0x7b, +0x74, 0x6a, 0x56, 0x0f, 0x7d, 0x76, 0x71, 0x4b, 0x0c, 0x97, 0xb6, 0xcf, 0xfd, 0x78, 0x72, +0x66, 0x2f, 0xbd, 0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0x36, +0x9e, 0xff, 0x53, 0x6d, 0x51, 0x50, 0x61, 0x72, 0x18, 0xcd, 0x3d, 0xe4, 0xb6, 0x27, 0x10, +0x4a, 0xdd, 0xfd, 0xa3, 0x36, 0x67, 0xac, 0xc7, 0x85, 0x1c, 0xd3, 0xe7, 0x17, 0x74, 0xe2, +0x8e, 0xee, 0xa6, 0xf4, 0xb6, 0x86, 0x24, 0xcf, 0x40, 0xdf, 0x35, 0x08, 0x0f, 0x55, 0xdd, +0x51, 0xe9, 0x7c, 0x39, 0x78, 0x5c, 0xdf, 0x20, 0x2a, 0xeb, 0xed, 0x35, 0x10, 0x26, 0x98, +0x77, 0x69, 0x4e, 0x51, 0x7a, 0xb2, 0x9f, 0x1d, 0xbc, 0x06, 0xcd, 0xcf, 0x4d, 0xb9, 0xfa, +0xb7, 0xaf, 0x6a, 0x07, 0x0c, 0x96, 0x42, 0x57, 0x6c, 0x3d, 0xa5, 0xfe, 0x91, 0xe3, 0x76, +0x9f, 0xdd, 0x3c, 0x83, 0x25, 0xab, 0x24, 0x89, 0x47, 0x7c, 0xba, 0xd7, 0x7d, 0x72, 0x90, +0x80, 0xb0, 0x03, 0xa4, 0xef, 0x04, 0x0a, 0x9e, 0x5a, 0x14, 0x1c, 0xab, 0x75, 0x47, 0x05, +0xcb, 0xa2, 0x97, 0x0d, 0x6a, 0xa5, 0x7c, 0xa4, 0x40, 0x90, 0xe2, 0x6c, 0xfa, 0xd4, 0xbd, +0x69, 0xd0, 0x06, 0x53, 0x67, 0xfa, 0xe7, 0xcc, 0x06, 0x42, 0x45, 0xbe, 0xbd, 0x6f, 0x3e, +0x48, 0x70, 0xf5, 0x2b, 0x83, 0xc7, 0xba, 0x54, 0x9c, 0xab, 0x54, 0x1f, 0x81, 0xe2, 0x11, +0x82, 0x51, 0x02, 0x51, 0x63, 0x13, 0x86, 0x38, 0xb1, 0x56, 0x0c, 0x4d, 0x68, 0xf3, 0x53, +0x1d, 0xfb, 0xe3, 0x15, 0xe8, 0x42, 0xf3, 0x27, 0x9b, 0xa5, 0x4a, 0x86, 0x90, 0xe1, 0x17, +0xdc, 0x99, 0xe2, 0x5c, 0x79, 0xc6, 0x5f, 0x7e, 0x33, 0xc0, 0x41, 0xb6, 0x9e, 0xfc, 0x10, +0x8a, 0xf4, 0xfd, 0xe9, 0xd2, 0x52, 0x53, 0x54, 0x89, 0x04, 0xbd, 0x69, 0xd2, 0x54, 0x32, +0x96, 0xec, 0x44, 0x08, 0xc3, 0x86, 0x10, 0xd1, 0x3e, 0x32, 0xb5, 0x4f, 0x52, 0x49, 0x58, +0x49, 0xf2, 0x8d, 0x83, 0x89, 0xf3, 0x24, 0x83, 0x65, 0x72, 0x53, 0xaf, 0x2d, 0x90, 0x61, +0x99, 0x92, 0x31, 0x75, 0x93, 0x46, 0xe5, 0xd3, 0x48, 0x11, 0x01, 0xc9, 0x10, 0x98, 0x66, +0x86, 0x79, 0x19, 0x73, 0x7d, 0xda, 0xa1, 0xb0, 0x41, 0x9e, 0xcd, 0xdc, 0xc2, 0x66, 0x86, +0xdd, 0xb8, 0xc9, 0xe3, 0xe7, 0x80, 0x96, 0xf5, 0x38, 0x72, 0xa5, 0xda, 0xe5, 0x38, 0x13, +0x57, 0x2b, 0xbd, 0x32, 0xc7, 0x44, 0xe0, 0xe3, 0x2d, 0xed, 0x54, 0x40, 0x74, 0x9d, 0x02, +0x55, 0x38, 0x45, 0x89, 0x6f, 0x14, 0x40, 0xf6, 0x7b, 0x41, 0x1e, 0x04, 0xdb, 0xa4, 0xd9, +0xf3, 0x90, 0xae, 0x10, 0xc9, 0xc3, 0x72, 0x5d, 0x0d, 0x01, 0x51, 0xf1, 0xd1, 0x96, 0x43, +0xc6, 0x1a, 0x98, 0x3d, 0xbd, 0xcd, 0xdf, 0x44, 0x82, 0xd0, 0x17, 0xa2, 0x9e, 0x6c, 0x0c, +0x2f, 0x46, 0xeb, 0xd8, 0x4a, 0xce, 0xfe, 0xbe, 0xcd, 0xf9, 0xd4, 0x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, 0xcf, 0x9e, 0xd6, 0x33, 0xdb, 0x08, 0x34, 0xba, +0x34, 0x9b, 0xf4, 0x25, 0xaa, 0x7f, 0x52, 0x37, 0x4f, 0x8b, 0x94, 0x95, 0x94, 0x2d, 0x88, +0x10, 0xd1, 0x05, 0x07, 0xcf, 0xd4, 0x04, 0xdb, 0x95, 0xbe, 0x36, 0xd0, 0x1c, 0x1c, 0xa4, +0x85, 0x0a, 0x02, 0x80, 0xde, 0xb1, 0x1b, 0x56, 0xaf, 0x51, 0x22, 0xa7, 0xa4, 0x4a, 0x2c, +0x2f, 0x17, 0x7c, 0x13, 0x4c, 0x36, 0xad, 0x90, 0x8c, 0xea, 0xd4, 0x58, 0x3a, 0xca, 0xea, +0x1d, 0x5c, 0x6c, 0x93, 0xad, 0x59, 0xed, 0xb1, 0x17, 0xa4, 0x22, 0x95, 0x67, 0xbe, 0xbb, +0x25, 0xaf, 0x65, 0xc8, 0xe5, 0x90, 0xe1, 0x17, 0xdc, 0x7a, 0x47, 0xe9, 0x8f, 0xc3, 0xc3, +0x5a, 0xdc, 0x20, 0x20, 0x4a, 0x09, 0xfc, 0x39, 0x51, 0x29, 0x31, 0xfb, 0xa0, 0x0a, 0x61, +0x08, 0x9b, 0xb9, 0xb3, 0x6c, 0x95, 0xc5, 0x94, 0x00, 0x66, 0xf1, 0xb9, 0x79, 0x90, 0x7f, +0x95, 0x5f, 0x55, 0xe1, 0x13, 0x6b, 0x87, 0xa8, 0x62, 0x21, 0x98, 0xf2, 0x57, 0x19, 0x92, +0x10, 0xb3, 0x24, 0x81, 0x12, 0x21, 0xff, 0xd6, 0xf9, 0x73, 0x71, 0xc2, 0x62, 0x09, 0x31, +0xeb, 0xe0, 0x7a, 0x35, 0x60, 0x8d, 0xc9, 0xb1, 0xe5, 0xa7, 0x8b, 0xca, 0xbc, 0x2d, 0xfa, +0x63, 0xc7, 0x68, 0x1d, 0x19, 0xb5, 0x61, 0x78, 0xd0, 0x8b, 0xdb, 0xc0, 0x39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0xf6, 0x4b, 0x25, +0x91, 0xc5, 0x9e, 0x1e, 0xb2, 0x78, 0x0c, 0x23, 0x80, 0xdd, 0xa3, 0x21, 0xf5, 0xa9, 0x9e, +0x00, 0x16, 0x19, 0xbc, 0xd9, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, 0x3d, 0xf8, 0x72, 0x66, +0x2f, 0xdc, 0x3a, 0xf6, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x27, 0xcc, 0xfb, 0x55, 0x09, 0x71, +0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xd0, 0x22, 0xc6, 0xef, 0x5c, 0x1b, +0xb4, 0xea, 0x56, 0x2e, 0xbf, 0xfc, 0x5b, 0x34, 0xcb, 0x14, 0x8b, 0x94, 0xaa, 0xb7, 0xec, +0x5a, 0x36, 0xcf, 0x1c, 0xba, 0xf6, 0x4d, 0xdb, 0x35, 0xf3 }; diff --git a/keyboards/oddball/config.h b/keyboards/oddball/config.h new file mode 100644 index 0000000000..b3679bea4c --- /dev/null +++ b/keyboards/oddball/config.h @@ -0,0 +1,255 @@ +/* +Copyright 2020 Alexander Tulloh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xCA49 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alexander Tulloh +#define PRODUCT Oddball +#define DESCRIPTION A ballin keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F6, B5, B6, F7 } +#define MATRIX_COL_PINS { D6, D7, B4, D3, C6, C7 } +#define UNUSED_PINS { B7, D4, D5, E6, F0, F1, F4, F5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define USE_I2C +#define SPLIT_USB_DETECT +#define MASTER_RIGHT + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/oddball/info.json b/keyboards/oddball/info.json new file mode 100644 index 0000000000..8b38c9fa83 --- /dev/null +++ b/keyboards/oddball/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Oddball", + "url": "https://atulloh.github.io/oddball", + "maintainer": "Alexander Tulloh", + "width": 14, + "height": 4.75, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"sw1", "x":0, "y":0.37}, {"label":"sw2", "x":1, "y":0.37}, {"label":"sw3", "x":2, "y":0.12}, {"label":"sw4", "x":3, "y":0}, {"label":"sw5", "x":4, "y":0.12}, {"label":"sw6", "x":5, "y":0.25}, + {"label":"sw6", "x":8 , "y":0.25}, {"label":"sw5", "x":9 , "y":0.12}, {"label":"sw4", "x":10, "y":0}, {"label":"sw3", "x":11, "y":0.12}, {"label":"sw2", "x":12, "y":0.37}, {"label":"sw1", "x":13, "y":0.37}, + {"label":"sw7", "x":0, "y":1.37}, {"label":"sw8", "x":1, "y":1.37}, {"label":"sw9", "x":2, "y":1.12}, {"label":"sw10", "x":3, "y":1}, {"label":"sw11", "x":4, "y":1.12}, {"label":"sw12", "x":5, "y":1.25}, + {"label":"sw12", "x":8, "y":1.25}, {"label":"sw11", "x":9, "y":1.12}, {"label":"sw10", "x":10, "y":1}, {"label":"sw9", "x":11, "y":1.12}, {"label":"sw8", "x":12, "y":1.37}, {"label":"sw7", "x":13, "y":1.37}, + {"label":"sw13", "x":0, "y":2.37}, {"label":"sw14", "x":1, "y":2.37}, {"label":"sw15", "x":2, "y":2.12}, {"label":"sw16", "x":3, "y":2}, {"label":"sw17", "x":4, "y":2.12}, {"label":"sw18", "x":5, "y":2.25}, + {"label":"sw18", "x":8, "y":2.25}, {"label":"sw17", "x":9, "y":2.12}, {"label":"sw16", "x":10, "y":2}, {"label":"sw15", "x":11, "y":2.12}, {"label":"sw14", "x":12, "y":2.37}, {"label":"sw13", "x":13, "y":2.37}, + {"label":"sw19", "x":4.5, "y":3.5, "h":1.25}, {"label":"sw20", "x":5.5, "y":3.5, "h":1.25}, + {"label":"sw20", "x":7.5, "y":3.5, "h":1.25}, {"label":"sw19", "x":8.5, "y":3.5, "h":1.25} + ] + } + } +} diff --git a/keyboards/oddball/keymaps/default/keymap.c b/keyboards/oddball/keymaps/default/keymap.c new file mode 100644 index 0000000000..439e63cd63 --- /dev/null +++ b/keyboards/oddball/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Alexander Tulloh + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_BSPC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, + KC_LA |