diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-28 11:39:30 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-03-28 11:39:30 +0000 |
commit | 42a90cc8cebf186c64bbae50a16a90a9979b80f4 (patch) | |
tree | deebba85684cc14dbc44555de36ebcd950f9998a /demos/ARM7-LPC214x-G++ | |
parent | b83cd4a1dc8b3240f821a23c588c8d7d690f70ae (diff) | |
download | ChibiOS-42a90cc8cebf186c64bbae50a16a90a9979b80f4.tar.gz ChibiOS-42a90cc8cebf186c64bbae50a16a90a9979b80f4.tar.bz2 ChibiOS-42a90cc8cebf186c64bbae50a16a90a9979b80f4.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@251 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-G++')
-rw-r--r-- | demos/ARM7-LPC214x-G++/main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/demos/ARM7-LPC214x-G++/main.cpp b/demos/ARM7-LPC214x-G++/main.cpp index 39b31e89a..b96a8271f 100644 --- a/demos/ARM7-LPC214x-G++/main.cpp +++ b/demos/ARM7-LPC214x-G++/main.cpp @@ -73,17 +73,14 @@ static const seqop_t LED3_sequence[] = /**
* Sequencer thread class. It can drive LEDs or other output pins.
*/
-class SequencerThread : BaseThread {
+class SequencerThread : EnhancedThread<64> {
private:
-
- WorkingArea(wa, 64); // Thread working area.
const seqop_t *base, *curr; // Thread local variables.
protected:
-
virtual msg_t Main(void) {
- while (TRUE) {
+ while (true) {
switch(curr->action) {
case SLEEP:
Sleep(curr->value);
@@ -105,7 +102,8 @@ protected: }
public:
- SequencerThread(const seqop_t *sequence) : BaseThread(NORMALPRIO, 0, wa, sizeof wa) {
+ SequencerThread(const seqop_t *sequence):
+ EnhancedThread<64>("sequencer", NORMALPRIO, 0) {
base = curr = sequence;
}
|