Leftover early initialisation conversions (#11615)

* jm60

* ergodox_stm32

* F042 bootloader jumps.

* xiaomi/mk02 custom bootloader, no early-init bootloader jump for F072.

* matrix/m20add, matrix/noah
master
Nick Brassel 2021-01-20 00:23:07 +11:00 committed by GitHub
parent d668fd3977
commit d85b27bbbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 22 additions and 16 deletions

View File

@ -19,6 +19,8 @@
#include "config_common.h" #include "config_common.h"
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x16D0 #define VENDOR_ID 0x16D0
#define PRODUCT_ID 0x0F95 #define PRODUCT_ID 0x0F95
@ -33,7 +35,7 @@
#define MATRIX_ROWS 4 #define MATRIX_ROWS 4
#define MATRIX_COLS 13 #define MATRIX_COLS 13
#define MATRIX_ROW_PINS { A0, A15, B5, B6 } #define MATRIX_ROW_PINS { A0, A15, B5, B6 }
#define MATRIX_COL_PINS { B8, B4, B3, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1 } #define MATRIX_COL_PINS { B8, B4, B3, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1 }
#define UNUSED_PINS #define UNUSED_PINS

View File

@ -19,6 +19,8 @@
#include "config_common.h" #include "config_common.h"
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x16D0 #define VENDOR_ID 0x16D0
#define PRODUCT_ID 0x0F95 #define PRODUCT_ID 0x0F95
@ -33,7 +35,7 @@
#define MATRIX_ROWS 4 #define MATRIX_ROWS 4
#define MATRIX_COLS 13 #define MATRIX_COLS 13
#define MATRIX_ROW_PINS { A0, A15, B5, B6 } #define MATRIX_ROW_PINS { A0, A15, B5, B6 }
#define MATRIX_COL_PINS { B7, B4, B3, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1 } #define MATRIX_COL_PINS { B7, B4, B3, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1 }
#define UNUSED_PINS #define UNUSED_PINS

View File

@ -46,6 +46,4 @@ void __early_init(void) {
* Board-specific initialization code. * Board-specific initialization code.
*/ */
void boardInit(void) { void boardInit(void) {
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
} }

View File

@ -12,6 +12,10 @@ extern inline void ergodox_led_all_off(void);
volatile int mcp23017_status = 0x20; volatile int mcp23017_status = 0x20;
uint8_t i2c_initializied = 0; uint8_t i2c_initializied = 0;
void board_init(void) {
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
}
void matrix_init_kb(void) void matrix_init_kb(void)
{ {
// Init LED Ports // Init LED Ports

View File

@ -46,6 +46,4 @@ void __early_init(void) {
* Board-specific initialization code. * Board-specific initialization code.
*/ */
void boardInit(void) { void boardInit(void) {
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
} }

View File

@ -16,3 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "jm60.h" #include "jm60.h"
void board_init(void) {
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
}

View File

@ -208,8 +208,6 @@ static void stm32_gpio_init(void) {
* else. * else.
*/ */
void __early_init(void) { void __early_init(void) {
extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
stm32_gpio_init(); stm32_gpio_init();
stm32_clock_init(); stm32_clock_init();

View File

@ -5,6 +5,8 @@
#pragma once #pragma once
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x4D58 // MX #define VENDOR_ID 0x4D58 // MX
#define PRODUCT_ID 0x20AD // 8XV2.0 Additional #define PRODUCT_ID 0x20AD // 8XV2.0 Additional
@ -94,5 +96,3 @@
#define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_1 0b1110100
#define DRIVER_COUNT 1 #define DRIVER_COUNT 1
#define DRIVER_LED_TOTAL RGBLED_NUM #define DRIVER_LED_TOTAL RGBLED_NUM
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE // disable jump to system bootloader

View File

@ -208,8 +208,6 @@ static void stm32_gpio_init(void) {
* else. * else.
*/ */
void __early_init(void) { void __early_init(void) {
extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
stm32_gpio_init(); stm32_gpio_init();
stm32_clock_init(); stm32_clock_init();

View File

@ -5,6 +5,8 @@
#pragma once #pragma once
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x4D58 // MX #define VENDOR_ID 0x4D58 // MX
#define PRODUCT_ID 0x0065 // noah 65 #define PRODUCT_ID 0x0065 // noah 65

View File

@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x6166 // af #define VENDOR_ID 0x6166 // af
#define PRODUCT_ID 0x0010 #define PRODUCT_ID 0x0010

View File

@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once #pragma once
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0B91 #define PRODUCT_ID 0x0B91

View File

@ -202,16 +202,12 @@ static void stm32_gpio_init(void) {
/* Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {}
/** /**
* @brief Early initialization code. * @brief Early initialization code.
* @details GPIO ports and system clocks are initialized before everything * @details GPIO ports and system clocks are initialized before everything
* else. * else.
*/ */
void __early_init(void) { void __early_init(void) {
enter_bootloader_mode_if_requested();
stm32_gpio_init(); stm32_gpio_init();
stm32_clock_init(); stm32_clock_init();
} }