aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM8S-STM8S105-DISCOVERY-STVD
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-01 10:53:18 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-01 10:53:18 +0000
commit5da56bd07fca28900f9a53c51312be46d759e1d2 (patch)
treef4a0047927ae61466526c24c0bb71bad745cbf07 /demos/STM8S-STM8S105-DISCOVERY-STVD
parenta9753ea48ac394028762b6a3fa9812e0092bb08e (diff)
downloadChibiOS-5da56bd07fca28900f9a53c51312be46d759e1d2.tar.gz
ChibiOS-5da56bd07fca28900f9a53c51312be46d759e1d2.tar.bz2
ChibiOS-5da56bd07fca28900f9a53c51312be46d759e1d2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2318 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM8S-STM8S105-DISCOVERY-STVD')
-rw-r--r--demos/STM8S-STM8S105-DISCOVERY-STVD/cosmic/vectors.c9
-rw-r--r--demos/STM8S-STM8S105-DISCOVERY-STVD/demo/mcuconf.h18
2 files changed, 19 insertions, 8 deletions
diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/cosmic/vectors.c b/demos/STM8S-STM8S105-DISCOVERY-STVD/cosmic/vectors.c
index 6ede94a3e..e9a5ad450 100644
--- a/demos/STM8S-STM8S105-DISCOVERY-STVD/cosmic/vectors.c
+++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/cosmic/vectors.c
@@ -29,6 +29,7 @@ typedef void @far @interrupt (*interrupt_handler_t)(void);
* Various external symbols.
*/
void _stext(void);
+@far @interrupt void vector10(void);
@far @interrupt void vector13(void);
@far @interrupt void vector17(void);
@far @interrupt void vector18(void);
@@ -68,14 +69,18 @@ exception_vector_t const _vectab[] = {
{0x82, vector}, /* vector7 */
{0x82, vector}, /* vector8 */
{0x82, vector}, /* vector9 */
+#if CH_HAL_USE_SPI && STM8_SPI_USE_SPI
+ {0x82, vector10},
+#else
{0x82, vector}, /* vector10 */
+#endif
{0x82, vector}, /* vector11 */
{0x82, vector}, /* vector12 */
{0x82, vector13}, /* vector13 */
{0x82, vector}, /* vector14 */
{0x82, vector}, /* vector15 */
{0x82, vector}, /* vector16 */
-#if USE_STM8_UART1
+#if CH_HAL_USE_SERIAL && STM8_SERIAL_USE_UART1
{0x82, vector17}, /* vector17 */
{0x82, vector18}, /* vector18 */
#else
@@ -83,7 +88,7 @@ exception_vector_t const _vectab[] = {
{0x82, vector}, /* vector18 */
#endif
{0x82, vector}, /* vector19 */
-#if USE_STM8_UART2 || USE_STM8_UART3
+#if CH_HAL_USE_SERIAL && (STM8_SERIAL_USE_UART2 || STM8_SERIAL_USE_UART3)
{0x82, vector20}, /* vector20 */
{0x82, vector21}, /* vector21 */
#else
diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/mcuconf.h b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/mcuconf.h
index cf2ebd963..70aae8849 100644
--- a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/mcuconf.h
+++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/mcuconf.h
@@ -28,13 +28,19 @@
/*
* HAL general settings.
*/
-#define STM8_CLOCK_SOURCE CLK_SOURCE_HSI
-#define STM8_HSI_DIVIDER CLK_HSI_DIV1
-#define STM8_CPU_DIVIDER CLK_CPU_DIV1
+#define STM8_CLOCK_SOURCE CLK_SOURCE_HSI
+#define STM8_HSI_DIVIDER CLK_HSI_DIV1
+#define STM8_CPU_DIVIDER CLK_CPU_DIV1
/*
* SERIAL driver system settings.
*/
-#define USE_STM8_UART1 FALSE
-#define USE_STM8_UART2 TRUE
-#define USE_STM8_UART3 FALSE
+#define STM8_SERIAL_USE_UART1 FALSE
+#define STM8_SERIAL_USE_UART2 TRUE
+#define STM8_SERIAL_USE_UART3 FALSE
+
+/*
+ * SPI driver system settings.
+ */
+#define STM8_SPI_USE_SPI TRUE
+#define STM8_SPI_ERROR_HOOK(spip) chSysHalt()