Skip to content

Commit

Permalink
kin80 (#16754)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Brassel <nick@tzarc.org>
  • Loading branch information
DmNosachev and tzarc authored Apr 19, 2022
1 parent 499060a commit 83709e7
Show file tree
Hide file tree
Showing 38 changed files with 1,569 additions and 0 deletions.
25 changes: 25 additions & 0 deletions keyboards/kin80/blackpill103/blackpill103.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2022 DmNosachev
*
* 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 "blackpill103.h"

void matrix_init_kb(void) {
/* LED pins setup */
setPinOutput(LED4_PIN);
writePinLow(LED4_PIN);

matrix_init_user();
}
19 changes: 19 additions & 0 deletions keyboards/kin80/blackpill103/blackpill103.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Copyright 2022 DmNosachev
*
* 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 "kin80.h"
28 changes: 28 additions & 0 deletions keyboards/kin80/blackpill103/chconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/chconf.h -r platforms/chibios/common/configs/chconf.h`
*/

#pragma once

#define CH_CFG_ST_TIMEDELTA 0

#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE

#include_next <chconf.h>
35 changes: 35 additions & 0 deletions keyboards/kin80/blackpill103/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Copyright 2022 DmNosachev
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 DEVICE_VER 0x0002

#undef MATRIX_ROW_PINS
#undef MATRIX_COL_PINS

//v.1.0
//#define MATRIX_ROW_PINS { B8, B9, C13, B7, B6, B4, B3 }
//v.1.1
#define MATRIX_ROW_PINS { B8, B9, C13, B7, B6, B5, B4 }
#define MATRIX_COL_PINS { A6, A7, B0, B1, B10, B11, A0, A1, A2, A3, A4, A5 }

#define LED_PIN_ON_STATE 0
#define LED_NUM_LOCK_PIN B14
#define LED_CAPS_LOCK_PIN B13
#define LED_SCROLL_LOCK_PIN B15
#define LED4_PIN A8
26 changes: 26 additions & 0 deletions keyboards/kin80/blackpill103/halconf.h
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/halconf.h -r platforms/chibios/common/configs/halconf.h`
*/

#pragma once

#define HAL_USE_PWM TRUE

#include_next <halconf.h>
30 changes: 30 additions & 0 deletions keyboards/kin80/blackpill103/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
*/

#pragma once

#include_next <mcuconf.h>

#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE

#undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 FALSE
8 changes: 8 additions & 0 deletions keyboards/kin80/blackpill103/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# MCU name
MCU = STM32F103

# Bootloader selection
BOOTLOADER = stm32duino

# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
25 changes: 25 additions & 0 deletions keyboards/kin80/blackpill401/blackpill401.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2022 DmNosachev
*
* 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 "blackpill401.h"

void matrix_init_kb(void) {
/* LED pins setup */
setPinOutput(LED4_PIN);
writePinLow(LED4_PIN);

matrix_init_user();
}
19 changes: 19 additions & 0 deletions keyboards/kin80/blackpill401/blackpill401.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Copyright 2022 DmNosachev
*
* 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 "kin80.h"
32 changes: 32 additions & 0 deletions keyboards/kin80/blackpill401/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright 2022 DmNosachev
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 DEVICE_VER 0x0003

#undef MATRIX_ROW_PINS
#undef MATRIX_COL_PINS

#define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A8, B5 }
#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A5, A6, A7, B0, B1, B10 }

#define LED_PIN_ON_STATE 0
#define LED_NUM_LOCK_PIN B4
#define LED_CAPS_LOCK_PIN C13
#define LED_SCROLL_LOCK_PIN B3
#define LED4_PIN A15
28 changes: 28 additions & 0 deletions keyboards/kin80/blackpill401/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/blackpill_f401/halconf.h -r platforms/chibios/common/configs/halconf.h`
*/

#pragma once

#define HAL_USE_I2C TRUE

#define HAL_USE_PWM TRUE

#include_next <halconf.h>
25 changes: 25 additions & 0 deletions keyboards/kin80/blackpill401/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2020 Nick Brassel (tzarc)
*
* 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 3 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 <https://www.gnu.org/licenses/>.
*/

#pragma once

#include_next "mcuconf.h"

#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE

#undef STM32_PWM_USE_TIM5
#define STM32_PWM_USE_TIM5 TRUE
7 changes: 7 additions & 0 deletions keyboards/kin80/blackpill401/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MCU name
MCU = STM32F401

# Bootloader selection
BOOTLOADER = stm32-dfu

KEYBOARD_SHARED_EP = yes
26 changes: 26 additions & 0 deletions keyboards/kin80/blackpill411/blackpill411.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Copyright 2022 DmNosachev
*
* 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 "blackpill411.h"

void matrix_init_kb(void) {
/* LED pins setup */
setPinOutput(LED4_PIN);
writePinLow(LED4_PIN);

matrix_init_user();
}

19 changes: 19 additions & 0 deletions keyboards/kin80/blackpill411/blackpill411.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Copyright 2022 DmNosachev
*
* 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 "kin80.h"
32 changes: 32 additions & 0 deletions keyboards/kin80/blackpill411/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright 2022 DmNosachev
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 DEVICE_VER 0x0003

#undef MATRIX_ROW_PINS
#undef MATRIX_COL_PINS

#define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A8, B5 }
#define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A5, A6, A7, B0, B1, B10 }

#define LED_PIN_ON_STATE 0
#define LED_NUM_LOCK_PIN B4
#define LED_CAPS_LOCK_PIN C13
#define LED_SCROLL_LOCK_PIN B3
#define LED4_PIN A15
Loading

0 comments on commit 83709e7

Please sign in to comment.