qmk_sweep_skeletyl/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.c
Reza Jelveh 8e8803459f
Updated Ducky 2 one mini support (#11112)
* Initial Ducky One 2 Mini keyboard and keymap

* Keymap macro issue, together with general polish suggestions

* Separate default keymap into proper default, iso and ansi versions

* info.json updates (Configurator support). DEBOUNCE define adjust.

* Unused keymap defines removed.

* update requested ducky one mini2 board changes

* ducky: don't trigger app key with left shift

* ducky: make default mouse key behavior more linear

* ducky: add GRAVE_ESC_GUI_OVERRIDE to allow for win+esc to work

* ducky: playpause on fn space

* ducky: disable RGB_MATRIX until driver is merged

* ducky: clang-format matrix and one2mini.c

* ducky: update requested changes

Remove WFI_IDLE since it's already in the rules.mk CORTEX_ENABLE_WFI_IDLE=TRUE

* ducky: update requested changes

* ducky: move winkey grave esc to default keymap

* ducky: remove dipswitch from keymap and use DIP_SWITCH_MATRIX_GRID instead

* ducky: info.json lint

* ducky: enable DIP_SWITCH_ENABLE rule

* ducky: update readme

* ducky: fix backslash on default keymap

* ducky: remove unused USB_LED_CAPSLOCK_INDEX 28

* ducky: move mbi5042 led driver to ducky keyboard

* ducky: cosmetics

* ducky: requested changes

* ducky: refactor matrix.c again so we can better compare it to other boards

* ducky: remove bootmagic_lite as the boards bootloader trigger is actually handled in its own bootloader

* ducky: remove custom matrix

* ducky: update for chibios-contrib changes

* ducky: debug new USB driver

* ducky: debug usb issues

* ducky: update chibios version

* ducky: remove halconf.h

* ducky: update rules.mk

* ducky: update chconf.h

* Matching submodules.

* Restructure to explicitly define which board is in use, remove RGB driver pending followup PR.

* Revert "Matching submodules."

This reverts commit 2fbb34e0c63ea67ee09d2e2d525723c01431d1cd.

Co-authored-by: GitWellBack <48095880+GitWellBack@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-08-04 20:35:17 +10:00

57 lines
2.1 KiB
C

/*
ChibiOS Driver element - Copyright (C) 2019 /u/KeepItUnder
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.
*/
#include "hal.h"
#if HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @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.
*/
const PALConfig pal_default_config = {
# if NUC123_HAS_GPIOA
{VAL_GPIOA_PMD, VAL_GPIOA_OFFD, VAL_GPIOA_DMASK, VAL_GPIOA_DBEN, VAL_GPIOA_IMD, VAL_GPIOA_IEN, VAL_GPIOA_ISRC, VAL_GPIOA_DOUT},
# endif
# if NUC123_HAS_GPIOB
{VAL_GPIOB_PMD, VAL_GPIOB_OFFD, VAL_GPIOB_DMASK, VAL_GPIOB_DBEN, VAL_GPIOB_IMD, VAL_GPIOB_IEN, VAL_GPIOB_ISRC, VAL_GPIOB_DOUT},
# endif
# if NUC123_HAS_GPIOC
{VAL_GPIOC_PMD, VAL_GPIOC_OFFD, VAL_GPIOC_DMASK, VAL_GPIOC_DBEN, VAL_GPIOC_IMD, VAL_GPIOC_IEN, VAL_GPIOC_ISRC, VAL_GPIOC_DOUT},
# endif
# if NUC123_HAS_GPIOD
{VAL_GPIOD_PMD, VAL_GPIOD_OFFD, VAL_GPIOD_DMASK, VAL_GPIOD_DBEN, VAL_GPIOD_IMD, VAL_GPIOD_IEN, VAL_GPIOD_ISRC, VAL_GPIOD_DOUT},
# endif
# if NUC123_HAS_GPIOF
{VAL_GPIOF_PMD, VAL_GPIOF_OFFD, VAL_GPIOF_DMASK, VAL_GPIOF_DBEN, VAL_GPIOF_IMD, VAL_GPIOF_IEN, VAL_GPIOF_ISRC, VAL_GPIOF_DOUT},
# endif
};
#endif
/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
NUC123_clock_init();
}
/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {}