- Main Page
- Modules
- Data Structures
- Files

# Generic Findbit
[Configuration: Pico Layer]

## Defines
#define | POSCFG_FBIT_USE_LUTABLE 0
#define | POSCFG_FBIT_BITSHIFT 1

## Detailed Description

The pico]OS is shipped with a generic file that implements variouse methods for finding the first and least significant bit set. This section contains switches for configuring the file fbit_gen.c. Please see the section pico]OS Porting Information for details about findbit.

## Define Documentation

#define POSCFG_FBIT_BITSHIFT 1

| Generic finbit configuration, machine bit-shift ability. Some machines are very slow in doing bit-shifts. If your target is such a machine, you can define this parameter to zero to prevent findbit of doing excessive bitshifts.

#define POSCFG_FBIT_USE_LUTABLE 0

| Generic finbit configuration, look-up table support. The findbit mechanism can be implemented as look-up table. POSCFG_FBIT_USE_LUTABLE = 0: Do not use look up tables. "findbit" is implemented as a function. (This does not increase code size through tables. Also some CPUs may execute program code faster from their caches than fetching data from big lookup tables.) Note: This is the only possible setting for systems with MVAR_BITS != 8 POSCFG_FBIT_USE_LUTABLE = 1: When round robin scheduling is disabled, findbit is done by use of a 256 byte sized lookup table. When round robin scheduling is enabled, findbit is implemented as a function and uses a 256 byte sized lookup table. POSCFG_FBIT_USE_LUTABLE = 2: This is only applicable for round robin scheduling. "findbit" is implemented as a two dimensional lookup table. This blows code size very much.