Go to the documentation of this file.
86 #define RKH_BIT(bit) (1u << (bit))
99 #define RKH_BIT08(bit) ((rui8_t)((rui8_t) 1u << (bit)))
100 #define RKH_BIT16(bit) ((rui16_t)((rui16_t) 1u << (bit)))
101 #define RKH_BIT32(bit) ((rui32_t)((rui32_t) 1u << (bit)))
116 #define RKH_BIT_MASK(bit_mask, bit_shift) \
117 ((bit_mask) << (bit_shift))
131 #define RKH_BIT_MASK_08(bit_mask, bit_shift) \
132 ((rui8_t)((rui8_t)(bit_mask) << (bit_shift)))
133 #define RKH_BIT_MASK_16(bit_mask, bit_shift) \
134 ((rui16_t)((rui16_t)(bit_mask) << (bit_shift)))
135 #define RKH_BIT_MASK_32(bit_mask, bit_shift) \
136 ((rui32_t)((rui32_t)(bit_mask) << (bit_shift)))
151 #define RKH_BIT_SET_08(val, mask) \
152 ((val) = (rui8_t)(((rui8_t)(val)) | ((rui8_t)(mask))))
153 #define RKH_BIT_SET_16(val, mask) \
154 ((val) = (rui16_t)(((rui16_t)(val)) | ((rui16_t)(mask))))
155 #define RKH_BIT_SET_32(val, mask) \
156 ((val) = (rui32_t)(((rui32_t)(val)) | ((rui32_t)(mask))))
171 #define RKH_BIT_CLR_08(val, mask) \
172 ((val) = (rui8_t)(((rui8_t)(val)) & ((rui8_t) ~(mask))))
173 #define RKH_BIT_CLR_16(val, mask) \
174 ((val) = (rui16_t)(((rui16_t)(val)) & ((rui16_t) ~(mask))))
175 #define RKH_BIT_CLR_32(val, mask) \
176 ((val) = (rui32_t)(((rui32_t)(val)) & ((rui32_t) ~(mask))))
192 #define RKH_BIT_IS_SET(val, mask) \
193 ((((mask) != 0u) && \
194 (((val) & (mask)) == (mask))) ? (RKH_YES) : (RKH_NO))
209 #define RKH_BIT_IS_CLR(val, mask) \
210 ((((mask) != 0u) && \
211 (((val) & (mask)) == 0u)) ? (RKH_YES) : (RKH_NO))
226 #define RKH_BIT_IS_SET_ANY(val, mask) \
227 ((((val) & (mask)) == 0u) ? (RKH_NO) : (RKH_YES))
242 #define RKH_BIT_IS_CLR_ANY(val, mask) \
243 ((((val) & (mask)) == (mask)) ? (RKH_NO) : (RKH_YES))
246 #define RKH_NULL ((void *) 0)
260 #define RKH_DISABLED 0u
261 #define RKH_ENABLED 1u
263 #define RKH_INACTIVE 0u
264 #define RKH_ACTIVE 1u
266 #define RKH_INVALID 0u