Skip to content

Commit 6fc33f4

Browse files
committed
Fixed incorrect instruction in IAR ctz implementation
The RBIT instruction reverses the bits of a word, not REV
1 parent 383677f commit 6fc33f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

littlefs/lfs_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static inline uint32_t lfs_min(uint32_t a, uint32_t b) {
3838

3939
static inline uint32_t lfs_ctz(uint32_t a) {
4040
#ifdef __ICCARM__
41-
return __CLZ(__REV(a));
41+
return __CLZ(__RBIT(a));
4242
#else
4343
return __builtin_ctz(a);
4444
#endif

0 commit comments

Comments
 (0)