diff --git a/demos/various/SB-CLIENT-32k-08070000-16k-20018000/Makefile b/demos/various/SB-CLIENT-32k-08070000-16k-20018000/Makefile index e8c406553..a6d7fdead 100644 --- a/demos/various/SB-CLIENT-32k-08070000-16k-20018000/Makefile +++ b/demos/various/SB-CLIENT-32k-08070000-16k-20018000/Makefile @@ -103,7 +103,7 @@ include $(CHIBIOS)/os/common/utils/utils.mk # HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/ports/sandbox/platform.mk -#include $(CHIBIOS)/os/hal/boards/ST_STM32L476_DISCOVERY/board.mk +include $(CHIBIOS)/os/hal/boards/SB_GENERIC/board.mk include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk diff --git a/demos/various/SB-CLIENT-32k-08070000-16k-20018000/cfg/board.h b/demos/various/SB-CLIENT-32k-08070000-16k-20018000/cfg/board.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/os/hal/boards/SB_GENERIC/board.c b/os/hal/boards/SB_GENERIC/board.c new file mode 100644 index 000000000..67a3cc132 --- /dev/null +++ b/os/hal/boards/SB_GENERIC/board.c @@ -0,0 +1,98 @@ +/* + ChibiOS - Copyright (C) 2006..2022 Giovanni Di Sirio + + 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. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* CHTODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* CHTODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* CHTODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* CHTODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @note You can add your board-specific code here. + */ +void boardInit(void) { + +} diff --git a/os/hal/boards/SB_GENERIC/board.h b/os/hal/boards/SB_GENERIC/board.h new file mode 100644 index 000000000..b2dee6378 --- /dev/null +++ b/os/hal/boards/SB_GENERIC/board.h @@ -0,0 +1,53 @@ +/* + ChibiOS - Copyright (C) 2006..2022 Giovanni Di Sirio + + 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 for generic Sandbox application board file. + */ + +/* + * Board identifier. + */ +#define BOARD_SB_GENERIC +#define BOARD_NAME "Sandbox application" + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/os/hal/boards/SB_GENERIC/board.mk b/os/hal/boards/SB_GENERIC/board.mk new file mode 100644 index 000000000..02e44c815 --- /dev/null +++ b/os/hal/boards/SB_GENERIC/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/SB_GENERIC/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/SB_GENERIC + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC)