drivers: counter: Add optional flags to alarm configuration structure

Flags in alarm configuration structure will allow further extention
without breaking API. Initially, existing absolute flag was added
as the only flag.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-05-20 09:46:19 +02:00 committed by Maureen Helm
commit a37fce6171
10 changed files with 27 additions and 18 deletions

View file

@ -101,7 +101,7 @@ static int mcux_rtc_set_alarm(struct device *dev, u8_t chan_id,
return -EBUSY;
}
if (!alarm_cfg->absolute) {
if ((alarm_cfg->flags & COUNTER_ALARM_CFG_ABSOLUTE) == 0) {
ticks += current;
}