The ffs() function returns the position of the first (least significant) bit set in the word val, or 0 if no bits are set. The least significant bit is position 1.
Note:
For expressions that are constant at compile time, consider using the _FFS macro instead.
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.