v2.0.0
ticks.h
1// THIS HEADER FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
2
8#ifndef _HARDWARE_STRUCTS_TICKS_H
9#define _HARDWARE_STRUCTS_TICKS_H
10
15#include "hardware/address_mapped.h"
16#include "hardware/regs/ticks.h"
17
18// Reference to datasheet: https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf#tab-registerlist_ticks
19//
20// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
21// _REG_(x) will link to the corresponding register in hardware/regs/ticks.h.
22//
23// Bit-field descriptions are of the form:
24// BITMASK [BITRANGE] FIELDNAME (RESETVALUE) DESCRIPTION
25
29 typedef enum tick_gen_num_rp2350 {
30 TICK_PROC0 = 0,
31 TICK_PROC1 = 1,
32 TICK_TIMER0 = 2,
33 TICK_TIMER1 = 3,
34 TICK_WATCHDOG = 4,
35 TICK_RISCV = 5,
36 TICK_COUNT
37} tick_gen_num_t;
38
39 typedef struct {
40 _REG_(TICKS_PROC0_CTRL_OFFSET) // TICKS_PROC0_CTRL
41 // Controls the tick generator
42 // 0x00000002 [1] RUNNING (-) Is the tick generator running?
43 // 0x00000001 [0] ENABLE (0) start / stop tick generation
44 io_rw_32 ctrl;
45
46 _REG_(TICKS_PROC0_CYCLES_OFFSET) // TICKS_PROC0_CYCLES
47 // 0x000001ff [8:0] PROC0_CYCLES (0x000) Total number of clk_tick cycles before the next tick
48 io_rw_32 cycles;
49
50 _REG_(TICKS_PROC0_COUNT_OFFSET) // TICKS_PROC0_COUNT
51 // 0x000001ff [8:0] PROC0_COUNT (-) Count down timer: the remaining number clk_tick cycles...
52 io_ro_32 count;
53} ticks_slice_hw_t;
54
55 typedef struct {
56 ticks_slice_hw_t ticks[6];
57} ticks_hw_t;
58
59#define ticks_hw ((ticks_hw_t *)TICKS_BASE)
60static_assert(sizeof (ticks_hw_t) == 0x0048, "");
61
62#endif // _HARDWARE_STRUCTS_TICKS_H
63
address_mapped.h
tick_gen_num_rp2350
tick_gen_num_rp2350
Tick generator numbers on RP2350 (used as typedef tick_gen_num_t)
Definition: ticks.h:29
tick_gen_num_t
enum tick_gen_num_rp2350 tick_gen_num_t
Tick generator numbers on RP2350 (used as typedef tick_gen_num_t)
ticks_hw_t
Definition: ticks.h:55
ticks_slice_hw_t
Definition: ticks.h:39