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.
* Added support for WB32 MCU * Modified eeprom_wb32.c * Remove the eeprom_wb32-related code
- Loading branch information
Joy Lee
authored
Nov 26, 2021
1 parent
b04f66f
commit 68838bb
Showing
20 changed files
with
1,763 additions
and
4 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
82 changes: 82 additions & 0 deletions
82
platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.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,82 @@ | ||
/* | ||
Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd | ||
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. */ | ||
/*===========================================================================*/ | ||
|
||
static void wb32_gpio_init(void) { | ||
|
||
#if WB32_HAS_GPIOA | ||
rccEnableAPB1(RCC_APB1ENR_GPIOAEN); | ||
#endif | ||
|
||
#if WB32_HAS_GPIOB | ||
rccEnableAPB1(RCC_APB1ENR_GPIOBEN); | ||
#endif | ||
|
||
#if WB32_HAS_GPIOC | ||
rccEnableAPB1(RCC_APB1ENR_GPIOCEN); | ||
#endif | ||
|
||
#if WB32_HAS_GPIOD | ||
rccEnableAPB1(RCC_APB1ENR_GPIODEN); | ||
#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) { | ||
|
||
wb32_clock_init(); | ||
wb32_gpio_init(); | ||
} | ||
/** | ||
* @brief Board-specific initialization code. | ||
* @note You can add your board-specific code here. | ||
*/ | ||
void boardInit(void) { | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.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,56 @@ | ||
#pragma once | ||
/* | ||
Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd | ||
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. | ||
*/ | ||
|
||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
/*===========================================================================*/ | ||
/* Driver constants. */ | ||
/*===========================================================================*/ | ||
|
||
/* | ||
* Setup board. | ||
*/ | ||
|
||
/* | ||
* Board identifier. | ||
*/ | ||
#define WB32F3G71x9 | ||
#if !defined(WB32F3G71xx) | ||
#define WB32F3G71xx | ||
#endif | ||
|
||
/*===========================================================================*/ | ||
/* External declarations. */ | ||
/*===========================================================================*/ | ||
|
||
#if !defined(_FROM_ASM_) | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
void boardInit(void); | ||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* _FROM_ASM_ */ | ||
|
||
#endif /* BOARD_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 @@ | ||
# List of all the board related files. | ||
BOARDSRC = $(BOARD_PATH)/board/board.c | ||
|
||
# Required include directories | ||
BOARDINC = $(BOARD_PATH)/board | ||
|
||
# Shared variables | ||
ALLCSRC += $(BOARDSRC) | ||
ALLINC += $(BOARDINC) |
12 changes: 12 additions & 0 deletions
12
platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/bootloader_defs.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,12 @@ | ||
/* Address for jumping to bootloader on WB32 chips. */ | ||
/* It is chip dependent, the correct number can be looked up here: | ||
* http://www.westberrytech.com/down/mcu/data/WB32F3G71xx_rm.pdf | ||
*/ | ||
#ifndef WB32_BOOTLOADER_ADDRESS | ||
# undef STM32_BOOTLOADER_ADDRESS | ||
# define WB32_BOOTLOADER_ADDRESS 0x1FFFE000 | ||
# define STM32_BOOTLOADER_ADDRESS WB32_BOOTLOADER_ADDRESS | ||
#else | ||
# undef STM32_BOOTLOADER_ADDRESS | ||
# define STM32_BOOTLOADER_ADDRESS WB32_BOOTLOADER_ADDRESS | ||
#endif |
Oops, something went wrong.