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:
parent
c8f7c329a2
commit
a37fce6171
10 changed files with 27 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue