Lines Matching refs:POS
45 BIT*(POS): `*' bit constant with just 1 bit set.
127 and POS */
130 #define _LSB_SHIFT(WIDTH, POS) (WIDTH - 1 - POS)
132 #define _LSB_SHIFT(WIDTH, POS) (POS)
136 #define _MSB_SHIFT(WIDTH, POS) (POS)
138 #define _MSB_SHIFT(WIDTH, POS) (WIDTH - 1 - POS)
143 NB: _MAKE_xxx_POS (WIDTH, _MAKE_xxx_SHIFT (WIDTH, POS)) == POS */
159 pos handles the posibility that the bit lies beyond the 32bit
209 #define LSBIT8(POS) ((uint8_t) 1 << (POS))
210 #define LSBIT16(POS) ((uint16_t)1 << (POS))
211 #define LSBIT32(POS) ((uint32_t)1 << (POS))
212 #define LSBIT64(POS) ((uint64_t)1 << (POS))
215 #define LSBIT(POS) LSBIT64 (POS)
218 #define LSBIT(POS) ((uint32_t)((POS) >= 32 \
220 : (1 << ((POS) >= 32 ? 0 : (POS)))))
223 #define LSBIT(POS) ((uint16_t)((POS) >= 16 \
225 : (1 << ((POS) >= 16 ? 0 : (POS)))))
229 #define MSBIT8(POS) ((uint8_t) 1 << ( 8 - 1 - (POS)))
230 #define MSBIT16(POS) ((uint16_t)1 << (16 - 1 - (POS)))
231 #define MSBIT32(POS) ((uint32_t)1 << (32 - 1 - (POS)))
232 #define MSBIT64(POS) ((uint64_t)1 << (64 - 1 - (POS)))
235 #define MSBIT(POS) MSBIT64 (POS)
238 #define MSBIT(POS) ((uint32_t)((POS) < 32 \
240 : (1 << ((POS) < 32 ? 0 : (64 - 1) - (POS)))))
243 #define MSBIT(POS) ((uint16_t)((POS) < 48 \
245 : (1 << ((POS) < 48 ? 0 : (64 - 1) - (POS)))))
251 #define BIT4(POS) (1 << _LSB_SHIFT (4, (POS)))
252 #define BIT5(POS) (1 << _LSB_SHIFT (5, (POS)))
253 #define BIT10(POS) (1 << _LSB_SHIFT (10, (POS)))
535 #define BLIT32(V, POS, BIT) \
538 V |= BIT32 (POS); \
540 V &= ~BIT32 (POS); \