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.
- Loading branch information
Showing
13 changed files
with
702 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"keyboard_name": "Onekey Nucleo H723ZG", | ||
"processor": "STM32H723", | ||
"bootloader": "stm32-dfu", | ||
"matrix_pins": { | ||
"cols": ["A9"], | ||
"rows": ["A10"] | ||
}, | ||
"backlight": { | ||
"pin": "B8" | ||
}, | ||
"ws2812": { | ||
"pin": "A0" | ||
}, | ||
"apa102": { | ||
"data_pin": "A0", | ||
"clock_pin": "B13" | ||
} | ||
} |
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,5 @@ | ||
# ST Microelectronics Nucleo144-H723 onekey | ||
|
||
Supported Hardware: <https://www.st.com/en/evaluation-tools/nucleo-h723zg.html> | ||
|
||
To trigger keypress, short together pins *A9* and *A10*. |
Empty file.
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
12 changes: 12 additions & 0 deletions
12
platforms/chibios/boards/GENERIC_STM32_H723XG/board/board.mk
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)/os/hal/boards/ST_NUCLEO144_H723ZG/board.c | ||
|
||
# Extra files | ||
BOARDSRC += $(BOARD_PATH)/board/extra.c | ||
|
||
# Required include directories | ||
BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_H723ZG | ||
|
||
# Shared variables | ||
ALLCSRC += $(BOARDSRC) | ||
ALLINC += $(BOARDINC) |
36 changes: 36 additions & 0 deletions
36
platforms/chibios/boards/GENERIC_STM32_H723XG/board/extra.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,36 @@ | ||
// Copyright 2023 Nick Brassel (@tzarc) | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#include <hal.h> | ||
#define BOOTLOADER_MAGIC 0xDEADBEEF | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// Different signalling for bootloader entry | ||
// - RAM is cleared on reset, so we can't use the usual __ram0_end__ symbol. | ||
// - Use backup registers in the RTC peripheral to store the magic value instead. | ||
|
||
static inline void enable_backup_register_access(void) { | ||
PWR->CR1 |= PWR_CR1_DBP; | ||
} | ||
|
||
static inline void disable_backup_register_access(void) { | ||
PWR->CR1 &= ~PWR_CR1_DBP; | ||
} | ||
|
||
void bootloader_marker_enable(void) { | ||
enable_backup_register_access(); | ||
RTC->BKP0R = BOOTLOADER_MAGIC; | ||
disable_backup_register_access(); | ||
} | ||
|
||
bool bootloader_marker_active(void) { | ||
enable_backup_register_access(); | ||
bool ret = RTC->BKP0R == BOOTLOADER_MAGIC; | ||
disable_backup_register_access(); | ||
return ret; | ||
} | ||
|
||
void bootloader_marker_disable(void) { | ||
enable_backup_register_access(); | ||
RTC->BKP0R = 0; | ||
disable_backup_register_access(); | ||
} |
9 changes: 9 additions & 0 deletions
9
platforms/chibios/boards/GENERIC_STM32_H723XG/configs/config.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 @@ | ||
// Copyright 2023 Nick Brassel (@tzarc) | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#define USB_DRIVER USBD2 | ||
|
||
#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP | ||
# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE | ||
#endif |
Oops, something went wrong.