Scan range in spectrum

This commit is contained in:
Krzysiek Egzmont
2023-12-16 14:46:01 +01:00
parent 0d66eb8577
commit 39eb3e835e
7 changed files with 139 additions and 26 deletions

4
misc.h
View File

@@ -32,6 +32,10 @@
#define MIN(a, b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
#endif
#ifndef SWAP
#define SWAP(a, b) ({ __typeof__ (a) _c = (a); a = b; b = _c; })
#endif
#define IS_MR_CHANNEL(x) ((x) <= MR_CHANNEL_LAST)
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
#define IS_VALID_CHANNEL(x) ((x) < LAST_CHANNEL)