forked from mirror/uv-k5-firmware
Move ARRAY_SIZE macro to misc.h.
This allows reuse in other files.
This commit is contained in:
parent
8d6cd655dd
commit
d935aa9885
@ -21,8 +21,6 @@
|
||||
#include "driver/system.h"
|
||||
#include "misc.h"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
static const uint16_t BK1080_RegisterTable[] = {
|
||||
0x0008, 0x1080, 0x0201, 0x0000,
|
||||
0x40C0, 0x0A1F, 0x002E, 0x02FF,
|
||||
|
2
misc.h
2
misc.h
@ -20,6 +20,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
#define IS_MR_CHANNEL(x) ((x) >= MR_CHANNEL_FIRST && (x) <= MR_CHANNEL_LAST)
|
||||
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_NOAA_CHANNEL(x) ((x) >= NOAA_CHANNEL_FIRST && (x) <= NOAA_CHANNEL_LAST)
|
||||
|
Loading…
Reference in New Issue
Block a user