Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API rig_setting2idx ( setting_t  s )

basically convert setting_t expressed 2^n to n

sThe setting to convert to

Converts a setting_t value expressed by 2^n to the value of n.

the index such that 2^n is the setting, otherwise 0 if the setting was not found.

Definition at line 627 of file settings.c.

      int i;

      for (i = 0; i<RIG_SETTING_MAX; i++) {
            if (s & rig_idx2setting(i))
                  return i;

      return 0;

Generated by  Doxygen 1.6.0   Back to index