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.
ICE-Application/src/OutputTask/OutputTask.h@0:61364762ee0e, 2017-01-24 (annotated)
- Committer:
- jmarkel44
- Date:
- Tue Jan 24 19:05:33 2017 +0000
- Revision:
- 0:61364762ee0e
Port from IAR to Nucleo-F412 board
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmarkel44 | 0:61364762ee0e | 1 | #ifndef OUTPUTTASK_H |
jmarkel44 | 0:61364762ee0e | 2 | #define OUTPUTTASK_H |
jmarkel44 | 0:61364762ee0e | 3 | |
jmarkel44 | 0:61364762ee0e | 4 | #ifdef __cplusplus |
jmarkel44 | 0:61364762ee0e | 5 | #define EXTERNC extern "C" |
jmarkel44 | 0:61364762ee0e | 6 | #else |
jmarkel44 | 0:61364762ee0e | 7 | #define EXTERNC |
jmarkel44 | 0:61364762ee0e | 8 | #endif |
jmarkel44 | 0:61364762ee0e | 9 | |
jmarkel44 | 0:61364762ee0e | 10 | // thread prototype |
jmarkel44 | 0:61364762ee0e | 11 | EXTERNC void OutputTask(void const *args); |
jmarkel44 | 0:61364762ee0e | 12 | |
jmarkel44 | 0:61364762ee0e | 13 | #undef EXTERNC |
jmarkel44 | 0:61364762ee0e | 14 | |
jmarkel44 | 0:61364762ee0e | 15 | // FIXME: think about analog! |
jmarkel44 | 0:61364762ee0e | 16 | typedef enum { |
jmarkel44 | 0:61364762ee0e | 17 | CONTROL_OFF = 0, |
jmarkel44 | 0:61364762ee0e | 18 | CONTROL_ON = 1 |
jmarkel44 | 0:61364762ee0e | 19 | } ControlState; |
jmarkel44 | 0:61364762ee0e | 20 | |
jmarkel44 | 0:61364762ee0e | 21 | // public functions |
jmarkel44 | 0:61364762ee0e | 22 | void DisplayOutputs(void); |
jmarkel44 | 0:61364762ee0e | 23 | |
jmarkel44 | 0:61364762ee0e | 24 | #define RELAY_STATUS_AUTO_ON 129 // automatic control ON |
jmarkel44 | 0:61364762ee0e | 25 | #define RELAY_STATUS_AUTO_OFF 128 // automatic control OFF |
jmarkel44 | 0:61364762ee0e | 26 | #define RELAY_STATUS_MANUAL_ON 65 // manual control ON |
jmarkel44 | 0:61364762ee0e | 27 | #define RELAY_STATUS_MANUAL_OFF 64 // manual control OFF |
jmarkel44 | 0:61364762ee0e | 28 | #define RELAY_STATUS_FAILSAFE_ON 33 // general failsafe duty ON |
jmarkel44 | 0:61364762ee0e | 29 | #define RELAY_STATUS_FAILSAFE_OFF 32 // general failsafe duty OFF |
jmarkel44 | 0:61364762ee0e | 30 | #define RELAY_STATUS_FORCED_OFF 16 // ?? |
jmarkel44 | 0:61364762ee0e | 31 | #define RELAY_STATUS_FLOW_FAILSAFE_ON 9 // flow failsafe control ON |
jmarkel44 | 0:61364762ee0e | 32 | #define RELAY_STATUS_FLOW_FAILSAFE_OFF 8 // flaw failsafe control OFF |
jmarkel44 | 0:61364762ee0e | 33 | #define RELAY_STATUS_NOT_CONTROLLED 0 // no controls |
jmarkel44 | 0:61364762ee0e | 34 | |
jmarkel44 | 0:61364762ee0e | 35 | #define OUTPUT_STR "output_" |
jmarkel44 | 0:61364762ee0e | 36 | #define VOUTPUT_STR "voutput_" |
jmarkel44 | 0:61364762ee0e | 37 | #endif |