forked from smplman/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'dexter93/sn32_up' into HEAD
- Loading branch information
Showing
25 changed files
with
734 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright 2022 Jpe230 | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
#pragma once | ||
|
||
#include "config_common.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"keyboard_name": "Onekey SN32", | ||
"processor": "SN32F248BF", | ||
"bootloader": "sn32-dfu", | ||
"matrix_pins": { | ||
"cols": ["A8"], | ||
"rows": ["D11"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
EEPROM_DRIVER = wear_leveling | ||
WEAR_LEVELING_DRIVER = sn32_flash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# List of all the board related files. | ||
BOARDSRC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240/board.c | ||
|
||
# Required include directories | ||
BOARDINC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240 | ||
|
||
# Optimize for speed | ||
OPT = 2 | ||
|
||
# Shared variables | ||
ALLCSRC += $(BOARDSRC) | ||
ALLINC += $(BOARDINC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/* | ||
* This file was auto-generated by: | ||
* `qmk chibios-confmigrate -i platforms/chibios/boards/SN_SN32F240/configs/chconf.h -r platforms/chibios/boards/common/configs/chconf.h` | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define CH_CFG_ST_TIMEDELTA 0 | ||
|
||
#include_next <chconf.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#ifndef MCUCONF_H | ||
#define MCUCONF_H | ||
|
||
/* | ||
* SN32F24x drivers configuration. | ||
* The following settings override the default settings present in | ||
* the various device driver implementation headers. | ||
* Note that the settings for each driver only have effect if the whole | ||
* driver is enabled in halconf.h. | ||
* | ||
* IRQ priorities: | ||
* 3...0 Lowest...Highest. | ||
* | ||
* DMA priorities: | ||
* 0...3 Lowest...Highest. | ||
*/ | ||
|
||
#define SN32F24x_MCUCONF | ||
#define PLATFORM_MCUCONF | ||
/* | ||
* HAL driver system settings. | ||
*/ | ||
/* | ||
* CT driver system settings. | ||
*/ | ||
#define SN32_HAS_CT16B0 TRUE | ||
#define SN32_HAS_CT16B1 TRUE | ||
|
||
/* | ||
* SN driver system settings. | ||
*/ | ||
#define SN32_HAS_GPIOA TRUE | ||
#define SN32_HAS_GPIOB TRUE | ||
#define SN32_HAS_GPIOC TRUE | ||
#define SN32_HAS_GPIOD TRUE | ||
|
||
/* | ||
* USB driver system settings. | ||
*/ | ||
#define CRT1_AREAS_NUMBER 1 | ||
#define PLATFORM_USB_USE_USB1 TRUE | ||
|
||
/* | ||
* Timer driver system settings. | ||
*/ | ||
#define SYS_CLOCK_SETUP 1 | ||
#define SYS0_CLKCFG_VAL 0 | ||
#define AHB_PRESCALAR 0x2 | ||
#define CLKOUT_SEL_VAL 0x0 | ||
#define CLKOUT_PRESCALAR 0x0 | ||
|
||
#endif /* MCUCONF_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# List of all the board related files. | ||
BOARDSRC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240B/board.c | ||
|
||
# Required include directories | ||
BOARDINC = $(CHIBIOS_CONTRIB)/os/hal/boards/SN_SN32F240B | ||
|
||
# Optimize for speed | ||
OPT = 2 | ||
# Enter lower-power sleep mode when on the ChibiOS idle thread | ||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
# Shave some extra bytes | ||
OPT_DEFS += -DCRT1_AREAS_NUMBER=1 | ||
|
||
# Shared variables | ||
ALLCSRC += $(BOARDSRC) | ||
ALLINC += $(BOARDINC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* 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 platforms/chibios/boards/SN_SN32F240B/configs/chconf.h -r platforms/chibios/boards/common/configs/chconf.h` | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define CH_CFG_ST_FREQUENCY 10000 | ||
|
||
#define CH_CFG_ST_TIMEDELTA 0 | ||
|
||
#include_next <chconf.h> | ||
|
||
#undef CH_CFG_IDLE_ENTER_HOOK | ||
#define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
SN_PMU->CTRL = 4; \ | ||
} | ||
|
||
#undef CH_CFG_IDLE_LEAVE_HOOK | ||
#define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
SN_PMU->CTRL = 0; \ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/* | ||
* This file was auto-generated by: | ||
* `qmk chibios-confmigrate -i platforms/chibios/boards/SN_SN32F240B/configs/halconf.h -r platforms/chibios/boards/common/configs/halconf.h` | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define HAL_USE_PWM TRUE | ||
|
||
#include_next <halconf.h> | ||
|
Oops, something went wrong.