drivers/counter_cmos.c: Add config struct

Added config struct to enable use of generic API functions.

Signed-off-by: Carver Forbes <carver.forbes@gmail.com>
This commit is contained in:
Carver Forbes 2019-07-16 13:38:41 -07:00 committed by Anas Nashif
parent ad183ce6af
commit 9d42858821

View file

@ -198,10 +198,14 @@ static int init(struct device *dev)
return 0;
}
static const struct counter_config_info info = {
.max_top_value = UINT_MAX,
.freq = 1
};
static const struct counter_driver_api api = {
.read = read
};
DEVICE_AND_API_INIT(counter_cmos, "CMOS", init, NULL, NULL,
DEVICE_AND_API_INIT(counter_cmos, "CMOS", init, NULL, &info,
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &api);