![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
Diff: portSet.hpp
- Revision:
- 2:e7b09385d197
- Parent:
- 0:1456b6f84c75
- Child:
- 12:562f433b5e98
--- a/portSet.hpp Fri Feb 25 05:21:14 2022 +0000 +++ b/portSet.hpp Sun Mar 27 04:39:16 2022 +0000 @@ -1,6 +1,10 @@ #pragma once #include <mbed.h> +inline double constrain(double x,double minimum,double maximum){ + return (x < minimum ? minimum : x > maximum ? maximum : x); +} + typedef struct Port{ PinName pin[2]; }Port; \ No newline at end of file