diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-05-31 21:19:24 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-06-03 12:46:26 +0000 |
commit | 2549c1e696cc4991a7b5f15f2f81b909b9da6c1b (patch) | |
tree | 4c08abf859cb255f2c1bcb94b9c08d80711d751d /src | |
parent | ba8918aae8342497e6e219239f3ed29dc8290349 (diff) |
Document pcu_lsb() function
While at it, fix a typo in the test output.
This function is nowadays only used in ms_current_pacch_slots(), which
is used only to print the PACCH TS (the first common UL & DL TS).
Change-Id: Id1d0b681f6866618f9f3a8c64d6a6c809ca50ea7
Diffstat (limited to 'src')
-rw-r--r-- | src/pcu_utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pcu_utils.h b/src/pcu_utils.h index 0be37e94..540f7049 100644 --- a/src/pcu_utils.h +++ b/src/pcu_utils.h @@ -72,6 +72,9 @@ inline unsigned int pcu_bitcount(unsigned long long x) return __builtin_popcountll(x); } +/* Trim all 1 bits except the Least Significat Bit, which is kept. + * equivalent of (1 << ffs(u)) / 2 + */ static inline uint8_t pcu_lsb(uint8_t x) { return x & -x; |