aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
commit4b049c1f175144f8583df5eb9e3a620ac306ee98 (patch)
treed20a3ec4de726fbfb746c6062061e24b7ac3d3be /os
parentfe65d988275f509d3e7b71014c19c1d1aefac035 (diff)
downloadChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.gz
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.bz2
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6353 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32F1xx/adc_lld.c4
-rw-r--r--os/hal/ports/STM32F1xx/adc_lld.h10
-rw-r--r--os/hal/ports/STM32F1xx/ext_lld_isr.c8
-rw-r--r--os/hal/ports/STM32F1xx/stm32_dma.c2
-rw-r--r--os/hal/ports/STM32F1xx/stm32_registry.h14
5 files changed, 17 insertions, 21 deletions
diff --git a/os/hal/ports/STM32F1xx/adc_lld.c b/os/hal/ports/STM32F1xx/adc_lld.c
index 8f7ea5d29..f51ce13f8 100644
--- a/os/hal/ports/STM32F1xx/adc_lld.c
+++ b/os/hal/ports/STM32F1xx/adc_lld.c
@@ -132,12 +132,12 @@ void adc_lld_start(ADCDriver *adcp) {
if (adcp->state == ADC_STOP) {
#if STM32_ADC_USE_ADC1
if (&ADCD1 == adcp) {
- bool_t b;
+ bool b;
b = dmaStreamAllocate(adcp->dmastp,
STM32_ADC_ADC1_IRQ_PRIORITY,
(stm32_dmaisr_t)adc_lld_serve_rx_interrupt,
(void *)adcp);
- chDbgAssert(!b, "adc_lld_start(), #1", "stream already allocated");
+ osalDbgAssert(!b, "stream already allocated");
dmaStreamSetPeripheral(adcp->dmastp, &ADC1->DR);
rccEnableADC1(FALSE);
}
diff --git a/os/hal/ports/STM32F1xx/adc_lld.h b/os/hal/ports/STM32F1xx/adc_lld.h
index a4966d99d..cb94b9571 100644
--- a/os/hal/ports/STM32F1xx/adc_lld.h
+++ b/os/hal/ports/STM32F1xx/adc_lld.h
@@ -184,7 +184,7 @@ typedef struct {
/**
* @brief Enables the circular buffer mode for the group.
*/
- bool_t circular;
+ bool circular;
/**
* @brief Number of the analog channels belonging to the conversion group.
*/
@@ -276,17 +276,13 @@ struct ADCDriver {
/**
* @brief Waiting thread.
*/
- Thread *thread;
+ thread_reference_t thread;
#endif
#if ADC_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__)
-#if CH_USE_MUTEXES || defined(__DOXYGEN__)
/**
* @brief Mutex protecting the peripheral.
*/
- Mutex mutex;
-#elif CH_USE_SEMAPHORES
- Semaphore semaphore;
-#endif
+ mutex_t mutex;
#endif /* ADC_USE_MUTUAL_EXCLUSION */
#if defined(ADC_DRIVER_EXT_FIELDS)
ADC_DRIVER_EXT_FIELDS
diff --git a/os/hal/ports/STM32F1xx/ext_lld_isr.c b/os/hal/ports/STM32F1xx/ext_lld_isr.c
index 1b6d6eca2..92d770b76 100644
--- a/os/hal/ports/STM32F1xx/ext_lld_isr.c
+++ b/os/hal/ports/STM32F1xx/ext_lld_isr.c
@@ -277,7 +277,7 @@ void ext_lld_exti_irq_enable(void) {
nvicEnableVector(EXTI9_5_IRQn, STM32_EXT_EXTI5_9_IRQ_PRIORITY);
nvicEnableVector(EXTI15_10_IRQn, STM32_EXT_EXTI10_15_IRQ_PRIORITY);
nvicEnableVector(PVD_IRQn, STM32_EXT_EXTI16_IRQ_PRIORITY);
- nvicEnableVector(RTC_Alarm_IRQn, STM32_EXT_EXTI17_IRQ_PRIORITY);
+ nvicEnableVector(RTCAlarm_IRQn, STM32_EXT_EXTI17_IRQ_PRIORITY);
#if defined(STM32F10X_CL)
/* EXTI vectors specific to STM32F1xx Connectivity Line.*/
nvicEnableVector(OTG_FS_WKUP_IRQn, STM32_EXT_EXTI18_IRQ_PRIORITY);
@@ -287,7 +287,7 @@ void ext_lld_exti_irq_enable(void) {
/* EXTI vectors specific to STM32F1xx Value Line.*/
#else
/* EXTI vectors specific to STM32F1xx except Connectivity Line.*/
- nvicEnableVector(USB_FS_WKUP_IRQn, STM32_EXT_EXTI18_IRQ_PRIORITY);
+ nvicEnableVector(USBWakeUp_IRQn, STM32_EXT_EXTI18_IRQ_PRIORITY);
#endif
}
@@ -306,7 +306,7 @@ void ext_lld_exti_irq_disable(void) {
nvicDisableVector(EXTI9_5_IRQn);
nvicDisableVector(EXTI15_10_IRQn);
nvicDisableVector(PVD_IRQn);
- nvicDisableVector(RTC_Alarm_IRQn);
+ nvicDisableVector(RTCAlarm_IRQn);
#if defined(STM32F10X_CL)
/* EXTI vectors specific to STM32F1xx Connectivity Line.*/
nvicDisableVector(OTG_FS_WKUP_IRQn);
@@ -316,7 +316,7 @@ void ext_lld_exti_irq_disable(void) {
/* EXTI vectors specific to STM32F1xx Value Line.*/
#else
/* EXTI vectors specific to STM32F1xx except Connectivity Line.*/
- nvicDisableVector(USB_FS_WKUP_IRQn);
+ nvicDisableVector(USBWakeUp_IRQn);
#endif
}
diff --git a/os/hal/ports/STM32F1xx/stm32_dma.c b/os/hal/ports/STM32F1xx/stm32_dma.c
index f27e6ed2b..63fba6768 100644
--- a/os/hal/ports/STM32F1xx/stm32_dma.c
+++ b/os/hal/ports/STM32F1xx/stm32_dma.c
@@ -445,7 +445,7 @@ bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp,
/* Enables the associated IRQ vector if a callback is defined.*/
if (func != NULL)
- nvicEnableVector(dmastp->vector, CORTEX_PRIORITY_MASK(priority));
+ nvicEnableVector(dmastp->vector, priority);
return FALSE;
}
diff --git a/os/hal/ports/STM32F1xx/stm32_registry.h b/os/hal/ports/STM32F1xx/stm32_registry.h
index 7cbf36496..e2ae3779c 100644
--- a/os/hal/ports/STM32F1xx/stm32_registry.h
+++ b/os/hal/ports/STM32F1xx/stm32_registry.h
@@ -510,7 +510,7 @@
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
-#define STM32_HAS_SPI2 FALSE
+#define STM32_HAS_SPI2 TRUE
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
@@ -645,11 +645,11 @@
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
-#define STM32_HAS_SPI2 FALSE
+#define STM32_HAS_SPI2 TRUE
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
-#define STM32_HAS_SPI3 FALSE
+#define STM32_HAS_SPI3 TRUE
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
@@ -815,11 +815,11 @@
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
-#define STM32_HAS_SPI2 FALSE
+#define STM32_HAS_SPI2 TRUE
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
-#define STM32_HAS_SPI3 FALSE
+#define STM32_HAS_SPI3 TRUE
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
@@ -985,11 +985,11 @@
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
-#define STM32_HAS_SPI2 FALSE
+#define STM32_HAS_SPI2 TRUE
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
-#define STM32_HAS_SPI3 FALSE
+#define STM32_HAS_SPI3 TRUE
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)