Skip to content

Commit 9ba7a7d

Browse files
samples: drivers: counter: alarm: add definition for alarm flag
Counter devices can use this definition to specify alarm flags. Signed-off-by: CHEN Xing <[email protected]>
1 parent b1488eb commit 9ba7a7d

File tree

1 file changed

+2
-1
lines changed
  • samples/drivers/counter/alarm/src

1 file changed

+2
-1
lines changed

samples/drivers/counter/alarm/src/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#define DELAY 2000000
1414
#define ALARM_CHANNEL_ID 0
15+
#define ALARM_FLAGS 0
1516

1617
struct counter_alarm_cfg alarm_cfg;
1718

@@ -133,7 +134,7 @@ int main(void)
133134

134135
counter_start(counter_dev);
135136

136-
alarm_cfg.flags = 0;
137+
alarm_cfg.flags = ALARM_FLAGS;
137138
alarm_cfg.ticks = counter_us_to_ticks(counter_dev, DELAY);
138139
alarm_cfg.callback = test_counter_interrupt_fn;
139140
alarm_cfg.user_data = &alarm_cfg;

0 commit comments

Comments
 (0)