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]
169
169
*/
170
170
NS_INLINE uint_fast8_t common_count_bits (uint8_t byte );
171
171
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
+
172
183
/*
173
184
* Count leading zeros in a byte
174
185
*
@@ -196,9 +207,6 @@ NS_INLINE uint_fast8_t common_count_leading_zeros_16(uint16_t value);
196
207
*/
197
208
NS_INLINE uint_fast8_t common_count_leading_zeros_32 (uint32_t value );
198
209
199
- /* Backwards compatibility */
200
- #define common_count_leading_zeros common_count_leading_zeros_8
201
-
202
210
/*
203
211
* Compare 8-bit serial numbers
204
212
*
@@ -454,6 +462,11 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_bits(uint8_t byte)
454
462
return count ;
455
463
}
456
464
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
+
457
470
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8 (uint8_t byte )
458
471
{
459
472
#ifdef __CC_ARM
You can’t perform that action at this time.
0 commit comments