Commit 2e8afbf1 authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto

Added an enumeration to handle the channel numbers

Signed-off-by: Miguel Gómez Sexto's avatarMiguel Gomez <magomez@igalia.com>
parent 17d9a519
......@@ -18,6 +18,13 @@ struct tdc_time {
uint64_t bins;
};
enum {
CHAN0 = 1 << 0,
CHAN1 = 1 << 1,
CHAN2 = 1 << 2,
CHAN3 = 1 << 3,
CHAN4 = 1 << 4
};
extern int tdc_init(void);
extern void tdc_exit(void);
......
......@@ -72,7 +72,7 @@ int main(int argc, char **argv)
printf("Timestamps threshold functions OK\n");
/* set/get active channels */
set = 12;
set = CHAN0 | CHAN2 | CHAN4;
if (tdc_set_active_channels(b, set))
printf("Error setting active channels\n");
if (tdc_get_active_channels(b, &get))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment