This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
STM32 SPI driver fix
- From: Simon Kallweit <simon dot kallweit at intefo dot ch>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Mon, 24 Aug 2009 10:43:29 +0200
- Subject: STM32 SPI driver fix
This is a little fix for the STM32 SPI driver. It initializes
spi_cr1_val with zero (as stated in the comments) and adds the testcase
to the CDL.
From: Simon Kallweit <simon.kallweit@intefo.ch>
Date: Mon, 24 Aug 2009 08:14:45 +0000 (+0200)
Subject: fixed a small bug and added testcases
X-Git-Url: http://git.inthemill.ch/?p=ecos.git;a=commitdiff_plain;h=d489213fe40325333ef88cd375535888b58c9407
fixed a small bug and added testcases
---
diff --git a/packages/devs/spi/cortexm/stm32/current/ChangeLog b/packages/devs/spi/cortexm/stm32/current/ChangeLog
index ecc4c15..96eed2c 100644
--- a/packages/devs/spi/cortexm/stm32/current/ChangeLog
+++ b/packages/devs/spi/cortexm/stm32/current/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-24 Simon Kallweit <simon.kallweit@intefo.ch>
+
+ * cdl/spi_stm32.cdl: added testcase.
+ * include/spi_stm32.h: initializing spi_cr1_val with zero.
+
2009-02-10 Bart Veer <bartv@ecoscentric.com>
* src/spi_stm32.c (cyg_spi_cortexm_stm32_init): mark as
diff --git a/packages/devs/spi/cortexm/stm32/current/cdl/spi_stm32.cdl b/packages/devs/spi/cortexm/stm32/current/cdl/spi_stm32.cdl
index 30015cf..51d5264 100644
--- a/packages/devs/spi/cortexm/stm32/current/cdl/spi_stm32.cdl
+++ b/packages/devs/spi/cortexm/stm32/current/cdl/spi_stm32.cdl
@@ -219,5 +219,12 @@ cdl_component CYGHWR_DEVS_SPI_CORTEXM_STM32_BUS3 {
}
}
+cdl_option CYGPKG_DEVS_SPI_CORTEXM_STM32_TESTS {
+ display "SPI tests"
+ flavor data
+ no_define
+ calculated { "tests/loopback" }
+}
+
}
# EOF spi_stm32.cdl
diff --git a/packages/devs/spi/cortexm/stm32/current/include/spi_stm32.h b/packages/devs/spi/cortexm/stm32/current/include/spi_stm32.h
index 21a04c0..a39c512 100644
--- a/packages/devs/spi/cortexm/stm32/current/include/spi_stm32.h
+++ b/packages/devs/spi/cortexm/stm32/current/include/spi_stm32.h
@@ -93,6 +93,7 @@ cyg_spi_cortexm_stm32_device_t _name_ ##_stm32 CYG_SPI_DEVICE_ON_BUS(_bus_) = {
.cs_up_udly = _csup_dly_, \
.cs_dw_udly = _csdw_dly_, \
.tr_bt_udly = _trbt_dly_, \
+ .spi_cr1_val = 0, \
}; \
extern cyg_spi_device _name_ __attribute__((alias ( #_name_ "_stm32" )));