1/*
2 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 */
6
7#pragma once
8
9#define TMR_INTS_EVENT       BIT(0)
10
11/* 32 bit down counter */
12struct timer {
13    uint32_t load;
14    uint32_t count;
15    uint32_t ctrl;
16    uint32_t ints;
17};
18typedef volatile struct timer timer_t;
19extern timer_t *const priv_timer;
20
21static inline void resetTimer(void)
22{
23    priv_timer->ints = TMR_INTS_EVENT;
24}
25
26