zephyr/drivers/counter
Henrik Brix Andersen c894a6db4d drivers: counter: add counter_get_value(), deprecate counter_read()
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.

Update all drivers and calling code to match the new counter API.

The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).

Fixes #21846.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-01-28 12:52:46 -05:00
..
CMakeLists.txt drivers: counters: Fix coding style issues 2019-09-24 11:40:53 -07:00
counter_cmos.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_gecko_rtcc.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_handlers.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_imx_epit.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_ll_stm32_rtc.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_mchp_xec.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_mcux_gpt.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_mcux_rtc.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_nrfx_rtc.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_nrfx_timer.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
counter_sam0_tc32.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
dualtimer_cmsdk_apb.h cleanup: include/: move counter.h to drivers/counter.h 2019-06-27 22:55:49 -04:00
Kconfig kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.cmos kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.dtmr_cmsdk_apb kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.gecko kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.imx_epit kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.mcux_gpt kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.mcux_rtc kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.nrfx kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.sam0 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.stm32_rtc kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.template.sam0_tc32 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.tmr_cmsdk_apb kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.xec kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
timer_cmsdk_apb.h cleanup: include/: move counter.h to drivers/counter.h 2019-06-27 22:55:49 -04:00
timer_dtmr_cmsdk_apb.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00
timer_tmr_cmsdk_apb.c drivers: counter: add counter_get_value(), deprecate counter_read() 2020-01-28 12:52:46 -05:00