diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-LPC214x-G++/ch.ld | 2 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/main.cpp | 24 |
2 files changed, 22 insertions, 4 deletions
diff --git a/demos/ARM7-LPC214x-G++/ch.ld b/demos/ARM7-LPC214x-G++/ch.ld index 2bbea7477..a79694e7b 100644 --- a/demos/ARM7-LPC214x-G++/ch.ld +++ b/demos/ARM7-LPC214x-G++/ch.ld @@ -25,7 +25,7 @@ __abt_stack_size__ = 0x0004; __fiq_stack_size__ = 0x0010;
__irq_stack_size__ = 0x0080;
__svc_stack_size__ = 0x0004;
-__sys_stack_size__ = 0x0100;
+__sys_stack_size__ = 0x0800;
__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
MEMORY
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();
+ };
}
/*
|