@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
ticks.h
/*
* Copyright (c) 2024 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _HARDWARE_TICKS_H
#define _HARDWARE_TICKS_H
#include "pico.h"
#if !PICO_RP2040
#include "hardware/structs/ticks.h"
#else
#include "hardware/watchdog.h"
typedef enum tick_gen_num_rp2040 {
TICK_WATCHDOG = 0,
TICK_COUNT
} tick_gen_num_t;
#endif
#ifdef __cplusplus
extern "C" {
#endif
// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS, Enable/disable assertions in the hardware_ticks module, type=bool, default=0, group=hardware_ticks
#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS
#define PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS 0
#endif
void tick_start(tick_gen_num_t tick, uint cycles);
void tick_stop(tick_gen_num_t tick);
bool tick_is_running(tick_gen_num_t tick);
#ifdef __cplusplus
}
#endif
#endif
tick_is_running
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_gen_num_rp2040
Tick generator numbers on RP2040 (used as typedef tick_gen_num_t).
Definition ticks.h:35
tick_stop
void tick_stop(tick_gen_num_t tick)
Stop a tick generator.
Definition ticks.c:26
tick_gen_num_t
enum tick_gen_num_rp2040 tick_gen_num_t
Tick generator numbers on RP2040 (used as typedef tick_gen_num_t).
tick_start
void tick_start(tick_gen_num_t tick, uint cycles)
Start a tick generator.
Definition ticks.c:9
pico.h
watchdog.h