rp2040/driver/inc/reg/timer_reg.h

39 lines
808 B
C

#ifndef __HARDWARE_TIMER_REG_H__
#define __HARDWARE_TIMER_REG_H__
/* TIMER_PAUSE Register @0x030 */
#define TIMER_PAUSE_BITS 0x00000001
#define NUM_TIMERS 4
typedef struct {
io_wo_32 timehw;
io_wo_32 timelw;
io_ro_32 timehr;
io_ro_32 timelr;
io_rw_32 alarm[NUM_TIMERS];
io_rw_32 armed;
io_ro_32 timerawh;
io_ro_32 timerawl;
io_rw_32 dbgpause;
io_rw_32 pause;
io_rw_32 intr;
io_rw_32 inte;
io_rw_32 intf;
io_ro_32 ints;
} timer_hw_t;
#define timer_hw ((timer_hw_t *const)TIMER_BASE)
#define timer_hw_set ((timer_hw_t *const)hw_set_alias_untyped(timer_hw))
#define timer_hw_clear ((timer_hw_t *const)hw_clear_alias_untyped(timer_hw))
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* __HARDWARE_TIMER_REG_H__ */