All the kernel header files now use pargma once rather than the ifndef, as the pre-processed C files do not change while header files are protected with pargma once. This will also solve any naming issues caused by ifndef.
25 lines
432 B
C
25 lines
432 B
C
/*
|
|
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define TMR_INTS_EVENT BIT(0)
|
|
|
|
/* 32 bit down counter */
|
|
struct timer {
|
|
uint32_t load;
|
|
uint32_t count;
|
|
uint32_t ctrl;
|
|
uint32_t ints;
|
|
};
|
|
typedef volatile struct timer timer_t;
|
|
extern timer_t *const priv_timer;
|
|
|
|
static inline void resetTimer(void)
|
|
{
|
|
priv_timer->ints = TMR_INTS_EVENT;
|
|
}
|
|
|