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.
Safty/Safty.h@30:8f092276b2ba, 2019-10-22 (annotated)
- Committer:
- M_souta
- Date:
- Tue Oct 22 02:03:26 2019 +0000
- Revision:
- 30:8f092276b2ba
- Parent:
- 0:669ef71cba68
iii
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| t_yamamoto | 0:669ef71cba68 | 1 | #ifndef SAFTY_H_ |
| t_yamamoto | 0:669ef71cba68 | 2 | #define SAFTY_H_ |
| t_yamamoto | 0:669ef71cba68 | 3 | |
| t_yamamoto | 0:669ef71cba68 | 4 | #include <stdint.h> |
| M_souta | 30:8f092276b2ba | 5 | #include "Switch/Switch.h" |
| t_yamamoto | 0:669ef71cba68 | 6 | |
| t_yamamoto | 0:669ef71cba68 | 7 | namespace SAFTY { |
| t_yamamoto | 0:669ef71cba68 | 8 | #define DRIVECHECK_LIMITSW SWITCH::LimitSw::IsPressed(11) |
| t_yamamoto | 0:669ef71cba68 | 9 | |
| t_yamamoto | 0:669ef71cba68 | 10 | typedef struct |
| t_yamamoto | 0:669ef71cba68 | 11 | { |
| t_yamamoto | 0:669ef71cba68 | 12 | enum Elem |
| t_yamamoto | 0:669ef71cba68 | 13 | { |
| t_yamamoto | 0:669ef71cba68 | 14 | None = 0x00, |
| t_yamamoto | 0:669ef71cba68 | 15 | DrivePowerLost = 0x01, |
| t_yamamoto | 0:669ef71cba68 | 16 | ControllerLost = 0x02, |
| t_yamamoto | 0:669ef71cba68 | 17 | }; |
| t_yamamoto | 0:669ef71cba68 | 18 | }Error; |
| t_yamamoto | 0:669ef71cba68 | 19 | typedef uint8_t ErrorStatus; |
| t_yamamoto | 0:669ef71cba68 | 20 | |
| t_yamamoto | 0:669ef71cba68 | 21 | class ErrorCheck { |
| t_yamamoto | 0:669ef71cba68 | 22 | public: |
| t_yamamoto | 0:669ef71cba68 | 23 | static ErrorStatus Check(); |
| t_yamamoto | 0:669ef71cba68 | 24 | }; |
| t_yamamoto | 0:669ef71cba68 | 25 | } |
| t_yamamoto | 0:669ef71cba68 | 26 | |
| t_yamamoto | 0:669ef71cba68 | 27 | #endif |