Git
Wiki
Site
projects
/
soft
/
lpc122x
/
core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af7b17d
)
Add MIN and MAX (defines) to lib/utils.h
author
Nathael Pajani
<nathael.pajani@ed3l.fr>
Fri, 28 Oct 2016 01:21:10 +0000
(
03:21
+0200)
committer
Nathael Pajani
<nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000
(17:03 +0100)
include/lib/utils.h
patch
|
blob
|
history
diff --git
a/include/lib/utils.h
b/include/lib/utils.h
index
5062d1c
..
7620c4e
100644
(file)
--- a/
include/lib/utils.h
+++ b/
include/lib/utils.h
@@
-63,5
+63,12
@@
static inline uint32_t htonl(uint32_t val) __attribute__ ((alias ("byte_swap_32"
/* Short versions */
static inline uint32_t ntohs(uint32_t val) __attribute__ ((alias ("byte_swap_16")));
static inline uint32_t htons(uint32_t val) __attribute__ ((alias ("byte_swap_16")));
+
+
+/* MIN and MAX */
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+
+
#endif /* LIB_UTILS_H */
Techno-Innov
42 impasse de la Combe du Bois
01150 Blyes - France
contact@techno-innov.fr
Design et hébergement du site :
Techno-Innov
Techno-Innov
- SARL Coopérative
539 169 417 RCS Bourg-en-Bresse
Ce site n'utilise pas de cookies, désolé pour les gourmands !