Utility library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems
Dependents: mtsas mtsas thermostat_fan_demo--fan mtsas ... more
NOTE: MTS-Utils has moved to GitHub. This version will not be updated. For updates, go to the GitHub version.
Diff: Utils.h
- Revision:
- 11:4f4966954da9
- Parent:
- 5:48d0ea2fe332
- Child:
- 15:ae12624eb600
--- a/Utils.h Wed Jul 16 14:24:00 2014 +0000 +++ b/Utils.h Fri Jan 23 16:53:33 2015 -0600 @@ -4,14 +4,10 @@ #include <string> //Defines a max function that can be used. -#ifndef MAX -#define MAX(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; }) -#endif +inline int mts_max(int a, int b) { return a > b ? a : b; } //Defines a min function that can be used. -#ifndef MIN -#define MIN(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) -#endif +inline int mts_min(int a, int b) { return a < b ? a : b; } ///An enumeration for relational operators enum RelationalOperator {