@ -1,25 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define CH_CFG_ST_FREQUENCY 10000 | |||
#define CH_CFG_OPTIMIZE_SPEED FALSE | |||
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | |||
#include_next <chconf.h> |
@ -1,73 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0x00DE | |||
#define PRODUCT_ID 0x6565 // For 65A | |||
#define DEVICE_VER 0x8065 // PA for pre-Alpha | |||
#define MANUFACTURER Mode | |||
#define PRODUCT SixtyFive HA | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 6 | |||
#define MATRIX_COLS 15 | |||
#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } | |||
#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } | |||
#define DIODE_DIRECTION COL2ROW | |||
/* define if matrix has ghost */ | |||
//#define MATRIX_HAS_GHOST | |||
/* Set 0 if debouncing isn't needed */ | |||
#define DEBOUNCE 5 | |||
/* 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 | |||
#define EEPROM_I2C_24LC256 | |||
//#define I2C1_CLOCK_SPEED 400000 | |||
//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 | |||
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE | |||
#define STM32_HSECLK 8000000 | |||
#define OPENDRAIN_INDICATORS | |||
#define LED_CAPS_LOCK_PIN A6 | |||
/* | |||
* 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 | |||
//#define NO_ACTION_MACRO | |||
//#define NO_ACTION_FUNCTION |
@ -1,21 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define HAL_USE_I2C TRUE | |||
#include_next <halconf.h> |
@ -1,82 +0,0 @@ | |||
{ | |||
"keyboard_name": "Mode SixtyFive HA pre-Alpha", | |||
"url": "", | |||
"maintainer": "Gondolindrim", | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{ "label": "K00", "x": 0, "y": 0 }, | |||
{ "label": "K01", "x": 1, "y": 0 }, | |||
{ "label": "K02", "x": 2, "y": 0 }, | |||
{ "label": "K03", "x": 3, "y": 0 }, | |||
{ "label": "K04", "x": 4, "y": 0 }, | |||
{ "label": "K05", "x": 5, "y": 0 }, | |||
{ "label": "K06", "x": 6, "y": 0 }, | |||
{ "label": "K07", "x": 7, "y": 0 }, | |||
{ "label": "K08", "x": 8, "y": 0 }, | |||
{ "label": "K09", "x": 9, "y": 0 }, | |||
{ "label": "K0A", "x": 10, "y": 0 }, | |||
{ "label": "K0B", "x": 11, "y": 0 }, | |||
{ "label": "K0C", "x": 12, "y": 0 }, | |||
{ "label": "K0D", "x": 13, "y": 0, "w": 2 }, | |||
{ "label": "K0E", "x": 15, "y": 0 }, | |||
{ "label": "K10", "x": 0, "y": 1, "w": 1.5 }, | |||
{ "label": "K11", "x": 1.5, "y": 1 }, | |||
{ "label": "K12", "x": 2.5, "y": 1 }, | |||
{ "label": "K13", "x": 3.5, "y": 1 }, | |||
{ "label": "K14", "x": 4.5, "y": 1 }, | |||
{ "label": "K15", "x": 5.5, "y": 1 }, | |||
{ "label": "K16", "x": 6.5, "y": 1 }, | |||
{ "label": "K17", "x": 7.5, "y": 1 }, | |||
{ "label": "K18", "x": 8.5, "y": 1 }, | |||
{ "label": "K19", "x": 9.5, "y": 1 }, | |||
{ "label": "K1A", "x": 10.5, "y": 1 }, | |||
{ "label": "K1B", "x": 11.5, "y": 1 }, | |||
{ "label": "K1C", "x": 12.5, "y": 1 }, | |||
{ "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, | |||
{ "label": "K1E", "x": 15, "y": 1 }, | |||
{ "label": "K20", "x": 0, "y": 2, "w": 1.75 }, | |||
{ "label": "K21", "x": 1.75, "y": 2 }, | |||
{ "label": "K22", "x": 2.75, "y": 2 }, | |||
{ "label": "K23", "x": 3.75, "y": 2 }, | |||
{ "label": "K24", "x": 4.75, "y": 2 }, | |||
{ "label": "K25", "x": 5.75, "y": 2 }, | |||
{ "label": "K26", "x": 6.75, "y": 2 }, | |||
{ "label": "K27", "x": 7.75, "y": 2 }, | |||
{ "label": "K28", "x": 8.75, "y": 2 }, | |||
{ "label": "K29", "x": 9.75, "y": 2 }, | |||
{ "label": "K2A", "x": 10.75, "y": 2 }, | |||
{ "label": "K2B", "x": 11.75, "y": 2 }, | |||
{ "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, | |||
{ "label": "K2E", "x": 15, "y": 2 }, | |||
{ "label": "K30", "x": 0, "y": 3, "w": 2.25 }, | |||
{ "label": "K32", "x": 2.25, "y": 3 }, | |||
{ "label": "K33", "x": 3.25, "y": 3 }, | |||
{ "label": "K34", "x": 4.25, "y": 3 }, | |||
{ "label": "K35", "x": 5.25, "y": 3 }, | |||
{ "label": "K36", "x": 6.25, "y": 3 }, | |||
{ "label": "K37", "x": 7.25, "y": 3 }, | |||
{ "label": "K38", "x": 8.25, "y": 3 }, | |||
{ "label": "K39", "x": 9.25, "y": 3 }, | |||
{ "label": "K3A", "x": 10.25, "y": 3 }, | |||
{ "label": "K3B", "x": 11.25, "y": 3 }, | |||
{ "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, | |||
{ "label": "K3D", "x": 14, "y": 3 }, | |||
{ "label": "K3E", "x": 15, "y": 3 }, | |||
{ "label": "K40", "x": 0, "y": 4, "w": 1.25 }, | |||
{ "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, | |||
{ "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, | |||
{ "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, | |||
{ "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, | |||
{ "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, | |||
{ "label": "K5C", "x": 13, "y": 4 }, | |||
{ "label": "K5D", "x": 14, "y": 4 }, | |||
{ "label": "K5E", "x": 15, "y": 4 } | |||
] | |||
} | |||
} | |||
} |
@ -1,49 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_DEL , | |||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGDN, | |||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
RESET , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TRNS, KC_MUTE, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[2] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[3] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
) | |||
}; |
@ -1,49 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, | |||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, | |||
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_DEL , KC_ENT , KC_PGDN, | |||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
RESET , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[2] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[3] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
) | |||
}; |
@ -1 +0,0 @@ | |||
VIA_ENABLE = yes |
@ -1,109 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 "m65ha_prealpha.h" | |||
void board_init(void) { | |||
setPinInput(B9); | |||
setPinInput(B10); | |||
} | |||
#define LED_PIN_ON_STATE 1 | |||
void led_init_ports(void) { | |||
/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator | |||
pins default to push-pull output. Else, they are defined as open-drain. The | |||
pin mode configuration is done through the INDICATOR_PIN_MODE which is | |||
attributed right at the beggining. **/ | |||
#ifndef OPENDRAIN_INDICATORS | |||
# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL | |||
#else | |||
# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN | |||
#endif | |||
#ifdef LED_NUM_LOCK_PIN | |||
palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_CAPS_LOCK_PIN | |||
palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_SCROLL_LOCK_PIN | |||
palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_COMPOSE_PIN | |||
palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_KANA_PIN | |||
palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
} | |||
bool led_update_kb(led_t led_state) { | |||
bool res = led_update_user(led_state); | |||
if(res) { | |||
// writePin sets the pin high for 1 and low for 0. | |||
// In this example the pins are inverted, setting | |||
// it low/0 turns it on, and high/1 turns the LED off. | |||
// This behavior depends on whether the LED is between the pin | |||
// and VCC or the pin and GND. | |||
writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); | |||
} | |||
return res; | |||
} | |||
uint8_t prng(void) { | |||
static uint8_t s = 0xAA, a = 0; | |||
s ^= s << 3; | |||
s ^= s >> 5; | |||
s ^= a++ >> 2; | |||
return s; | |||
} | |||
void keyboard_post_init_user(void) { | |||
// Customise these values to desired behaviour | |||
// debug_enable = true; | |||
// debug_matrix = true; | |||
// debug_keyboard=true; | |||
// debug_mouse=true; | |||
} | |||
void matrix_scan_user(void) { | |||
static uint32_t last_eeprom_access = 0; | |||
uint32_t now = timer_read32(); | |||
if (now - last_eeprom_access > 5000) { | |||
dprint("reading eeprom\n"); | |||
last_eeprom_access = now; | |||
union { | |||
uint8_t bytes[4]; | |||
uint32_t raw; | |||
} tmp; | |||
tmp.bytes[0] = prng(); | |||
tmp.bytes[1] = prng(); | |||
tmp.bytes[2] = prng(); | |||
tmp.bytes[3] = prng(); | |||
eeconfig_update_user(tmp.raw); | |||
uint32_t value = eeconfig_read_user(); | |||
if (value != tmp.raw) { | |||
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |||
dprint("!! EEPROM readback mismatch!\n"); | |||
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |||
} | |||
} | |||
} |
@ -1,37 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 "quantum.h" | |||
#define ___ KC_NO | |||
#define LAYOUT_all( \ | |||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ | |||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ | |||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ | |||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ | |||
K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ | |||
) { \ | |||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ | |||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ | |||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E }, \ | |||
{ K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ | |||
{ K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ | |||
} |
@ -1,35 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_PLLM_VALUE | |||
#undef STM32_PLLN_VALUE | |||
#undef STM32_PLLP_VALUE | |||
#undef STM32_PLLQ_VALUE | |||
#undef STM32_PPRE1 | |||
#undef STM32_PPRE2 | |||
#define STM32_PLLM_VALUE 4 | |||
#define STM32_PLLN_VALUE 168 | |||
#define STM32_PLLP_VALUE 4 | |||
#define STM32_PLLQ_VALUE 7 | |||
#define STM32_PPRE1 STM32_PPRE1_DIV2 | |||
#define STM32_PPRE2 STM32_PPRE2_DIV1 | |||
#undef STM32_I2C_USE_I2C1 | |||
#define STM32_I2C_USE_I2C1 TRUE |
@ -1,9 +0,0 @@ | |||
# Mode M65HA (pre-release Alpha version) | |||
This is the firmware page for the pre-Alpha version of the Mode M65HA PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65ha_alpha` firmware. | |||
This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. | |||
# Needed patches | |||
For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. |
@ -1,24 +0,0 @@ | |||
# MCU name | |||
MCU = STM32F401 | |||
# Bootloader selection | |||
BOOTLOADER = stm32-dfu | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite | |||
MOUSEKEY_ENABLE = no # Mouse keys | |||
EXTRAKEY_ENABLE = yes # Audio control and System control | |||
CONSOLE_ENABLE = no # Console for debug | |||
COMMAND_ENABLE = no # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = no # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
AUDIO_ENABLE = no # Audio output | |||
EEPROM_DRIVER = i2c | |||
# Enter lower-power sleep mode when on the ChibiOS idle thread | |||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE |
@ -1,25 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define CH_CFG_ST_FREQUENCY 10000 | |||
#define CH_CFG_OPTIMIZE_SPEED FALSE | |||
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | |||
#include_next <chconf.h> |
@ -1,73 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0x00DE | |||
#define PRODUCT_ID 0x6573 // For 65I | |||
#define DEVICE_VER 0x8065 // PA for pre-Alpha | |||
#define MANUFACTURER Mode | |||
#define PRODUCT SixtyFive HI | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 6 | |||
#define MATRIX_COLS 15 | |||
#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } | |||
#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } | |||
#define DIODE_DIRECTION COL2ROW | |||
/* define if matrix has ghost */ | |||
//#define MATRIX_HAS_GHOST | |||
/* Set 0 if debouncing isn't needed */ | |||
#define DEBOUNCE 5 | |||
/* 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 | |||
#define EEPROM_I2C_24LC256 | |||
//#define I2C1_CLOCK_SPEED 400000 | |||
//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 | |||
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE | |||
#define STM32_HSECLK 8000000 | |||
#define OPENDRAIN_INDICATORS | |||
#define LED_CAPS_LOCK_PIN A6 | |||
/* | |||
* 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 | |||
//#define NO_ACTION_MACRO | |||
//#define NO_ACTION_FUNCTION |
@ -1,21 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#define HAL_USE_I2C TRUE | |||
#include_next <halconf.h> |
@ -1,83 +0,0 @@ | |||
{ | |||
"keyboard_name": "Mode SixtyFive HI pre-Alpha", | |||
"url": "", | |||
"maintainer": "Gondolindrim", | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{ "label": "K00", "x": 0, "y": 0 }, | |||
{ "label": "K01", "x": 1, "y": 0 }, | |||
{ "label": "K02", "x": 2, "y": 0 }, | |||
{ "label": "K03", "x": 3, "y": 0 }, | |||
{ "label": "K04", "x": 4, "y": 0 }, | |||
{ "label": "K05", "x": 5, "y": 0 }, | |||
{ "label": "K06", "x": 6, "y": 0 }, | |||
{ "label": "K07", "x": 7, "y": 0 }, | |||
{ "label": "K08", "x": 8, "y": 0 }, | |||
{ "label": "K09", "x": 9, "y": 0 }, | |||
{ "label": "K0A", "x": 10, "y": 0 }, | |||
{ "label": "K0B", "x": 11, "y": 0 }, | |||
{ "label": "K0C", "x": 12, "y": 0 }, | |||
{ "label": "K0D", "x": 13, "y": 0, "w": 2 }, | |||
{ "label": "K0E", "x": 15, "y": 0 }, | |||
{ "label": "K10", "x": 0, "y": 1, "w": 1.5 }, | |||
{ "label": "K11", "x": 1.5, "y": 1 }, | |||
{ "label": "K12", "x": 2.5, "y": 1 }, | |||
{ "label": "K13", "x": 3.5, "y": 1 }, | |||
{ "label": "K14", "x": 4.5, "y": 1 }, | |||
{ "label": "K15", "x": 5.5, "y": 1 }, | |||
{ "label": "K16", "x": 6.5, "y": 1 }, | |||
{ "label": "K17", "x": 7.5, "y": 1 }, | |||
{ "label": "K18", "x": 8.5, "y": 1 }, | |||
{ "label": "K19", "x": 9.5, "y": 1 }, | |||
{ "label": "K1A", "x": 10.5, "y": 1 }, | |||
{ "label": "K1B", "x": 11.5, "y": 1 }, | |||
{ "label": "K1C", "x": 12.5, "y": 1 }, | |||
{ "label": "K1E", "x": 15, "y": 1 }, | |||
{ "label": "K20", "x": 0, "y": 2, "w": 1.75 }, | |||
{ "label": "K21", "x": 1.75, "y": 2 }, | |||
{ "label": "K22", "x": 2.75, "y": 2 }, | |||
{ "label": "K23", "x": 3.75, "y": 2 }, | |||
{ "label": "K24", "x": 4.75, "y": 2 }, | |||
{ "label": "K25", "x": 5.75, "y": 2 }, | |||
{ "label": "K26", "x": 6.75, "y": 2 }, | |||
{ "label": "K27", "x": 7.75, "y": 2 }, | |||
{ "label": "K28", "x": 8.75, "y": 2 }, | |||
{ "label": "K29", "x": 9.75, "y": 2 }, | |||
{ "label": "K2A", "x": 10.75, "y": 2 }, | |||
{ "label": "K2B", "x": 11.75, "y": 2 }, | |||
{ "label": "K2C", "x": 12.75, "y": 2 }, | |||
{ "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, | |||
{ "label": "K2E", "x": 15, "y": 2 }, | |||
{ "label": "K30", "x": 0, "y": 3, "w": 1.25 }, | |||
{ "label": "K31", "x": 1.25, "y": 3 }, | |||
{ "label": "K32", "x": 2.25, "y": 3 }, | |||
{ "label": "K33", "x": 3.25, "y": 3 }, | |||
{ "label": "K34", "x": 4.25, "y": 3 }, | |||
{ "label": "K35", "x": 5.25, "y": 3 }, | |||
{ "label": "K36", "x": 6.25, "y": 3 }, | |||
{ "label": "K37", "x": 7.25, "y": 3 }, | |||
{ "label": "K38", "x": 8.25, "y": 3 }, | |||
{ "label": "K39", "x": 9.25, "y": 3 }, | |||
{ "label": "K3A", "x": 10.25, "y": 3 }, | |||
{ "label": "K3B", "x": 11.25, "y": 3 }, | |||
{ "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, | |||
{ "label": "K3D", "x": 14, "y": 3 }, | |||
{ "label": "K3E", "x": 15, "y": 3 }, | |||
{ "label": "K40", "x": 0, "y": 4, "w": 1.25 }, | |||
{ "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, | |||
{ "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, | |||
{ "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, | |||
{ "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, | |||
{ "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, | |||
{ "label": "K5C", "x": 13, "y": 4 }, | |||
{ "label": "K5D", "x": 14, "y": 4 }, | |||
{ "label": "K5E", "x": 15, "y": 4 } | |||
] | |||
} | |||
} | |||
} |
@ -1,49 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, | |||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_DEL , KC_PGDN, | |||
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , KC_PGUP, | |||
KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
RESET , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[2] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[3] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
) | |||
}; |
@ -1,49 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
This program is free software: you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation, either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, | |||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_DEL , KC_PGDN, | |||
KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , KC_PGUP, | |||
KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
RESET , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[2] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
), | |||
[3] = LAYOUT_all( | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | |||
) | |||
}; |
@ -1 +0,0 @@ | |||
VIA_ENABLE = yes |
@ -1,109 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 "m65hi_prealpha.h" | |||
void board_init(void) { | |||
setPinInput(B9); | |||
setPinInput(B10); | |||
} | |||
#define LED_PIN_ON_STATE 1 | |||
void led_init_ports(void) { | |||
/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator | |||
pins default to push-pull output. Else, they are defined as open-drain. The | |||
pin mode configuration is done through the INDICATOR_PIN_MODE which is | |||
attributed right at the beggining. **/ | |||
#ifndef OPENDRAIN_INDICATORS | |||
# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL | |||
#else | |||
# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN | |||
#endif | |||
#ifdef LED_NUM_LOCK_PIN | |||
palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_CAPS_LOCK_PIN | |||
palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_SCROLL_LOCK_PIN | |||
palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_COMPOSE_PIN | |||
palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
#ifdef LED_KANA_PIN | |||
palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); | |||
#endif | |||
} | |||
bool led_update_kb(led_t led_state) { | |||
bool res = led_update_user(led_state); | |||
if(res) { | |||
// writePin sets the pin high for 1 and low for 0. | |||
// In this example the pins are inverted, setting | |||
// it low/0 turns it on, and high/1 turns the LED off. | |||
// This behavior depends on whether the LED is between the pin | |||
// and VCC or the pin and GND. | |||
writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); | |||
} | |||
return res; | |||
} | |||
uint8_t prng(void) { | |||
static uint8_t s = 0xAA, a = 0; | |||
s ^= s << 3; | |||
s ^= s >> 5; | |||
s ^= a++ >> 2; | |||
return s; | |||
} | |||
void keyboard_post_init_user(void) { | |||
// Customise these values to desired behaviour | |||
debug_enable = true; | |||
// debug_matrix = true; | |||
// debug_keyboard=true; | |||
// debug_mouse=true; | |||
} | |||
void matrix_scan_user(void) { | |||
static uint32_t last_eeprom_access = 0; | |||
uint32_t now = timer_read32(); | |||
if (now - last_eeprom_access > 5000) { | |||
dprint("reading eeprom\n"); | |||
last_eeprom_access = now; | |||
union { | |||
uint8_t bytes[4]; | |||
uint32_t raw; | |||
} tmp; | |||
tmp.bytes[0] = prng(); | |||
tmp.bytes[1] = prng(); | |||
tmp.bytes[2] = prng(); | |||
tmp.bytes[3] = prng(); | |||
eeconfig_update_user(tmp.raw); | |||
uint32_t value = eeconfig_read_user(); | |||
if (value != tmp.raw) { | |||
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |||
dprint("!! EEPROM readback mismatch!\n"); | |||
dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); | |||
} | |||
} | |||
} |
@ -1,37 +0,0 @@ | |||
/* | |||
Copyright 2020 Álvaro "Gondolindrim" Volpato <alvaro.volpato@usp.br> | |||
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 "quantum.h" | |||
#define ___ KC_NO | |||
#define LAYOUT_all( \ | |||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ | |||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ | |||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ | |||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ | |||
K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ | |||
) { \ | |||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ | |||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ | |||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ | |||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ | |||
{ K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ | |||
} |
@ -1,35 +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 <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_PLLM_VALUE | |||
#undef STM32_PLLN_VALUE | |||
#undef STM32_PLLP_VALUE | |||
#undef STM32_PLLQ_VALUE | |||
#undef STM32_PPRE1 | |||
#undef STM32_PPRE2 | |||
#define STM32_PLLM_VALUE 4 | |||
#define STM32_PLLN_VALUE 168 | |||
#define STM32_PLLP_VALUE 4 | |||
#define STM32_PLLQ_VALUE 7 | |||
#define STM32_PPRE1 STM32_PPRE1_DIV2 | |||
#define STM32_PPRE2 STM32_PPRE2_DIV1 | |||
#undef STM32_I2C_USE_I2C1 | |||
#define STM32_I2C_USE_I2C1 TRUE |
@ -1,9 +0,0 @@ | |||
# Mode M65HI (pre-release Alpha version) | |||
This is the firmware page for the pre-Alpha version of the Mode M65HI PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65hi_alpha` firmware. | |||
This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. | |||
# Needed patches | |||
For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. |
@ -1,24 +0,0 @@ | |||
# MCU name | |||
MCU = STM32F401 | |||
# Bootloader selection | |||
BOOTLOADER = stm32-dfu | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite | |||
MOUSEKEY_ENABLE = no # Mouse keys | |||
EXTRAKEY_ENABLE = yes # Audio control and System control | |||
CONSOLE_ENABLE = no # Console for debug | |||
COMMAND_ENABLE = no # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = no # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
AUDIO_ENABLE = no # Audio output | |||
EEPROM_DRIVER = i2c | |||
# Enter lower-power sleep mode when on the ChibiOS idle thread | |||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE |