From cb565d0734615184aa74eb76981e55ff2aaebd35 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 19 Dec 2009 10:08:08 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1441 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/adc_lld.h | 10 +++++++++- os/hal/templates/can_lld.h | 8 ++++++++ os/hal/templates/mac_lld.h | 12 ++++++++++++ os/hal/templates/meta/driver_lld.h | 4 ++++ os/hal/templates/pwm_lld.h | 4 ++++ os/hal/templates/serial_lld.h | 6 +++++- os/hal/templates/spi_lld.h | 8 ++++++++ 7 files changed, 50 insertions(+), 2 deletions(-) (limited to 'os/hal/templates') diff --git a/os/hal/templates/adc_lld.h b/os/hal/templates/adc_lld.h index 2ebbc9cf5..701ac14cd 100644 --- a/os/hal/templates/adc_lld.h +++ b/os/hal/templates/adc_lld.h @@ -29,14 +29,22 @@ #if CH_HAL_USE_ADC || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ /*===========================================================================*/ -/* Driver constants. */ +/* Derived constants and error checks. */ /*===========================================================================*/ +#if !CH_USE_SEMAPHORES +#error "the ADC driver requires CH_USE_SEMAPHORES" +#endif + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/templates/can_lld.h b/os/hal/templates/can_lld.h index 5b41536e1..b70c839be 100644 --- a/os/hal/templates/can_lld.h +++ b/os/hal/templates/can_lld.h @@ -56,6 +56,14 @@ #define CAN_USE_SLEEP_MODE FALSE #endif /* !CAN_SUPPORTS_SLEEP */ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +#if !CH_USE_SEMAPHORES || !CH_USE_EVENTS +#error "the ADC driver requires CH_USE_SEMAPHORES and CH_USE_EVENTS" +#endif + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/templates/mac_lld.h b/os/hal/templates/mac_lld.h index 41cef6dba..616b24512 100644 --- a/os/hal/templates/mac_lld.h +++ b/os/hal/templates/mac_lld.h @@ -29,6 +29,10 @@ #if CH_HAL_USE_MAC || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -54,6 +58,14 @@ #define MAC_BUFFERS_SIZE 1518 #endif +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +#if !CH_USE_SEMAPHORES || !CH_USE_EVENTS +#error "the MAC driver requires CH_USE_SEMAPHORES and CH_USE_EVENTS" +#endif + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/templates/meta/driver_lld.h b/os/hal/templates/meta/driver_lld.h index ba85041e8..e066ce1a6 100644 --- a/os/hal/templates/meta/driver_lld.h +++ b/os/hal/templates/meta/driver_lld.h @@ -37,6 +37,10 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/templates/pwm_lld.h b/os/hal/templates/pwm_lld.h index 41f8a5ac7..0ee02824e 100644 --- a/os/hal/templates/pwm_lld.h +++ b/os/hal/templates/pwm_lld.h @@ -42,6 +42,10 @@ #define PWM_CHANNELS 1 #endif +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ diff --git a/os/hal/templates/serial_lld.h b/os/hal/templates/serial_lld.h index 43ba1bdda..6457c240a 100644 --- a/os/hal/templates/serial_lld.h +++ b/os/hal/templates/serial_lld.h @@ -29,12 +29,16 @@ #if CH_HAL_USE_SERIAL || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ /*===========================================================================*/ -/* Driver constants. */ +/* Derived constants and error checks. */ /*===========================================================================*/ /*===========================================================================*/ diff --git a/os/hal/templates/spi_lld.h b/os/hal/templates/spi_lld.h index 0bdeee018..8284a871b 100644 --- a/os/hal/templates/spi_lld.h +++ b/os/hal/templates/spi_lld.h @@ -29,6 +29,10 @@ #if CH_HAL_USE_SPI || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -40,6 +44,10 @@ #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + #if SPI_USE_MUTUAL_EXCLUSION && !CH_USE_MUTEXES && !CH_USE_SEMAPHORES #error "SPI_USE_MUTUAL_EXCLUSION requires CH_USE_MUTEXES and/or CH_USE_SEMAPHORES" #endif -- cgit v1.2.3