7e02a0379f
The counter_native_posix driver currently does not support top value configuration, i.e. `ctr_set_top_value` returns `-ENOTSUP`. This commit adds support for top value configuration, and with the counter API now fully implemented, adds `counter` to `supported` peripherals for native_posix target. It also resolves an existing bug in which the counter ISR did not reset upon reaching `TOP_VALUE`. And adds support for multiple channels Signed-off-by: Jason Wright <jason@jpw.nyc> Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
18 lines
467 B
Plaintext
18 lines
467 B
Plaintext
# Copyright (c) 2020, Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config COUNTER_NATIVE_POSIX
|
|
bool "Counter on COUNTER_0"
|
|
default y
|
|
depends on DT_HAS_ZEPHYR_NATIVE_POSIX_COUNTER_ENABLED
|
|
|
|
config COUNTER_NATIVE_POSIX_FREQUENCY
|
|
int "native_posix counter frequency in Hz"
|
|
default 1000
|
|
depends on COUNTER_NATIVE_POSIX
|
|
|
|
config COUNTER_NATIVE_POSIX_NBR_CHANNELS
|
|
int "native counter, number of channels"
|
|
default 4
|
|
depends on COUNTER_NATIVE_POSIX
|