aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-G++/main.cpp
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-24 13:38:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-24 13:38:16 +0000
commitd6eb57b8ea6c73a694cff33ded801af9e25ecff7 (patch)
tree70b39fdfdb5f4326f44e971f2d6a5e9a0fb4a9aa /demos/ARM7-LPC214x-G++/main.cpp
parent9000e56245a5192a6966dd7e61008f81d9636f6f (diff)
downloadChibiOS-d6eb57b8ea6c73a694cff33ded801af9e25ecff7.tar.gz
ChibiOS-d6eb57b8ea6c73a694cff33ded801af9e25ecff7.tar.bz2
ChibiOS-d6eb57b8ea6c73a694cff33ded801af9e25ecff7.zip
Fixed bugs 2796065, 2796069 and 2796081. Updated ARM test reports.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@987 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-G++/main.cpp')
-rw-r--r--demos/ARM7-LPC214x-G++/main.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/demos/ARM7-LPC214x-G++/main.cpp b/demos/ARM7-LPC214x-G++/main.cpp
index 2f89d5dcf..647dee8a3 100644
--- a/demos/ARM7-LPC214x-G++/main.cpp
+++ b/demos/ARM7-LPC214x-G++/main.cpp
@@ -80,7 +80,7 @@ static const seqop_t LED3_sequence[] =
* Any sequencer is just an instance of this class, all the details are
* totally encapsulated and hidden to the application level.
*/
-class SequencerThread : EnhancedThread<128> {
+class SequencerThread : public EnhancedThread<128> {
private:
const seqop_t *base, *curr; // Thread local variables.
@@ -115,12 +115,30 @@ public:
};
/*
+ * Tester thread class. This thread executes the test suite.
+ */
+class TesterThread : public EnhancedThread<128> {
+
+protected:
+ virtual msg_t Main(void) {
+
+ return TestThread(&COM1);
+ }
+
+public:
+ TesterThread(void) : EnhancedThread<128>("tester") {
+ }
+};
+
+/*
* Executed as an event handler at 500mS intervals.
*/
static void TimerHandler(eventid_t id) {
- if (!(IO0PIN & 0x00018000)) // Both buttons
- TestThread(&COM1);
+ if (!(IO0PIN & 0x00018000)) { // Both buttons
+ TesterThread tester;
+ tester.Wait();
+ };
}
/*