Home
last modified time | relevance | path

Searched full:counter (Results 1 – 25 of 1393) sorted by relevance

12345678910>>...56

/Zephyr-latest/drivers/counter/
DKconfig1 # Counter configuration options
6 menuconfig COUNTER config
7 bool "Counter drivers"
9 Enable support for counter and timer.
11 if COUNTER
14 int "Counter init priority"
17 Counter driver device initialization priority.
20 bool "Counter shell"
23 Enable Shell Commands for Counter and Timer
25 module = COUNTER
[all …]
Dcounter_mchp_xec.c11 * @brief Microchip XEC Counter driver
17 * - Interrupts are triggered (if enabled) when the counter
21 * the counter values are changed so that interrupts are triggered
29 #include <zephyr/drivers/counter.h>
63 struct btmr_regs *counter = COUNTER_XEC_REG_BASE(dev); in counter_xec_start() local
65 if (counter->CTRL & MCHP_BTMR_CTRL_ENABLE) { in counter_xec_start()
69 counter->CTRL |= (MCHP_BTMR_CTRL_ENABLE | MCHP_BTMR_CTRL_START); in counter_xec_start()
71 LOG_DBG("%p Counter started", dev); in counter_xec_start()
78 struct btmr_regs *counter = COUNTER_XEC_REG_BASE(dev); in counter_xec_stop() local
81 if (!(counter->CTRL & MCHP_BTMR_CTRL_ENABLE)) { in counter_xec_stop()
[all …]
/Zephyr-latest/include/zephyr/net/prometheus/
Dcounter.h14 * @brief Prometheus counter APIs.
26 * @brief Type used to represent a Prometheus counter metric.
29 * * See https://prometheus.io/docs/concepts/metric_types/#counter
32 /** Base of the Prometheus counter metric */
34 /** Value of the Prometheus counter metric */
41 * @brief Prometheus Counter definition.
43 * This macro defines a Counter metric. If you want to make the counter static,
46 * @param _name The counter metric name
47 * @param _desc Counter description
55 * PROMETHEUS_COUNTER_DEFINE(http_request_counter, "HTTP request counter",
[all …]
/Zephyr-latest/tests/net/lib/prometheus/formatter/src/
Dmain.c9 #include <zephyr/net/prometheus/counter.h>
15 PROMETHEUS_COUNTER_DEFINE(test_counter, "Test counter",
16 ({ .key = "test", .value = "counter" }), NULL);
17 PROMETHEUS_COUNTER_DEFINE(test_counter2, "Test counter 2",
18 ({ .key = "test", .value = "counter" }), NULL);
24 * @details The test shall increment the counter value by 1 and check if the
32 struct prometheus_counter *counter; in ZTEST() local
33 char exposed[] = "# HELP test_counter2 Test counter 2\n" in ZTEST()
34 "# TYPE test_counter2 counter\n" in ZTEST()
35 "test_counter2{test=\"counter\"} 1\n" in ZTEST()
[all …]
/Zephyr-latest/tests/drivers/counter/counter_basic_api/
Dtestcase.yaml2 drivers.counter.basic_api:
5 - counter
6 depends_on: counter
10 drivers.counter.basic_api.nrf_zli:
13 - counter
14 depends_on: counter
23 drivers.counter.basic_api.stm32_subsec:
26 - counter
27 depends_on: counter
35 drivers.counter.basic_api.rtc_1khz:
[all …]
/Zephyr-latest/tests/net/lib/prometheus/collector/src/
Dmain.c9 #include <zephyr/net/prometheus/counter.h>
12 PROMETHEUS_COUNTER_DEFINE(test_counter_m, "Test counter",
20 * @details The test shall increment the counter value by 1 and check if the
23 * @details The test shall register the counter to the collector and check if the
24 * counter is found in the collector.
29 struct prometheus_counter *counter; in ZTEST() local
33 counter = (struct prometheus_counter *)prometheus_collector_get_metric( in ZTEST()
36 zassert_equal_ptr(counter, &test_counter_m, in ZTEST()
37 "Counter not found in collector (expected %p, got %p)", in ZTEST()
38 &test_counter_m, counter); in ZTEST()
[all …]
/Zephyr-latest/tests/net/lib/prometheus/counter/src/
Dmain.c9 #include <zephyr/net/prometheus/counter.h>
11 PROMETHEUS_COUNTER_DEFINE(test_counter_m, "Test counter",
17 * @details The test shall increment the counter value by 1 and check if the
24 zassert_equal(test_counter_m.value, 0, "Counter value is not 0"); in ZTEST()
27 zassert_ok(ret, "Error incrementing counter"); in ZTEST()
29 zassert_equal(test_counter_m.value, 1, "Counter value is not 1"); in ZTEST()
32 zassert_ok(ret, "Error incrementing counter"); in ZTEST()
34 zassert_equal(test_counter_m.value, 2, "Counter value is not 2"); in ZTEST()
39 * @details The test shall increment the counter value by arbitrary value
47 zassert_ok(ret, "Error adding counter"); in ZTEST()
[all …]
/Zephyr-latest/tests/drivers/counter/counter_basic_api/boards/
Dnucleo_h743zi.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
66 counter {
[all …]
Dstm32f4_disco.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
66 counter {
[all …]
Dstm32h747i_disco_stm32h747xx_m7.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
66 counter {
[all …]
Dgoogle_dragonclaw.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
66 counter {
[all …]
Dnucleo_f207zg.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
67 counter {
[all …]
Dnucleo_f746zg.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
66 counter {
[all …]
Dnucleo_f722ze.overlay13 counter {
20 counter {
27 counter {
34 counter {
41 counter {
48 counter {
55 counter {
62 counter {
69 counter {
76 counter {
[all …]
Dnucleo_l476rg.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
Dstm32h573i_dk.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
52 counter {
59 counter {
Dnucleo_g071rb.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
Dstm32f3_disco.overlay3 counter {
10 counter {
17 counter {
24 counter {
31 counter {
38 counter {
45 counter {
Dstm32l562e_dk.overlay3 counter {
10 counter {
17 counter {
25 counter {
32 counter {
39 counter {
46 counter {
/Zephyr-latest/dts/bindings/sensor/
Despressif,esp32-pcnt.yaml6 Espressif's Pulse Counter Mode (PCNT) controller Node
8 The pulse counter module is designed to count the number of
14 Each pulse counter unit has a 16-bit signed counter register.
17 to either increment or decrement the counter.
23 Each pulse counter unit also features a filter on each of the four inputs,
119 0 (Default) - Inhibit counter (counter value will not change in this condition).
120 1 - Increase counter value.
121 2 - Decrease counter value.
132 0 (Default) - Inhibit counter (counter value will not change in this condition).
133 1 - Increase counter value.
[all …]
/Zephyr-latest/subsys/net/lib/prometheus/
Dcounter.c7 #include <zephyr/net/prometheus/counter.h>
17 int prometheus_counter_add(struct prometheus_counter *counter, uint64_t value) in prometheus_counter_add() argument
19 if (counter == NULL) { in prometheus_counter_add()
23 counter->value += value; in prometheus_counter_add()
28 int prometheus_counter_set(struct prometheus_counter *counter, uint64_t value) in prometheus_counter_set() argument
32 if (counter == NULL) { in prometheus_counter_set()
36 if (value == counter->value) { in prometheus_counter_set()
40 old_value = counter->value; in prometheus_counter_set()
42 LOG_DBG("Cannot set counter to a lower value (%" PRIu64 " < %" PRIu64 ")", in prometheus_counter_set()
47 counter->value += (value - old_value); in prometheus_counter_set()
/Zephyr-latest/drivers/watchdog/
Dwdt_counter.c8 #include <zephyr/drivers/counter.h>
28 const struct device *counter; member
34 const struct device *counter = config->counter; in wdt_counter_setup() local
40 return counter_start(counter); in wdt_counter_setup()
46 const struct device *counter = config->counter; in wdt_counter_disable() local
48 return counter_stop(counter); in wdt_counter_disable()
73 const struct device *counter = config->counter; in timeout_set() local
82 int err = counter_cancel_channel_alarm(counter, chan_id); in timeout_set()
89 return counter_set_channel_alarm(counter, chan_id, &alarm_cfg); in timeout_set()
97 const struct device *counter = config->counter; in wdt_counter_install_timeout() local
[all …]
/Zephyr-latest/dts/arm/infineon/cat1a/psoc6_01/
Dpsoc6_01.dtsi316 counter0_0: counter@40380100 {
317 compatible = "infineon,cat1-counter";
323 counter0_1: counter@40380140 {
324 compatible = "infineon,cat1-counter";
330 counter0_2: counter@40380180 {
331 compatible = "infineon,cat1-counter";
337 counter0_3: counter@403801c0 {
338 compatible = "infineon,cat1-counter";
344 counter0_4: counter@40380200 {
345 compatible = "infineon,cat1-counter";
[all …]
/Zephyr-latest/samples/drivers/counter/alarm/
Dsample.yaml2 name: Counter RTC Driver Sample
6 - counter
12 - "Counter alarm sample"
16 depends_on: counter
18 sample.drivers.counter.alarm:
46 sample.drivers.counter.alarm.stm32_rtc:
47 # This test case is needed because when Timer Counter is available,
48 # RTC Counter will never be selected in the test.
52 # Timer Counter flag needs to be disabled for RTC node to be selected
/Zephyr-latest/dts/arm/infineon/cat1a/psoc6_02/
Dpsoc6_02.dtsi320 counter0_0: counter@40380100 {
321 compatible = "infineon,cat1-counter";
327 counter0_1: counter@40380140 {
328 compatible = "infineon,cat1-counter";
334 counter0_2: counter@40380180 {
335 compatible = "infineon,cat1-counter";
341 counter0_3: counter@403801c0 {
342 compatible = "infineon,cat1-counter";
348 counter0_4: counter@40380200 {
349 compatible = "infineon,cat1-counter";
[all …]

12345678910>>...56