Go to the documentation of this file.
88 #define RKH_BIT(bit) (1u << (bit))
101 #define RKH_BIT08(bit) ((rui8_t)((rui8_t) 1u << (bit)))
102 #define RKH_BIT16(bit) ((rui16_t)((rui16_t) 1u << (bit)))
103 #define RKH_BIT32(bit) ((rui32_t)((rui32_t) 1u << (bit)))
118 #define RKH_BIT_MASK(bit_mask, bit_shift) \
119 ((bit_mask) << (bit_shift))
133 #define RKH_BIT_MASK_08(bit_mask, bit_shift) \
134 ((rui8_t)((rui8_t)(bit_mask) << (bit_shift)))
135 #define RKH_BIT_MASK_16(bit_mask, bit_shift) \
136 ((rui16_t)((rui16_t)(bit_mask) << (bit_shift)))
137 #define RKH_BIT_MASK_32(bit_mask, bit_shift) \
138 ((rui32_t)((rui32_t)(bit_mask) << (bit_shift)))
153 #define RKH_BIT_SET_08(val, mask) \
154 ((val) = (rui8_t)(((rui8_t)(val)) | ((rui8_t)(mask))))
155 #define RKH_BIT_SET_16(val, mask) \
156 ((val) = (rui16_t)(((rui16_t)(val)) | ((rui16_t)(mask))))
157 #define RKH_BIT_SET_32(val, mask) \
158 ((val) = (rui32_t)(((rui32_t)(val)) | ((rui32_t)(mask))))
173 #define RKH_BIT_CLR_08(val, mask) \
174 ((val) = (rui8_t)(((rui8_t)(val)) & ((rui8_t) ~(mask))))
175 #define RKH_BIT_CLR_16(val, mask) \
176 ((val) = (rui16_t)(((rui16_t)(val)) & ((rui16_t) ~(mask))))
177 #define RKH_BIT_CLR_32(val, mask) \
178 ((val) = (rui32_t)(((rui32_t)(val)) & ((rui32_t) ~(mask))))
194 #define RKH_BIT_IS_SET(val, mask) \
195 ((((mask) != 0u) && \
196 (((val) & (mask)) == (mask))) ? (RKH_YES) : (RKH_NO))
211 #define RKH_BIT_IS_CLR(val, mask) \
212 ((((mask) != 0u) && \
213 (((val) & (mask)) == 0u)) ? (RKH_YES) : (RKH_NO))
228 #define RKH_BIT_IS_SET_ANY(val, mask) \
229 ((((val) & (mask)) == 0u) ? (RKH_NO) : (RKH_YES))
244 #define RKH_BIT_IS_CLR_ANY(val, mask) \
245 ((((val) & (mask)) == (mask)) ? (RKH_NO) : (RKH_YES))
248 #define RKH_NULL ((void *) 0)
262 #define RKH_DISABLED 0u
263 #define RKH_ENABLED 1u
265 #define RKH_INACTIVE 0u
266 #define RKH_ACTIVE 1u
268 #define RKH_INVALID 0u