@web-font-path: "roboto-debian.css";
Loading...
Searching...
No Matches
ticks.h
1/*
2 * Copyright (c) 2024 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _HARDWARE_TICKS_H
8#define _HARDWARE_TICKS_H
9
25#include "pico.h"
26#if !PICO_RP2040
27#include "hardware/structs/ticks.h"
28#else
29#include "hardware/watchdog.h"
35typedef enum tick_gen_num_rp2040 {
36 TICK_WATCHDOG = 0,
37 TICK_COUNT
39#endif
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS, Enable/disable assertions in the hardware_ticks module, type=bool, default=0, group=hardware_ticks
46#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS
47#define PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS 0
48#endif
49
56void tick_start(tick_gen_num_t tick, uint cycles);
57
58
64void tick_stop(tick_gen_num_t tick);
65
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
bool tick_is_running(tick_gen_num_t tick)
Check if a tick genererator is currently running.
Definition ticks.c:36
tick_gen_num_rp2040
Tick generator numbers on RP2040 (used as typedef tick_gen_num_t)
Definition ticks.h:35
void tick_stop(tick_gen_num_t tick)
Stop a tick generator.
Definition ticks.c:26
enum tick_gen_num_rp2040 tick_gen_num_t
Tick generator numbers on RP2040 (used as typedef tick_gen_num_t)
void tick_start(tick_gen_num_t tick, uint cycles)
Start a tick generator.
Definition ticks.c:9