A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: action.cpp
- Revision:
- 41:db727df5f98b
- Parent:
- 40:a94674b4f5a2
diff -r a94674b4f5a2 -r db727df5f98b action.cpp --- a/action.cpp Thu Oct 05 09:00:18 2017 +0000 +++ b/action.cpp Fri Oct 06 10:18:01 2017 +0000 @@ -1,3 +1,7 @@ -int ActionMakeFromDestAndTrace(int dest, bool trace) { return trace ? dest | 0x8000 : dest & 0x7FFF; } -int ActionGetDestPart (int action) { return action & 0x7FFF; } -bool ActionGetTracePart (int action) { return action & 0x8000; } \ No newline at end of file +int ActionMakeFromDestAndTrace(int dest, bool trace) +{ + if (trace) return dest | 0x8000; + else return dest & 0x7FFF; +} +int ActionGetDestPart (int action) { return action & 0x7FFF; } +bool ActionGetTracePart(int action) { return action & 0x8000; } \ No newline at end of file