<string.h>: Strings


Defines

#define _FFS(x)

Detailed Description

 #include <string.h> 

The string functions perform string operations on NULL terminated strings.

Note:
If the strings you are working on resident in program space (flash), you will need to use the string functions described in avr_pgmspace.

Define Documentation

#define _FFS (  ) 

Value:

( (x) & 1 ? 1           \
        : (x) & 2 ? 2           \
        : (x) & 4 ? 3           \
        : (x) & 010 ? 4         \
        : (x) & 020 ? 5         \
        : (x) & 040 ? 6         \
        : (x) & 0100 ? 7        \
        : (x) & 0200 ? 8        \
        : (x) & 0400 ? 9        \
        : (x) & 01000 ? 10      \
        : (x) & 02000 ? 11      \
        : (x) & 04000 ? 12      \
        : (x) & 010000 ? 13     \
        : (x) & 020000 ? 14     \
        : (x) & 040000 ? 15     \
        : (x) & 0100000 ? 16    \
        : 0 )
This macro finds the first (least significant) bit set in the input value.

This macro is very similar to the function ffs() except that it evaluates its argument at compile-time, so it should only be applied to compile-time constant expressions where it will reduce to a constant itself. Application of this macro to expressions that are not constant at compile-time is not recommended, and might result in a huge amount of code generated.

Returns:
The _FFS() macro 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.

Definition at line 90 of file string.h.


Generated on Sun Aug 31 13:31:33 2008 for FrankenRTOS by  doxygen 1.5.6