driver/input: most of the input code

This commit is contained in:
2021-10-28 18:20:02 +08:00
parent 4da91139a7
commit 94ab9ffb41
9 changed files with 303 additions and 8 deletions

View File

@ -32,3 +32,12 @@ static inline int intmax3(int x, int y, int z) {
else
return z;
}
static inline int intminmax(int x, int min, int max) {
if (x < min)
return min;
else if (x > max)
return max;
else
return x;
}