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/* Memory map for EPIT (Enhanced Periodic Interrupt Timer). */ 10struct timer { 11 uint32_t epitcr; 12 uint32_t epitsr; 13 uint32_t epitlr; 14 uint32_t epitcmpr; 15 uint32_t epitcnt; 16}; 17typedef volatile struct timer timer_t; 18extern timer_t *epit1; 19 20static inline void resetTimer(void) 21{ 22 epit1->epitsr = 1; 23 /* Timer resets automatically */ 24} 25 26 27