File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,17 @@ NS_INLINE uint16_t common_read_16_bit_inverse(const uint8_t data_buf[__static 2]
169169 */
170170NS_INLINE uint_fast8_t common_count_bits (uint8_t byte );
171171
172+ /*
173+ * Count leading zeros in a byte
174+ *
175+ * \deprecated Use common_count_leading_zeros_8
176+ *
177+ * \param byte byte to inspect
178+ *
179+ * \return number of leading zeros in byte (0-8)
180+ */
181+ NS_INLINE uint_fast8_t common_count_leading_zeros (uint8_t byte );
182+
172183/*
173184 * Count leading zeros in a byte
174185 *
@@ -196,9 +207,6 @@ NS_INLINE uint_fast8_t common_count_leading_zeros_16(uint16_t value);
196207 */
197208NS_INLINE uint_fast8_t common_count_leading_zeros_32 (uint32_t value );
198209
199- /* Backwards compatibility */
200- #define common_count_leading_zeros common_count_leading_zeros_8
201-
202210/*
203211 * Compare 8-bit serial numbers
204212 *
@@ -454,6 +462,11 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_bits(uint8_t byte)
454462 return count ;
455463}
456464
465+ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros (uint8_t byte )
466+ {
467+ return common_count_leading_zeros_8 (byte );
468+ }
469+
457470COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8 (uint8_t byte )
458471{
459472#ifdef __CC_ARM
You can’t perform that action at this time.
0 commit comments