Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MyThread.h@0:11d8781f1013, 2015-02-16 (annotated)
- Committer:
- clemounet
- Date:
- Mon Feb 16 16:30:36 2015 +0000
- Revision:
- 0:11d8781f1013
- Child:
- 1:ee7a5f05513d
My Helpers = (MyThread,...)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
clemounet | 0:11d8781f1013 | 1 | |
clemounet | 0:11d8781f1013 | 2 | #ifndef MYTHREADS_H |
clemounet | 0:11d8781f1013 | 3 | #define MYTHREADS_H |
clemounet | 0:11d8781f1013 | 4 | |
clemounet | 0:11d8781f1013 | 5 | #include "mbed.h" |
clemounet | 0:11d8781f1013 | 6 | #include "rtos.h" |
clemounet | 0:11d8781f1013 | 7 | |
clemounet | 0:11d8781f1013 | 8 | #define ENDSIG 0x01 |
clemounet | 0:11d8781f1013 | 9 | |
clemounet | 0:11d8781f1013 | 10 | class MyThread{ |
clemounet | 0:11d8781f1013 | 11 | public: |
clemounet | 0:11d8781f1013 | 12 | const char* tName; |
clemounet | 0:11d8781f1013 | 13 | bool running; |
clemounet | 0:11d8781f1013 | 14 | Thread *t; |
clemounet | 0:11d8781f1013 | 15 | MyThread(const char* name); |
clemounet | 0:11d8781f1013 | 16 | virtual ~MyThread(); |
clemounet | 0:11d8781f1013 | 17 | virtual void Start(); |
clemounet | 0:11d8781f1013 | 18 | virtual void Stop(); |
clemounet | 0:11d8781f1013 | 19 | virtual void Run(); |
clemounet | 0:11d8781f1013 | 20 | virtual void Main(void) = 0; |
clemounet | 0:11d8781f1013 | 21 | virtual void Wait(int32_t ms); |
clemounet | 0:11d8781f1013 | 22 | virtual void WaitEnd(); |
clemounet | 0:11d8781f1013 | 23 | }; |
clemounet | 0:11d8781f1013 | 24 | |
clemounet | 0:11d8781f1013 | 25 | #endif |