|
OS
v7.3.3
Documentation
|
Loading...
Searching...
No Matches
28 #define qFLM_BitsSet( dst, xBits ) (dst) |= (xBits)
36 #define qFLM_BitsClear( dst, xBits ) (dst) &= ~(xBits)
45 #define qFLM_BitSet( dst, xBit, xType ) \
46 (dst) |= (xType)( (xType)1U << (xBit) ) \
55 #define qFLM_BitClear( dst, xBit, xType ) \
56 (dst) &= (xType)( ~( (xType)1U << (xBit) ) ) \
65 #define qFLM_BitRead( dst, xBit ) \
66 ( ( qFalse == ( (dst) & ( 1 << (xBit) ) ) ) ? qFalse : qTrue ) \
75 #define qFLM_BitToggle( dst, xBit ) ( (dst) ^= ( 1 << (xBit) ) )
84 #define qFLM_BitWrite( dst, xBit, xVal ) \
85 ( (xVal) ? qFLM_BitSet( (dst), (xBit) ) \
86 : qFLM_BitClear( (dst),(xBit) ) ) \
93 #define qFLM_BitMakeByte( b7, b6, b5, b4, b3, b2, b1, b0 ) \
110 #define qFLM_ByteHighNibble( dst ) ( (qUINT8_t)( (dst) >> 4 ) )
117 #define qFLM_ByteLowNibble( dst ) ( (qUINT8_t)( (dst) & 0x0F ) )
125 #define qFLM_ByteMergeNibbles( H, L ) \
126 ( (qUINT8_t)( ( (H) << 4 ) | ( 0x0F & (L) ) ) ) \
133 #define qFLM_WordHighByte( dst ) ( (qUINT8_t)( (dst) >> 8 ) )
140 #define qFLM_WordLowByte( dst ) ( (qUINT8_t)( (dst) & 0x00FF ) )
148 #define qFLM_WordMergeBytes( H, L ) \
149 ( (qUINT16_t) ( ( (H) << 8 ) | (L) ) ) \
156 #define qFLM_DWordHighWord( dst ) ( (qUINT16_t)( (dst) >> 16 ) )
163 #define qFLM_DWordLowWord( dst ) ( (qUINT16_t)( (dst) & 0xFFFF ) )
171 #define qFLM_DWordMergeWords( H, L ) \
172 ( (qUINT32_t)( ( (qUINT32_t)(H) << 16 ) | (L) ) ) \
182 #define qFLM_Clip( X, Min, Max ) \
183 ( ( (X) < (Min) ) ? (Min) : ( ( (X) > (Max) ) ? (Max) : (X) ) ) \
191 #define qFLM_ClipUpper( X, Max ) ( ( (X) > (Max) ) ? (Max) : (X) )
199 #define qFLM_ClipLower( X, Min ) ( ( (X) < (Min) ) ? (Min) : (X) )
210 #define qFLM_IsBetween( X, Low, High ) \
211 ( ( (X) >= (Low) ) && ( (X) <= (High) ) ) \
219 #define qFLM_Min( a, b ) ( ( (a) < (b) ) ? (a) : (b) )
227 #define qFLM_Max( a, b ) ( ( (a) > (b) ) ? (a) : (b) )
234 #define qFLM_ArraySize( x ) ( sizeof((x))/sizeof((x)[ 0 ]) )