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.
ui/ui.h@1:6799c07fe510, 2012-11-07 (annotated)
- Committer:
- sv
- Date:
- Wed Nov 07 14:37:35 2012 +0000
- Revision:
- 1:6799c07fe510
Preliminary copy of 2012 code
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sv | 1:6799c07fe510 | 1 | |
| sv | 1:6799c07fe510 | 2 | #ifndef UI_H |
| sv | 1:6799c07fe510 | 3 | #define UI_H |
| sv | 1:6799c07fe510 | 4 | |
| sv | 1:6799c07fe510 | 5 | #include "rtos.h" |
| sv | 1:6799c07fe510 | 6 | |
| sv | 1:6799c07fe510 | 7 | #define NUMIDS 32 |
| sv | 1:6799c07fe510 | 8 | |
| sv | 1:6799c07fe510 | 9 | class UI { |
| sv | 1:6799c07fe510 | 10 | public: |
| sv | 1:6799c07fe510 | 11 | Thread tUI; |
| sv | 1:6799c07fe510 | 12 | |
| sv | 1:6799c07fe510 | 13 | UI(); |
| sv | 1:6799c07fe510 | 14 | |
| sv | 1:6799c07fe510 | 15 | bool regid(char id, unsigned int length); |
| sv | 1:6799c07fe510 | 16 | bool updateval(char id, float* buffer, unsigned int length); |
| sv | 1:6799c07fe510 | 17 | bool updateval(char id, float value); |
| sv | 1:6799c07fe510 | 18 | bool unregid(char id); |
| sv | 1:6799c07fe510 | 19 | |
| sv | 1:6799c07fe510 | 20 | private: |
| sv | 1:6799c07fe510 | 21 | Mutex printlock; |
| sv | 1:6799c07fe510 | 22 | char idlist[NUMIDS]; |
| sv | 1:6799c07fe510 | 23 | float* buffarr[NUMIDS]; |
| sv | 1:6799c07fe510 | 24 | volatile int newdataflags; //Only works for NUMID = 32 |
| sv | 1:6799c07fe510 | 25 | |
| sv | 1:6799c07fe510 | 26 | void printloop(); |
| sv | 1:6799c07fe510 | 27 | static void printtw(void const *arg){ ((UI*)arg)->printloop(); } |
| sv | 1:6799c07fe510 | 28 | }; |
| sv | 1:6799c07fe510 | 29 | |
| sv | 1:6799c07fe510 | 30 | #endif //UI_H |
