include/utils.h | raw changeset files shortlog |
1.1 --- a/include/utils.h Sat Nov 10 23:38:09 2018 +0100 1.2 +++ b/include/utils.h Sun Nov 11 18:15:24 2018 +0100 1.3 @@ -22,6 +22,10 @@ 1.4 1.5 #include <stdint.h> 1.6 1.7 +#define abs(x) ((x) < 0 ? -(x) : (x)) 1.8 +#define max(x, y) ((x) > (y) ? (x) : (y)) 1.9 +#define min(x, y) ((x) < (y) ? (x) : (y)) 1.10 + 1.11 void wait(uint32_t delay); 1.12 1.13 uint8_t *wrap_pointer(uint8_t *ptr, uint8_t *lower, uint8_t *upper);