13 #ifndef _MpDspUtilsSerials_h_ 14 #define _MpDspUtilsSerials_h_ 24 #define UINT32_HALF UINT32_C(2147483648) 25 #define UINT16_HALF UINT16_C(32768) 28 #define MP_COMPARE_SERIALS(val1, val2, range_half) \ 29 (((val1) == (val2)) ? 0 : \ 30 ((val1) >= (range_half)) ? ((((val1)-(range_half) < (val2)) && ((val2) < (val1))) ? 1 : -1) : \ 31 ((((val1)+(range_half) < (val2)) || ((val2) < (val1))) ? 1 : -1)) 45 #endif // _MpDspUtilsSerials_h_ static int compareSerials(uint32_t val1, uint32_t val2)
Is val1 bigger, equal or lesser then val2.
Definition: MpDspUtilsSerials.h:35
#define UINT16_HALF
Half of unsigned 16-bit integer range (2^15)
Definition: MpDspUtilsSerials.h:25
#define MP_COMPARE_SERIALS(val1, val2, range_half)
Definition: MpDspUtilsSerials.h:28
#define UINT32_HALF
Half of unsigned 32-bit integer range (2^31)
Definition: MpDspUtilsSerials.h:24