From 51816f876b1793f7d16f2aa517c79b8b1758fcf5 Mon Sep 17 00:00:00 2001 From: FinistClearFalcon <87674658+FinistClearFalcon@users.noreply.github.com> Date: Thu, 15 Sep 2022 23:41:23 +0400 Subject: [PATCH] Chibi 21 (#4582) * Update ChibiOS config file. * Fix build crash --- .../binary/tunerstudio_io_serial_ports.cpp | 1 + simulator/chconf.h | 41 ------ simulator/halconf.h | 130 +----------------- 3 files changed, 2 insertions(+), 170 deletions(-) diff --git a/firmware/console/binary/tunerstudio_io_serial_ports.cpp b/firmware/console/binary/tunerstudio_io_serial_ports.cpp index 87eda9eb58..0edc7e5ab6 100644 --- a/firmware/console/binary/tunerstudio_io_serial_ports.cpp +++ b/firmware/console/binary/tunerstudio_io_serial_ports.cpp @@ -15,6 +15,7 @@ #endif // HW_HELLEN // These may not be defined due to the HAL, but they're necessary for the compiler to do it's magic +class UARTDriver; class UartDmaTsChannel; class UartTsChannel; class SerialTsChannel; diff --git a/simulator/chconf.h b/simulator/chconf.h index 32d04c13f9..68dd079ccb 100644 --- a/simulator/chconf.h +++ b/simulator/chconf.h @@ -51,27 +51,6 @@ /** @} */ -/** - * @brief Handling of instances. - * @note If enabled then threads assigned to various instances can - * interact each other using the same synchronization objects. - * If disabled then each OS instance is a separate world, no - * direct interactions are handled by the OS. - */ -#if !defined(CH_CFG_SMP_MODE) -#define CH_CFG_SMP_MODE FALSE -#endif - -/** - * @brief Time Stamps APIs. - * @details If enabled then the time stamps APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_TIMESTAMP) -#define CH_CFG_USE_TIMESTAMP TRUE -#endif - /*===========================================================================*/ /** * @name System timers settings @@ -610,9 +589,6 @@ #define CH_DBG_SYSTEM_STATE_CHECK TRUE #endif - #define ON_LOCK_HOOK - #define ON_UNLOCK_HOOK - /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -710,13 +686,6 @@ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ /* Add system custom fields here.*/ -/** - * @brief OS instance structure extension. - * @details User fields added to the end of the @p os_instance_t structure. - */ -#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ - /* Add OS instance custom fields here.*/ - /** * @brief System initialization hook. * @details User initialization code added to the @p chSysInit() function @@ -742,15 +711,6 @@ /* Add OS instance initialization code here.*/ \ } -/** - * @brief OS instance initialization hook. - * - * @param[in] oip pointer to the @p os_instance_t structure - */ -#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ - /* Add OS instance initialization code here.*/ \ -} - /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. @@ -857,7 +817,6 @@ /* System halt code here.*/ \ printf("chSysHalt: %s\r\n", reason); \ exit(-1); \ - /* chDbgPanic3(reason, __FILE__, __LINE__); */ \ } /** diff --git a/simulator/halconf.h b/simulator/halconf.h index 20f9e3b3f9..4e87eaabce 100644 --- a/simulator/halconf.h +++ b/simulator/halconf.h @@ -51,7 +51,7 @@ * @brief Enables the CAN subsystem. */ #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN !EFI_SIM_IS_WINDOWS +#define HAL_USE_CAN TRUE /* !EFI_SIM_IS_WINDOWS */ #endif /** @@ -173,13 +173,6 @@ #define HAL_USE_TRNG FALSE #endif -/** - * @brief Enables the TRNG subsystem. - */ -#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -#define HAL_USE_TRNG FALSE -#endif - /** * @brief Enables the UART subsystem. */ @@ -308,55 +301,6 @@ #define DAC_USE_MUTUAL_EXCLUSION FALSE #endif -/** - * @brief Enforces the driver to use direct callbacks rather than OSAL events. - */ -#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) -#define CAN_ENFORCE_USE_CALLBACKS FALSE -#endif - -/*===========================================================================*/ -/* CRY driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the SW fall-back of the cryptographic driver. - * @details When enabled, this option, activates a fall-back software - * implementation for algorithms not supported by the underlying - * hardware. - * @note Fall-back implementations may not be present for all algorithms. - */ -#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_USE_FALLBACK FALSE -#endif - -/** - * @brief Makes the driver forcibly use the fall-back implementations. - */ -#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_ENFORCE_FALLBACK FALSE -#endif - -/*===========================================================================*/ -/* DAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) -#define DAC_USE_WAIT FALSE -#endif - -/** - * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define DAC_USE_MUTUAL_EXCLUSION FALSE -#endif - /*===========================================================================*/ /* I2C driver related settings. */ /*===========================================================================*/ @@ -447,20 +391,6 @@ #define SDC_INIT_OCR 0x80100000U #endif -/** - * @brief OCR initialization constant for V20 cards. - */ -#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) -#define SDC_INIT_OCR_V20 0x50FF8000U -#endif - -/** - * @brief OCR initialization constant for non-V20 cards. - */ -#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) -#define SDC_INIT_OCR 0x80100000U -#endif - /*===========================================================================*/ /* SERIAL driver related settings. */ /*===========================================================================*/ @@ -528,49 +458,6 @@ #define SERIAL_USB_BUFFERS_NUMBER 2 #endif -/*===========================================================================*/ -/* SIO driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SIO_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Support for thread synchronization API. - */ -#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) -#define SIO_USE_SYNCHRONIZATION FALSE -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/** - * @brief Serial over USB number of buffers. - * @note The default is 2 buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 -#endif - /*===========================================================================*/ /* SPI driver related settings. */ /*===========================================================================*/ @@ -590,13 +477,6 @@ #define SPI_USE_ASSERT_ON_ERROR TRUE #endif -/** - * @brief Inserts an assertion on function errors before returning. - */ -#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__) -#define SPI_USE_ASSERT_ON_ERROR TRUE -#endif - /** * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @note Disabling this option saves both code and data space. @@ -613,14 +493,6 @@ #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD #endif -/** - * @brief Handling method for SPI CS line. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD -#endif - /*===========================================================================*/ /* UART driver related settings. */ /*===========================================================================*/