1 /* 2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _HARDWARE_STRUCTS_TIMER_H 8 #define _HARDWARE_STRUCTS_TIMER_H 9 10 #include "hardware/address_mapped.h" 11 #include "hardware/platform_defs.h" 12 #include "hardware/regs/timer.h" 13 14 #define NUM_TIMERS 4 15 16 typedef struct { 17 io_wo_32 timehw; 18 io_wo_32 timelw; 19 io_ro_32 timehr; 20 io_ro_32 timelr; 21 io_rw_32 alarm[NUM_TIMERS]; 22 io_rw_32 armed; 23 io_ro_32 timerawh; 24 io_ro_32 timerawl; 25 io_rw_32 dbgpause; 26 io_rw_32 pause; 27 io_rw_32 intr; 28 io_rw_32 inte; 29 io_rw_32 intf; 30 io_ro_32 ints; 31 } timer_hw_t; 32 33 #define timer_hw ((timer_hw_t *const)TIMER_BASE) 34 35 #endif 36