forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qmk#10 from zhaqian12/air32_protocol_test
Merge branch air32_protocol_test
- Loading branch information
Showing
24 changed files
with
891 additions
and
14 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
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 "board.h" | ||
|
||
#undef AIR32_HSECLK | ||
#define AIR32_HSECLK 8000000 | ||
|
||
#undef AIR32F103xB | ||
#define AIR32F103xC |
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,24 @@ | ||
/* Copyright 2020 QMK | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define CH_CFG_ST_FREQUENCY 10000 | ||
|
||
#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,54 @@ | ||
/* Copyright 2021 ZhaQian | ||
* | ||
* 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" | ||
|
||
#define MATRIX_COL_PINS { A9, A0, B15, B14, B13 } | ||
#define MATRIX_ROW_PINS { A10, B6, C14 } | ||
#define UNUSED_PINS | ||
|
||
#ifdef RGB_MATRIX_ENABLE | ||
#define RGB_DI_PIN B3 | ||
#define WS2812_PWM_DRIVER PWMD2 | ||
#define WS2812_PWM_CHANNEL 2 | ||
#define WS2812_PWM_PAL_MODE 2 | ||
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 | ||
#define WS2812_DMA_CHANNEL 2 | ||
#endif | ||
|
||
#ifdef ENCODER_ENABLE | ||
#define ENCODERS_PAD_A { B1 } | ||
#define ENCODERS_PAD_B { B3 } | ||
#define ENCODER_RESOLUTIONS { 4 } | ||
#ifdef ENCODER_TRIGGER_ENABLE | ||
#define ENCODER_PAD_A_KEY_POS {4, 1} | ||
#define ENCODER_PAD_B_KEY_POS {4, 2} | ||
#endif | ||
#endif | ||
|
||
#ifdef UNDERGLOW_RGB_MATRIX_ENABLE | ||
#undef UG_RGB_MATRIX_ANIMATIONS | ||
#define UG_RGB_MATRIX_CYCLEOUTIN | ||
#undef UG_RGB_MATRIX_WPM_ANIMATIONS | ||
#endif | ||
// #define DEBUG_EEPROM_OUTPUT | ||
#define DEBUG_MATRIX_SCAN_RATE | ||
|
||
// #define SERIAL_DRIVER SD2 | ||
// #define SD1_TX_PIN A2 | ||
// #define SD1_RX_PIN A3 |
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,11 @@ | ||
MCU = AIR32F103 | ||
MCU_LDSCRIPT = AIR32F103xCuf2 | ||
FIRMWARE_FORMAT = uf2 | ||
|
||
BOOTLOADER = custom | ||
|
||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
|
||
SRC += uf2_boot.c | ||
|
||
|
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,30 @@ | ||
/* Copyright 2022 ZhaQian | ||
* | ||
* 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 "bootloader.h" | ||
|
||
#include <ch.h> | ||
|
||
#define MAGIC_BOOT 0x544F4F42UL | ||
#define MAGIC_REG *(volatile uint32_t*)0x20004000 | ||
|
||
void bootloader_jump(void) { | ||
MAGIC_REG = MAGIC_BOOT; | ||
NVIC_SystemReset(); | ||
} | ||
|
||
void enter_bootloader_mode_if_requested(void) {} | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
BOOTMAGIC_ENABLE = yes | ||
MOUSEKEY_ENABLE = yes | ||
EXTRAKEY_ENABLE = yes | ||
CONSOLE_ENABLE = no | ||
CONSOLE_ENABLE = yes | ||
COMMAND_ENABLE = no | ||
NKRO_ENABLE = yes |
Submodule chibios-contrib
updated
from 456890 to 09309b
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,73 @@ | ||
/* | ||
Copyright (C) | ||
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. | ||
*/ | ||
|
||
/* | ||
* This file has been automatically generated using ChibiStudio board | ||
* generator plugin. Do not edit manually. | ||
*/ | ||
|
||
#include "hal.h" | ||
/*===========================================================================*/ | ||
/* Driver local definitions. */ | ||
/*===========================================================================*/ | ||
|
||
/*===========================================================================*/ | ||
/* Driver exported variables. */ | ||
/*===========================================================================*/ | ||
|
||
/*===========================================================================*/ | ||
/* Driver local variables and types. */ | ||
/*===========================================================================*/ | ||
|
||
/*===========================================================================*/ | ||
/* Driver local functions. */ | ||
/*===========================================================================*/ | ||
|
||
/** | ||
* @brief PAL setup. | ||
* @details Digital I/O ports static configuration as defined in @p board.h. | ||
* This variable is used by the HAL when initializing the PAL driver. | ||
*/ | ||
#if HAL_USE_PAL || defined(__DOXYGEN__) | ||
const PALConfig pal_default_config = | ||
{ | ||
{VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, | ||
{VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, | ||
{VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, | ||
{VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, | ||
}; | ||
#endif | ||
|
||
/*===========================================================================*/ | ||
/* Driver interrupt handlers. */ | ||
/*===========================================================================*/ | ||
|
||
/*===========================================================================*/ | ||
/* Driver exported functions. */ | ||
/*===========================================================================*/ | ||
/* | ||
* Early initialization code. | ||
* This initialization must be performed just after stack setup and before | ||
* any other initialization. | ||
*/ | ||
void __early_init(void) { | ||
// enter_bootloader_mode_if_requested(); | ||
air32_clock_init(); | ||
} | ||
/** | ||
* @brief Board-specific initialization code. | ||
* @note You can add your board-specific code here. | ||
*/ | ||
void boardInit(void) { | ||
|
||
} |
Oops, something went wrong.