aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-01-02 10:59:48 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-01-02 10:59:48 +0000
commit6825084461c6ffe5234a64ca32af48b915136968 (patch)
treedd4f6ffb82bd73cd73d31bcbc3ce1b8742c6a93e /os
parent7d7af240fb9c9f22fc5f2359752385faba4f94c1 (diff)
downloadChibiOS-6825084461c6ffe5234a64ca32af48b915136968.tar.gz
ChibiOS-6825084461c6ffe5234a64ca32af48b915136968.tar.bz2
ChibiOS-6825084461c6ffe5234a64ca32af48b915136968.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1488 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/include/can.h13
-rw-r--r--os/hal/platforms/STM32/adc_lld.h4
-rw-r--r--os/hal/platforms/STM32/can_lld.h13
-rw-r--r--os/hal/platforms/STM32/pwm_lld.h6
-rw-r--r--os/hal/platforms/STM32/serial_lld.c2
-rw-r--r--os/hal/platforms/STM32/spi_lld.h4
-rw-r--r--os/hal/templates/halconf.h35
7 files changed, 41 insertions, 36 deletions
diff --git a/os/hal/include/can.h b/os/hal/include/can.h
index d49f5ee18..4dad345d8 100644
--- a/os/hal/include/can.h
+++ b/os/hal/include/can.h
@@ -58,6 +58,19 @@
/* Driver pre-compile time settings. */
/*===========================================================================*/
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ * @note This switch is enforced to @p FALSE if the driver implementation
+ * does not support the sleep mode.
+ */
+#if CAN_SUPPORTS_SLEEP || defined(__DOXYGEN__)
+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+#else /* !CAN_SUPPORTS_SLEEP */
+#define CAN_USE_SLEEP_MODE FALSE
+#endif /* !CAN_SUPPORTS_SLEEP */
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
diff --git a/os/hal/platforms/STM32/adc_lld.h b/os/hal/platforms/STM32/adc_lld.h
index cf7fae78a..4862f9ef0 100644
--- a/os/hal/platforms/STM32/adc_lld.h
+++ b/os/hal/platforms/STM32/adc_lld.h
@@ -72,7 +72,7 @@
* @brief ADC1 DMA priority (0..3|lowest..highest).
*/
#if !defined(STM32_ADC1_DMA_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_ADC1_DMA_PRIORITY 1
+#define STM32_ADC1_DMA_PRIORITY 3
#endif
/**
@@ -80,7 +80,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_ADC1_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_ADC1_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_ADC1_IRQ_PRIORITY 0x70
+#define STM32_ADC1_IRQ_PRIORITY 0x50
#endif
/**
diff --git a/os/hal/platforms/STM32/can_lld.h b/os/hal/platforms/STM32/can_lld.h
index 33d4bdff7..754d4eadb 100644
--- a/os/hal/platforms/STM32/can_lld.h
+++ b/os/hal/platforms/STM32/can_lld.h
@@ -89,19 +89,6 @@
#define STM32_CAN1_IRQ_PRIORITY 0xB0
#endif
-/**
- * @brief Sleep mode related APIs inclusion switch.
- * @note This switch is enforced to @p FALSE if the driver implementation
- * does not support the sleep mode.
- */
-#if CAN_SUPPORTS_SLEEP || defined(__DOXYGEN__)
-#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
-#endif
-#else /* !CAN_SUPPORTS_SLEEP */
-#define CAN_USE_SLEEP_MODE FALSE
-#endif /* !CAN_SUPPORTS_SLEEP */
-
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h
index a5c8f150e..7b3f5366f 100644
--- a/os/hal/platforms/STM32/pwm_lld.h
+++ b/os/hal/platforms/STM32/pwm_lld.h
@@ -83,7 +83,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_PWM1_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_PWM1_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_PWM1_IRQ_PRIORITY 0x80
+#define STM32_PWM1_IRQ_PRIORITY 0x70
#endif
/**
@@ -91,7 +91,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_PWM2_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_PWM2_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_PWM2_IRQ_PRIORITY 0x80
+#define STM32_PWM2_IRQ_PRIORITY 0x70
#endif
/**
@@ -99,7 +99,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_PWM3_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_PWM3_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_PWM3_IRQ_PRIORITY 0x80
+#define STM32_PWM3_IRQ_PRIORITY 0x70
#endif
/**
diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c
index 6a9f71673..3c8fda8c0 100644
--- a/os/hal/platforms/STM32/serial_lld.c
+++ b/os/hal/platforms/STM32/serial_lld.c
@@ -55,7 +55,7 @@ SerialDriver SD3;
/** @brief Driver default configuration.*/
static const SerialConfig default_config =
{
- 38400,
+ SERIAL_DEFAULT_BITRATE,
0,
USART_CR2_STOP1_BITS | USART_CR2_LINEN,
0
diff --git a/os/hal/platforms/STM32/spi_lld.h b/os/hal/platforms/STM32/spi_lld.h
index fcc216d8d..46ea4b559 100644
--- a/os/hal/platforms/STM32/spi_lld.h
+++ b/os/hal/platforms/STM32/spi_lld.h
@@ -80,7 +80,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_SPI1_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_SPI1_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_SPI1_IRQ_PRIORITY 0x60
+#define STM32_SPI1_IRQ_PRIORITY 0xA0
#endif
/**
@@ -88,7 +88,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_SPI2_IRQ_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_SPI2_IRQ_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_SPI2_IRQ_PRIORITY 0x60
+#define STM32_SPI2_IRQ_PRIORITY 0xA0
#endif
/**
diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h
index 09d1365c5..628501219 100644
--- a/os/hal/templates/halconf.h
+++ b/os/hal/templates/halconf.h
@@ -48,7 +48,7 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(CH_HAL_USE_PAL) || defined(__DOXYGEN__)
-#define CH_HAL_USE_PAL TRUE
+#define CH_HAL_USE_PAL TRUE
#endif
/*===========================================================================*/
@@ -59,7 +59,7 @@
* @brief Enables the ADC subsystem.
*/
#if !defined(CH_HAL_USE_ADC) || defined(__DOXYGEN__)
-#define CH_HAL_USE_ADC TRUE
+#define CH_HAL_USE_ADC TRUE
#endif
/*===========================================================================*/
@@ -70,9 +70,14 @@
* @brief Enables the CAN subsystem.
*/
#if !defined(CH_HAL_USE_CAN) || defined(__DOXYGEN__)
-#define CH_HAL_USE_CAN TRUE
+#define CH_HAL_USE_CAN TRUE
#endif
+/*
+ * Default CAN settings overrides (uncomment to override).
+ */
+/*#define CAN_USE_SLEEP_MODE TRUE*/
+
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
@@ -81,7 +86,7 @@
* @brief Enables the MAC subsystem.
*/
#if !defined(CH_HAL_USE_MAC) || defined(__DOXYGEN__)
-#define CH_HAL_USE_MAC TRUE
+#define CH_HAL_USE_MAC TRUE
#endif
/*===========================================================================*/
@@ -92,7 +97,7 @@
* @brief Enables the PWM subsystem.
*/
#if !defined(CH_HAL_USE_PWM) || defined(__DOXYGEN__)
-#define CH_HAL_USE_PWM TRUE
+#define CH_HAL_USE_PWM TRUE
#endif
/*===========================================================================*/
@@ -103,14 +108,14 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(CH_HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define CH_HAL_USE_SERIAL TRUE
+#define CH_HAL_USE_SERIAL TRUE
#endif
/*
* Default SERIAL settings overrides (uncomment to override).
*/
-/*#define SERIAL_DEFAULT_BITRATE 38400*/
-/*#define SERIAL_BUFFERS_SIZE 64*/
+/*#define SERIAL_DEFAULT_BITRATE 38400*/
+/*#define SERIAL_BUFFERS_SIZE 64*/
/*===========================================================================*/
/* SPI driver related settings. */
@@ -120,13 +125,13 @@
* @brief Enables the SPI subsystem.
*/
#if !defined(CH_HAL_USE_SPI) || defined(__DOXYGEN__)
-#define CH_HAL_USE_SPI TRUE
+#define CH_HAL_USE_SPI TRUE
#endif
/*
* Default SPI settings overrides (uncomment to override).
*/
-/*#define SPI_USE_MUTUAL_EXCLUSION TRUE*/
+/*#define SPI_USE_MUTUAL_EXCLUSION TRUE*/
/*===========================================================================*/
/* MMC_SPI driver related settings. */
@@ -136,16 +141,16 @@
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(CH_HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
-#define CH_HAL_USE_MMC_SPI TRUE
+#define CH_HAL_USE_MMC_SPI TRUE
#endif
/*
* Default MMC_SPI settings overrides (uncomment to override).
*/
-/*#define MMC_SECTOR_SIZE 512*/
-/*#define MMC_NICE_WAITING TRUE*/
-/*#define MMC_POLLING_INTERVAL 10*/
-/*#define MMC_POLLING_DELAY 10*/
+/*#define MMC_SECTOR_SIZE 512*/
+/*#define MMC_NICE_WAITING TRUE*/
+/*#define MMC_POLLING_INTERVAL 10*/
+/*#define MMC_POLLING_DELAY 10*/
#endif /* _HALCONF_H_ */