/* * Copyright (c) 2022, Erich Styger * * SPDX-License-Identifier: BSD-3-Clause */ #include "platform.h" #include "buttons.h" #include "buttons_config.h" #include #include "McuButton.h" #include "McuRTOS.h" #include "McuLED.h" #include "leds.h" #include "debounce.h" #if McuLib_CONFIG_CPU_IS_KINETIS #include "fsl_port.h" #elif McuLib_CONFIG_CPU_IS_LPC #include "fsl_pint.h" #include "fsl_syscon.h" #endif #if configUSE_SEGGER_SYSTEM_VIEWER_HOOKS #include "McuSystemView.h" #endif typedef struct BTN_Desc_t { McuBtn_Handle_t handle; /* handle of button pin */ } BTN_Desc_t; static BTN_Desc_t BTN_Infos[BTN_NOF_BUTTONS]; bool BTN_IsPressed(BTN_Buttons_e btn) { assert(btn