diff --git a/os/hal/templates/adc_lld.h b/os/hal/templates/adc_lld.h index c7b4ca9cf..245a55c2a 100644 --- a/os/hal/templates/adc_lld.h +++ b/os/hal/templates/adc_lld.h @@ -167,12 +167,12 @@ struct ADCDriver { Thread *thread; #endif #if ADC_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__) -#if CH_USE_MUTEXES || defined(__DOXYGEN__) +#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) /** * @brief Mutex protecting the peripheral. */ Mutex mutex; -#elif CH_USE_SEMAPHORES +#elif CH_CFG_USE_SEMAPHORES Semaphore semaphore; #endif #endif /* ADC_USE_MUTUAL_EXCLUSION */ diff --git a/os/hal/templates/i2c_lld.h b/os/hal/templates/i2c_lld.h index 83da65c11..59835a6fd 100644 --- a/os/hal/templates/i2c_lld.h +++ b/os/hal/templates/i2c_lld.h @@ -102,12 +102,12 @@ struct I2CDriver { */ i2cflags_t errors; #if I2C_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__) -#if CH_USE_MUTEXES || defined(__DOXYGEN__) +#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) /** * @brief Mutex protecting the bus. */ Mutex mutex; -#elif CH_USE_SEMAPHORES +#elif CH_CFG_USE_SEMAPHORES Semaphore semaphore; #endif #endif /* I2C_USE_MUTUAL_EXCLUSION */ diff --git a/os/hal/templates/spi_lld.h b/os/hal/templates/spi_lld.h index 690054f43..c839daf5e 100644 --- a/os/hal/templates/spi_lld.h +++ b/os/hal/templates/spi_lld.h @@ -103,12 +103,12 @@ struct SPIDriver { Thread *thread; #endif /* SPI_USE_WAIT */ #if SPI_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__) -#if CH_USE_MUTEXES || defined(__DOXYGEN__) +#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__) /** * @brief Mutex protecting the bus. */ Mutex mutex; -#elif CH_USE_SEMAPHORES +#elif CH_CFG_USE_SEMAPHORES Semaphore semaphore; #endif #endif /* SPI_USE_MUTUAL_EXCLUSION */ diff --git a/test/testsem.c b/test/testsem.c index 9483a75d6..d73a5e11b 100644 --- a/test/testsem.c +++ b/test/testsem.c @@ -188,7 +188,6 @@ ROMCONST struct testcase testsem2 = { sem2_execute }; -#if CH_CFG_USE_SEMSW || defined(__DOXYGEN__) /** * @page test_sem_003 Atomic signal-wait test * @@ -232,7 +231,6 @@ ROMCONST struct testcase testsem3 = { NULL, sem3_execute }; -#endif /* CH_CFG_USE_SEMSW */ /** * @page test_sem_004 Binary Wait and Signal @@ -293,9 +291,7 @@ ROMCONST struct testcase * ROMCONST patternsem[] = { #if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__) &testsem1, &testsem2, -#if CH_CFG_USE_SEMSW || defined(__DOXYGEN__) &testsem3, -#endif &testsem4, #endif NULL