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.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
inc/global.h@7:c0c03193612d, 2016-09-06 (annotated)
- Committer:
- davidjhoward
- Date:
- Tue Sep 06 20:08:13 2016 +0000
- Revision:
- 7:c0c03193612d
- Parent:
- 3:8ea4db957749
- Child:
- 9:ef0ca2f8a8a6
make mDot global
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmarkel44 | 0:65cfa4873284 | 1 | /****************************************************************************** |
jmarkel44 | 0:65cfa4873284 | 2 | * |
jmarkel44 | 0:65cfa4873284 | 3 | * File: global.h |
jmarkel44 | 0:65cfa4873284 | 4 | * Desciption: global data |
jmarkel44 | 0:65cfa4873284 | 5 | * |
jmarkel44 | 0:65cfa4873284 | 6 | *****************************************************************************/ |
jmarkel44 | 0:65cfa4873284 | 7 | #ifndef GLOBAL_H |
jmarkel44 | 0:65cfa4873284 | 8 | #define GLOBAL_H |
jmarkel44 | 0:65cfa4873284 | 9 | |
jmarkel44 | 0:65cfa4873284 | 10 | #include "mbed.h" |
jmarkel44 | 0:65cfa4873284 | 11 | #include "rtos.h" |
jmarkel44 | 0:65cfa4873284 | 12 | #include "ntshell.h" |
davidjhoward | 7:c0c03193612d | 13 | #include "mDot.h" |
jmarkel44 | 0:65cfa4873284 | 14 | |
jmarkel44 | 3:8ea4db957749 | 15 | #define SUPPRESS_OUTPUT |
jmarkel44 | 2:da28f21b72a1 | 16 | |
jmarkel44 | 0:65cfa4873284 | 17 | extern int sig_continue; |
jmarkel44 | 3:8ea4db957749 | 18 | extern osThreadId mainThreadId; |
jmarkel44 | 0:65cfa4873284 | 19 | |
jmarkel44 | 0:65cfa4873284 | 20 | typedef enum action_tag { |
jmarkel44 | 0:65cfa4873284 | 21 | ACTION_CREATE, |
jmarkel44 | 0:65cfa4873284 | 22 | ACTION_MODIFY, |
jmarkel44 | 0:65cfa4873284 | 23 | ACTION_DESTROY |
jmarkel44 | 0:65cfa4873284 | 24 | } Action_t; |
jmarkel44 | 0:65cfa4873284 | 25 | |
jmarkel44 | 0:65cfa4873284 | 26 | typedef enum control_tag { |
jmarkel44 | 0:65cfa4873284 | 27 | CONTROL_TIMER = 0, |
jmarkel44 | 0:65cfa4873284 | 28 | CONTROL_PID = 1, |
jmarkel44 | 0:65cfa4873284 | 29 | CONTROL_SETPOINT = 2, |
jmarkel44 | 0:65cfa4873284 | 30 | CONTROL_COMPOSITE = 3, |
jmarkel44 | 0:65cfa4873284 | 31 | CONTROL_MANUAL = 4 |
jmarkel44 | 0:65cfa4873284 | 32 | } Control_t; |
jmarkel44 | 0:65cfa4873284 | 33 | |
jmarkel44 | 0:65cfa4873284 | 34 | |
jmarkel44 | 0:65cfa4873284 | 35 | // message data type |
jmarkel44 | 0:65cfa4873284 | 36 | typedef struct message_tag { |
jmarkel44 | 0:65cfa4873284 | 37 | Action_t action; |
jmarkel44 | 0:65cfa4873284 | 38 | Control_t control; |
jmarkel44 | 0:65cfa4873284 | 39 | char controlFile[32]; |
jmarkel44 | 0:65cfa4873284 | 40 | } Message_t; |
jmarkel44 | 0:65cfa4873284 | 41 | |
jmarkel44 | 0:65cfa4873284 | 42 | extern Mail<Message_t, 16> MailBox; |
jmarkel44 | 0:65cfa4873284 | 43 | |
jmarkel44 | 0:65cfa4873284 | 44 | extern ntshell_t ntshell; |
jmarkel44 | 0:65cfa4873284 | 45 | |
jmarkel44 | 0:65cfa4873284 | 46 | extern int func_read(char *buf, int cnt); |
jmarkel44 | 0:65cfa4873284 | 47 | extern int func_write(const char *buf, int cnt); |
jmarkel44 | 0:65cfa4873284 | 48 | extern int func_cb_ntshell(const char *text); |
jmarkel44 | 0:65cfa4873284 | 49 | extern void func_cb_ntopt(int argc, char **argv); |
davidjhoward | 7:c0c03193612d | 50 | extern mDot *GLOBAL_mdot; |
jmarkel44 | 0:65cfa4873284 | 51 | |
jmarkel44 | 0:65cfa4873284 | 52 | #endif |