Skip to content

Commit 2c0fd06

Browse files
fabiobaltiericarlescufi
authored andcommitted
drivers: nrf_802154: add define guard to min and max
Add define guards to min and max so that they don't collide with the upstream ones. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 979a58d commit 2c0fd06

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/nrf_802154/sl/include/nrf_802154_sl_utils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@
6767
(NRF_802154_SL_RTC_FREQUENCY >> NRF_802154_SL_FREQUENCY_US_PER_S_GCD_BITS))
6868

6969
/**@brief Maximum of two values. */
70+
#ifndef max
7071
#define max(a, b) ((a) > (b) ? (a) : (b))
72+
#endif
7173

7274
/**@brief Minimum of two values. */
75+
#ifndef min
7376
#define min(a, b) ((a) < (b) ? (a) : (b))
77+
#endif
7478

7579
#ifndef CONTAINER_OF
7680
/**@brief Can be used to get a pointer to the structure which contains a given struct element.

0 commit comments

Comments
 (0)