![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
portSet.hpp@13:31a44ed824b0, 2022-07-05 (annotated)
- Committer:
- yootee
- Date:
- Tue Jul 05 09:00:35 2022 +0000
- Revision:
- 13:31a44ed824b0
- Parent:
- 12:562f433b5e98
ok
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yootee | 0:1456b6f84c75 | 1 | #pragma once |
yootee | 0:1456b6f84c75 | 2 | #include <mbed.h> |
yootee | 0:1456b6f84c75 | 3 | |
yootee | 13:31a44ed824b0 | 4 | inline int constrain(int x,int a,int b){ |
yootee | 13:31a44ed824b0 | 5 | return (x < a ? a : x > b ? b : x); |
yootee | 13:31a44ed824b0 | 6 | } |
yootee | 13:31a44ed824b0 | 7 | |
yootee | 13:31a44ed824b0 | 8 | inline double constrain(double x,double a,double b){ |
yootee | 13:31a44ed824b0 | 9 | return (x < a ? a : x > b ? b : x); |
yootee | 13:31a44ed824b0 | 10 | } |
yootee | 13:31a44ed824b0 | 11 | |
yootee | 0:1456b6f84c75 | 12 | typedef struct Port{ |
yootee | 0:1456b6f84c75 | 13 | PinName pin[2]; |
yootee | 0:1456b6f84c75 | 14 | }Port; |