diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-29 14:02:06 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-29 14:02:06 +0000 |
commit | 1764b2db55a2d35f1e394c6f8edf1beebc5f326e (patch) | |
tree | c9fd75e3d324d5808ba6392b1c9b8b502a5ca898 /demos/LPC21xx | |
parent | f0a80283cb71516718e18cc191a81969dd83b67a (diff) | |
download | ChibiOS-1764b2db55a2d35f1e394c6f8edf1beebc5f326e.tar.gz ChibiOS-1764b2db55a2d35f1e394c6f8edf1beebc5f326e.tar.bz2 ChibiOS-1764b2db55a2d35f1e394c6f8edf1beebc5f326e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6970 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/LPC21xx')
-rw-r--r-- | demos/LPC21xx/RT-LPC214x-OLIMEX/.project | 7 | ||||
-rw-r--r-- | demos/LPC21xx/RT-LPC214x-OLIMEX/Makefile | 2 | ||||
-rw-r--r-- | demos/LPC21xx/RT-LPC214x-OLIMEX/chconf.h | 6 | ||||
-rw-r--r-- | demos/LPC21xx/RT-LPC214x-OLIMEX/main.c | 26 |
4 files changed, 25 insertions, 16 deletions
diff --git a/demos/LPC21xx/RT-LPC214x-OLIMEX/.project b/demos/LPC21xx/RT-LPC214x-OLIMEX/.project index 42c586ee1..c5d521030 100644 --- a/demos/LPC21xx/RT-LPC214x-OLIMEX/.project +++ b/demos/LPC21xx/RT-LPC214x-OLIMEX/.project @@ -23,4 +23,11 @@ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
+ <linkedResources>
+ <link>
+ <name>os</name>
+ <type>2</type>
+ <locationURI>CHIBIOS/os</locationURI>
+ </link>
+ </linkedResources>
</projectDescription>
diff --git a/demos/LPC21xx/RT-LPC214x-OLIMEX/Makefile b/demos/LPC21xx/RT-LPC214x-OLIMEX/Makefile index eed3b5b0c..6aacd92d3 100644 --- a/demos/LPC21xx/RT-LPC214x-OLIMEX/Makefile +++ b/demos/LPC21xx/RT-LPC214x-OLIMEX/Makefile @@ -110,7 +110,7 @@ CHIBIOS = ../../.. #include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
#include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_lpc214x.mk
+include $(CHIBIOS)/os/rt/ports/ARM/compilers/GCC/mk/port_lpc214x.mk
#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
diff --git a/demos/LPC21xx/RT-LPC214x-OLIMEX/chconf.h b/demos/LPC21xx/RT-LPC214x-OLIMEX/chconf.h index 09b91db5c..0ebb02d58 100644 --- a/demos/LPC21xx/RT-LPC214x-OLIMEX/chconf.h +++ b/demos/LPC21xx/RT-LPC214x-OLIMEX/chconf.h @@ -46,7 +46,7 @@ * @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
-#define CH_CFG_ST_FREQUENCY 10000
+#define CH_CFG_ST_FREQUENCY 1000
/**
* @brief Time delta constant for the tick-less mode.
@@ -56,7 +56,7 @@ * The value one is not valid, timeouts are rounded up to
* this value.
*/
-#define CH_CFG_ST_TIMEDELTA 2
+#define CH_CFG_ST_TIMEDELTA 0
/** @} */
@@ -137,7 +137,7 @@ *
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_TM TRUE
+#define CH_CFG_USE_TM FALSE
/**
* @brief Threads registry APIs.
diff --git a/demos/LPC21xx/RT-LPC214x-OLIMEX/main.c b/demos/LPC21xx/RT-LPC214x-OLIMEX/main.c index 629b8e6a7..8c0778c32 100644 --- a/demos/LPC21xx/RT-LPC214x-OLIMEX/main.c +++ b/demos/LPC21xx/RT-LPC214x-OLIMEX/main.c @@ -15,9 +15,10 @@ */
#include "ch.h"
-#include "hal.h"
-#include "test.h"
+//#include "hal.h"
+//#include "test.h"
+#if 0
#define BOTH_BUTTONS (PAL_PORT_BIT(PA_BUTTON1) | PAL_PORT_BIT(PA_BUTTON2))
/*
@@ -57,6 +58,7 @@ static msg_t Thread2(void *arg) { }
return 0;
}
+#endif
/*
* Application entry point.
@@ -70,22 +72,22 @@ int main(void) { * - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
- halInit();
+// halInit();
chSysInit();
/*
* Activates the serial driver 1 using the driver default configuration.
*/
- sdStart(&SD1, NULL);
+// sdStart(&SD1, NULL);
/*
* If a button is pressed during the reset then the blinking leds threads
* are not started in order to make accurate benchmarks.
*/
- if ((palReadPort(IOPORT1) & BOTH_BUTTONS) == BOTH_BUTTONS) {
- chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
- }
+// if ((palReadPort(IOPORT1) & BOTH_BUTTONS) == BOTH_BUTTONS) {
+// chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
+// chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
+// }
/*
* Normal main() thread activity, in this demo it does nothing except
@@ -93,10 +95,10 @@ int main(void) { * or print "Hello World!" on serial driver 1.
*/
while (TRUE) {
- if (!palReadPad(IOPORT1, PA_BUTTON1))
- sdWrite(&SD1, (uint8_t *)"Hello World!\r\n", 14);
- if (!palReadPad(IOPORT1, PA_BUTTON2))
- TestThread(&SD1);
+// if (!palReadPad(IOPORT1, PA_BUTTON1))
+// sdWrite(&SD1, (uint8_t *)"Hello World!\r\n", 14);
+// if (!palReadPad(IOPORT1, PA_BUTTON2))
+// TestThread(&SD1);
chThdSleepMilliseconds(500);
}
return 0;
|