diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-03-16 09:53:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-03-16 09:53:11 +0000 |
commit | 55475920fd1891307c3fed0e7062c1b95558bec3 (patch) | |
tree | b3e04e4cc7ccf0622a8a220ca194e85825420c80 /os/hal/ports/STM32 | |
parent | c3f7c51a7d0591c4bbbe6973c19f45185227dc75 (diff) | |
download | ChibiOS-55475920fd1891307c3fed0e7062c1b95558bec3.tar.gz ChibiOS-55475920fd1891307c3fed0e7062c1b95558bec3.tar.bz2 ChibiOS-55475920fd1891307c3fed0e7062c1b95558bec3.zip |
Fixed bug #471 except USB change.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6774 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r-- | os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c | 12 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_isr.h | 21 |
2 files changed, 27 insertions, 6 deletions
diff --git a/os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c b/os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c index 89b80396f..9a88bedf5 100644 --- a/os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c +++ b/os/hal/ports/STM32/LLD/I2Cv1/i2c_lld.c @@ -403,7 +403,7 @@ static void i2c_lld_serve_error_interrupt(I2CDriver *i2cp, uint16_t sr) { *
* @notapi
*/
-OSAL_IRQ_HANDLER(I2C1_EV_IRQHandler) {
+OSAL_IRQ_HANDLER(STM32_I2C1_EVENT_HANDLER) {
OSAL_IRQ_PROLOGUE();
@@ -415,7 +415,7 @@ OSAL_IRQ_HANDLER(I2C1_EV_IRQHandler) { /**
* @brief I2C1 error interrupt handler.
*/
-OSAL_IRQ_HANDLER(I2C1_ER_IRQHandler) {
+OSAL_IRQ_HANDLER(STM32_I2C1_ERROR_HANDLER) {
uint16_t sr = I2CD1.i2c->SR1;
OSAL_IRQ_PROLOGUE();
@@ -433,7 +433,7 @@ OSAL_IRQ_HANDLER(I2C1_ER_IRQHandler) { *
* @notapi
*/
-OSAL_IRQ_HANDLER(I2C2_EV_IRQHandler) {
+OSAL_IRQ_HANDLER(STM32_I2C2_EVENT_HANDLER) {
OSAL_IRQ_PROLOGUE();
@@ -447,7 +447,7 @@ OSAL_IRQ_HANDLER(I2C2_EV_IRQHandler) { *
* @notapi
*/
-OSAL_IRQ_HANDLER(I2C2_ER_IRQHandler) {
+OSAL_IRQ_HANDLER(STM32_I2C2_ERROR_HANDLER) {
uint16_t sr = I2CD2.i2c->SR1;
OSAL_IRQ_PROLOGUE();
@@ -804,8 +804,8 @@ msg_t i2c_lld_master_transmit_timeout(I2CDriver *i2cp, i2caddr_t addr, /* Resetting error flags for this transfer.*/
i2cp->errors = I2C_NO_ERROR;
- /* Initializes driver fields, LSB = 1 -> receive.*/
- i2cp->addr = (addr << 1) | 0x01;
+ /* Initializes driver fields, LSB = 0 -> transmit.*/
+ i2cp->addr = (addr << 1);
/* Releases the lock from high level driver.*/
osalSysUnlock();
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_isr.h b/os/hal/ports/STM32/STM32F4xx/stm32_isr.h index 0e936b3d6..dc7fbd1ab 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_isr.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_isr.h @@ -55,6 +55,19 @@ #define STM32_CAN2_SCE_NUMBER 66
/*
+ * I2C units.
+ */
+#define STM32_I2C1_EVENT_HANDLER VectorBC
+#define STM32_I2C1_ERROR_HANDLER VectorC0
+#define STM32_I2C1_EVENT_NUMBER 31
+#define STM32_I2C1_ERROR_NUMBER 32
+
+#define STM32_I2C2_EVENT_HANDLER VectorC4
+#define STM32_I2C2_ERROR_HANDLER VectorC8
+#define STM32_I2C2_EVENT_NUMBER 33
+#define STM32_I2C2_ERROR_NUMBER 34
+
+/*
* OTG units.
*/
#define STM32_OTG1_HANDLER Vector14C
@@ -123,8 +136,16 @@ #define STM32_UART4_NUMBER 52
#define STM32_UART5_NUMBER 53
#define STM32_USART6_NUMBER 71
+
+/*
+ * Ethernet
+ */
+#define ETH_IRQHandler Vector134
+
/** @} */
+
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
|