Hardware struct regeneration (#613)

* Use reg[0] description for hardware structs register arrays

* Update struct headers to match SVD and latest svd2struct
This commit is contained in:
Graham Sanderson 2021-10-14 15:35:28 -05:00 committed by GitHub
parent a0450d0133
commit 68571ad33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 251 additions and 32 deletions

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/adc.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_adc
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_adc
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/adc.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/busctrl.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_busctrl
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_busctrl
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/busctrl.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/clocks.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_clocks
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_clocks
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/clocks.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/dma.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_dma
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_dma
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/dma.h.
@ -145,6 +145,11 @@ typedef struct {
io_rw_32 ints1;
_REG_(DMA_TIMER0_OFFSET) // DMA_TIMER0
// (Description copied from array index 0 register DMA_TIMER0 applies similarly to other array indexes)
//
// Pacing (X/Y) Fractional Timer
// 0xffff0000 [31:16] : X (0): Pacing Timer Dividend
// 0x0000ffff [15:0] : Y (0): Pacing Timer Divisor
io_rw_32 timer[NUM_DMA_TIMERS]; // 4
_REG_(DMA_MULTI_CHAN_TRIGGER_OFFSET) // DMA_MULTI_CHAN_TRIGGER
@ -183,7 +188,7 @@ typedef struct {
typedef struct {
struct dma_debug_hw_channel {
io_ro_32 ctrdeq;
io_rw_32 ctrdeq;
io_ro_32 tcr;
uint32_t pad[14];
} ch[NUM_DMA_CHANNELS];

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/i2c.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_i2c
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_i2c
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/i2c.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/sio.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_sio
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_sio
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/sio.h.
@ -22,21 +22,52 @@
typedef struct {
_REG_(SIO_INTERP0_ACCUM0_OFFSET) // SIO_INTERP0_ACCUM0
// (Description copied from array index 0 register SIO_INTERP0_ACCUM0 applies similarly to other array indexes)
//
// Read/write access to accumulator 0
io_rw_32 accum[2];
_REG_(SIO_INTERP0_BASE0_OFFSET) // SIO_INTERP0_BASE0
// (Description copied from array index 0 register SIO_INTERP0_BASE0 applies similarly to other array indexes)
//
// Read/write access to BASE0 register
io_rw_32 base[3];
_REG_(SIO_INTERP0_POP_LANE0_OFFSET) // SIO_INTERP0_POP_LANE0
// (Description copied from array index 0 register SIO_INTERP0_POP_LANE0 applies similarly to other array indexes)
//
// Read LANE0 result, and simultaneously write lane results to both accumulators (POP)
io_ro_32 pop[3];
_REG_(SIO_INTERP0_PEEK_LANE0_OFFSET) // SIO_INTERP0_PEEK_LANE0
// (Description copied from array index 0 register SIO_INTERP0_PEEK_LANE0 applies similarly to other array indexes)
//
// Read LANE0 result, without altering any internal state (PEEK)
io_ro_32 peek[3];
_REG_(SIO_INTERP0_CTRL_LANE0_OFFSET) // SIO_INTERP0_CTRL_LANE0
// (Description copied from array index 0 register SIO_INTERP0_CTRL_LANE0 applies similarly to other array indexes)
//
// Control register for lane 0
// 0x02000000 [25] : OVERF (0): Set if either OVERF0 or OVERF1 is set
// 0x01000000 [24] : OVERF1 (0): Indicates if any masked-off MSBs in ACCUM1 are set
// 0x00800000 [23] : OVERF0 (0): Indicates if any masked-off MSBs in ACCUM0 are set
// 0x00200000 [21] : BLEND (0): Only present on INTERP0 on each core
// 0x00180000 [20:19] : FORCE_MSB (0): ORed into bits 29:28 of the lane result presented to the processor on the bus
// 0x00040000 [18] : ADD_RAW (0): If 1, mask + shift is bypassed for LANE0 result
// 0x00020000 [17] : CROSS_RESULT (0): If 1, feed the opposite lane's result into this lane's accumulator on POP
// 0x00010000 [16] : CROSS_INPUT (0): If 1, feed the opposite lane's accumulator into this lane's shift + mask hardware
// 0x00008000 [15] : SIGNED (0): If SIGNED is set, the shifted and masked accumulator value is sign-extended to 32 bits
// 0x00007c00 [14:10] : MASK_MSB (0): The most-significant bit allowed to pass by the mask (inclusive)
// 0x000003e0 [9:5] : MASK_LSB (0): The least-significant bit allowed to pass by the mask (inclusive)
// 0x0000001f [4:0] : SHIFT (0): Logical right-shift applied to accumulator before masking
io_rw_32 ctrl[2];
_REG_(SIO_INTERP0_ACCUM0_ADD_OFFSET) // SIO_INTERP0_ACCUM0_ADD
// (Description copied from array index 0 register SIO_INTERP0_ACCUM0_ADD applies similarly to other array indexes)
//
// Values written here are atomically added to ACCUM0
// 0x00ffffff [23:0] : INTERP0_ACCUM0_ADD (0)
io_rw_32 add_raw[2];
_REG_(SIO_INTERP0_BASE_1AND0_OFFSET) // SIO_INTERP0_BASE_1AND0

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/io_bank0.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_io_bank0
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_io_bank0
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/io_bank0.h.
@ -45,12 +45,117 @@ typedef struct {
typedef struct {
_REG_(IO_BANK0_PROC0_INTE0_OFFSET) // IO_BANK0_PROC0_INTE0
// (Description copied from array index 0 register IO_BANK0_PROC0_INTE0 applies similarly to other array indexes)
//
// Interrupt Enable for proc0
// 0x80000000 [31] : GPIO7_EDGE_HIGH (0)
// 0x40000000 [30] : GPIO7_EDGE_LOW (0)
// 0x20000000 [29] : GPIO7_LEVEL_HIGH (0)
// 0x10000000 [28] : GPIO7_LEVEL_LOW (0)
// 0x08000000 [27] : GPIO6_EDGE_HIGH (0)
// 0x04000000 [26] : GPIO6_EDGE_LOW (0)
// 0x02000000 [25] : GPIO6_LEVEL_HIGH (0)
// 0x01000000 [24] : GPIO6_LEVEL_LOW (0)
// 0x00800000 [23] : GPIO5_EDGE_HIGH (0)
// 0x00400000 [22] : GPIO5_EDGE_LOW (0)
// 0x00200000 [21] : GPIO5_LEVEL_HIGH (0)
// 0x00100000 [20] : GPIO5_LEVEL_LOW (0)
// 0x00080000 [19] : GPIO4_EDGE_HIGH (0)
// 0x00040000 [18] : GPIO4_EDGE_LOW (0)
// 0x00020000 [17] : GPIO4_LEVEL_HIGH (0)
// 0x00010000 [16] : GPIO4_LEVEL_LOW (0)
// 0x00008000 [15] : GPIO3_EDGE_HIGH (0)
// 0x00004000 [14] : GPIO3_EDGE_LOW (0)
// 0x00002000 [13] : GPIO3_LEVEL_HIGH (0)
// 0x00001000 [12] : GPIO3_LEVEL_LOW (0)
// 0x00000800 [11] : GPIO2_EDGE_HIGH (0)
// 0x00000400 [10] : GPIO2_EDGE_LOW (0)
// 0x00000200 [9] : GPIO2_LEVEL_HIGH (0)
// 0x00000100 [8] : GPIO2_LEVEL_LOW (0)
// 0x00000080 [7] : GPIO1_EDGE_HIGH (0)
// 0x00000040 [6] : GPIO1_EDGE_LOW (0)
// 0x00000020 [5] : GPIO1_LEVEL_HIGH (0)
// 0x00000010 [4] : GPIO1_LEVEL_LOW (0)
// 0x00000008 [3] : GPIO0_EDGE_HIGH (0)
// 0x00000004 [2] : GPIO0_EDGE_LOW (0)
// 0x00000002 [1] : GPIO0_LEVEL_HIGH (0)
// 0x00000001 [0] : GPIO0_LEVEL_LOW (0)
io_rw_32 inte[4];
_REG_(IO_BANK0_PROC0_INTF0_OFFSET) // IO_BANK0_PROC0_INTF0
// (Description copied from array index 0 register IO_BANK0_PROC0_INTF0 applies similarly to other array indexes)
//
// Interrupt Force for proc0
// 0x80000000 [31] : GPIO7_EDGE_HIGH (0)
// 0x40000000 [30] : GPIO7_EDGE_LOW (0)
// 0x20000000 [29] : GPIO7_LEVEL_HIGH (0)
// 0x10000000 [28] : GPIO7_LEVEL_LOW (0)
// 0x08000000 [27] : GPIO6_EDGE_HIGH (0)
// 0x04000000 [26] : GPIO6_EDGE_LOW (0)
// 0x02000000 [25] : GPIO6_LEVEL_HIGH (0)
// 0x01000000 [24] : GPIO6_LEVEL_LOW (0)
// 0x00800000 [23] : GPIO5_EDGE_HIGH (0)
// 0x00400000 [22] : GPIO5_EDGE_LOW (0)
// 0x00200000 [21] : GPIO5_LEVEL_HIGH (0)
// 0x00100000 [20] : GPIO5_LEVEL_LOW (0)
// 0x00080000 [19] : GPIO4_EDGE_HIGH (0)
// 0x00040000 [18] : GPIO4_EDGE_LOW (0)
// 0x00020000 [17] : GPIO4_LEVEL_HIGH (0)
// 0x00010000 [16] : GPIO4_LEVEL_LOW (0)
// 0x00008000 [15] : GPIO3_EDGE_HIGH (0)
// 0x00004000 [14] : GPIO3_EDGE_LOW (0)
// 0x00002000 [13] : GPIO3_LEVEL_HIGH (0)
// 0x00001000 [12] : GPIO3_LEVEL_LOW (0)
// 0x00000800 [11] : GPIO2_EDGE_HIGH (0)
// 0x00000400 [10] : GPIO2_EDGE_LOW (0)
// 0x00000200 [9] : GPIO2_LEVEL_HIGH (0)
// 0x00000100 [8] : GPIO2_LEVEL_LOW (0)
// 0x00000080 [7] : GPIO1_EDGE_HIGH (0)
// 0x00000040 [6] : GPIO1_EDGE_LOW (0)
// 0x00000020 [5] : GPIO1_LEVEL_HIGH (0)
// 0x00000010 [4] : GPIO1_LEVEL_LOW (0)
// 0x00000008 [3] : GPIO0_EDGE_HIGH (0)
// 0x00000004 [2] : GPIO0_EDGE_LOW (0)
// 0x00000002 [1] : GPIO0_LEVEL_HIGH (0)
// 0x00000001 [0] : GPIO0_LEVEL_LOW (0)
io_rw_32 intf[4];
_REG_(IO_BANK0_PROC0_INTS0_OFFSET) // IO_BANK0_PROC0_INTS0
// (Description copied from array index 0 register IO_BANK0_PROC0_INTS0 applies similarly to other array indexes)
//
// Interrupt status after masking & forcing for proc0
// 0x80000000 [31] : GPIO7_EDGE_HIGH (0)
// 0x40000000 [30] : GPIO7_EDGE_LOW (0)
// 0x20000000 [29] : GPIO7_LEVEL_HIGH (0)
// 0x10000000 [28] : GPIO7_LEVEL_LOW (0)
// 0x08000000 [27] : GPIO6_EDGE_HIGH (0)
// 0x04000000 [26] : GPIO6_EDGE_LOW (0)
// 0x02000000 [25] : GPIO6_LEVEL_HIGH (0)
// 0x01000000 [24] : GPIO6_LEVEL_LOW (0)
// 0x00800000 [23] : GPIO5_EDGE_HIGH (0)
// 0x00400000 [22] : GPIO5_EDGE_LOW (0)
// 0x00200000 [21] : GPIO5_LEVEL_HIGH (0)
// 0x00100000 [20] : GPIO5_LEVEL_LOW (0)
// 0x00080000 [19] : GPIO4_EDGE_HIGH (0)
// 0x00040000 [18] : GPIO4_EDGE_LOW (0)
// 0x00020000 [17] : GPIO4_LEVEL_HIGH (0)
// 0x00010000 [16] : GPIO4_LEVEL_LOW (0)
// 0x00008000 [15] : GPIO3_EDGE_HIGH (0)
// 0x00004000 [14] : GPIO3_EDGE_LOW (0)
// 0x00002000 [13] : GPIO3_LEVEL_HIGH (0)
// 0x00001000 [12] : GPIO3_LEVEL_LOW (0)
// 0x00000800 [11] : GPIO2_EDGE_HIGH (0)
// 0x00000400 [10] : GPIO2_EDGE_LOW (0)
// 0x00000200 [9] : GPIO2_LEVEL_HIGH (0)
// 0x00000100 [8] : GPIO2_LEVEL_LOW (0)
// 0x00000080 [7] : GPIO1_EDGE_HIGH (0)
// 0x00000040 [6] : GPIO1_EDGE_LOW (0)
// 0x00000020 [5] : GPIO1_LEVEL_HIGH (0)
// 0x00000010 [4] : GPIO1_LEVEL_LOW (0)
// 0x00000008 [3] : GPIO0_EDGE_HIGH (0)
// 0x00000004 [2] : GPIO0_EDGE_LOW (0)
// 0x00000002 [1] : GPIO0_LEVEL_HIGH (0)
// 0x00000001 [0] : GPIO0_LEVEL_LOW (0)
io_ro_32 ints[4];
} io_irq_ctrl_hw_t;
@ -59,6 +164,41 @@ typedef struct {
io_status_ctrl_hw_t io[NUM_BANK0_GPIOS]; // 30
_REG_(IO_BANK0_INTR0_OFFSET) // IO_BANK0_INTR0
// (Description copied from array index 0 register IO_BANK0_INTR0 applies similarly to other array indexes)
//
// Raw Interrupts
// 0x80000000 [31] : GPIO7_EDGE_HIGH (0)
// 0x40000000 [30] : GPIO7_EDGE_LOW (0)
// 0x20000000 [29] : GPIO7_LEVEL_HIGH (0)
// 0x10000000 [28] : GPIO7_LEVEL_LOW (0)
// 0x08000000 [27] : GPIO6_EDGE_HIGH (0)
// 0x04000000 [26] : GPIO6_EDGE_LOW (0)
// 0x02000000 [25] : GPIO6_LEVEL_HIGH (0)
// 0x01000000 [24] : GPIO6_LEVEL_LOW (0)
// 0x00800000 [23] : GPIO5_EDGE_HIGH (0)
// 0x00400000 [22] : GPIO5_EDGE_LOW (0)
// 0x00200000 [21] : GPIO5_LEVEL_HIGH (0)
// 0x00100000 [20] : GPIO5_LEVEL_LOW (0)
// 0x00080000 [19] : GPIO4_EDGE_HIGH (0)
// 0x00040000 [18] : GPIO4_EDGE_LOW (0)
// 0x00020000 [17] : GPIO4_LEVEL_HIGH (0)
// 0x00010000 [16] : GPIO4_LEVEL_LOW (0)
// 0x00008000 [15] : GPIO3_EDGE_HIGH (0)
// 0x00004000 [14] : GPIO3_EDGE_LOW (0)
// 0x00002000 [13] : GPIO3_LEVEL_HIGH (0)
// 0x00001000 [12] : GPIO3_LEVEL_LOW (0)
// 0x00000800 [11] : GPIO2_EDGE_HIGH (0)
// 0x00000400 [10] : GPIO2_EDGE_LOW (0)
// 0x00000200 [9] : GPIO2_LEVEL_HIGH (0)
// 0x00000100 [8] : GPIO2_LEVEL_LOW (0)
// 0x00000080 [7] : GPIO1_EDGE_HIGH (0)
// 0x00000040 [6] : GPIO1_EDGE_LOW (0)
// 0x00000020 [5] : GPIO1_LEVEL_HIGH (0)
// 0x00000010 [4] : GPIO1_LEVEL_LOW (0)
// 0x00000008 [3] : GPIO0_EDGE_HIGH (0)
// 0x00000004 [2] : GPIO0_EDGE_LOW (0)
// 0x00000002 [1] : GPIO0_LEVEL_HIGH (0)
// 0x00000001 [0] : GPIO0_LEVEL_LOW (0)
io_rw_32 intr[4];
io_irq_ctrl_hw_t proc0_irq_ctrl;

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/io_qspi.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_io_qspi
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_io_qspi
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/io_qspi.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/m0plus.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/m0plus.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/pads_qspi.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_pads_qspi
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_pads_qspi
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/pads_qspi.h.
@ -27,6 +27,16 @@ typedef struct {
io_rw_32 voltage_select;
_REG_(PADS_QSPI_GPIO_QSPI_SCLK_OFFSET) // PADS_QSPI_GPIO_QSPI_SCLK
// (Description copied from array index 0 register PADS_QSPI_GPIO_QSPI_SCLK applies similarly to other array indexes)
//
// Pad control register
// 0x00000080 [7] : OD (0): Output disable
// 0x00000040 [6] : IE (1): Input enable
// 0x00000030 [5:4] : DRIVE (1): Drive strength
// 0x00000008 [3] : PUE (0): Pull up enable
// 0x00000004 [2] : PDE (1): Pull down enable
// 0x00000002 [1] : SCHMITT (1): Enable schmitt trigger
// 0x00000001 [0] : SLEWFAST (0): Slew rate control
io_rw_32 io[NUM_QSPI_GPIOS]; // 6
} pads_qspi_hw_t;

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/pads_bank0.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_pads_bank0
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_pads_bank0
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/pads_bank0.h.
@ -27,6 +27,16 @@ typedef struct {
io_rw_32 voltage_select;
_REG_(PADS_BANK0_GPIO0_OFFSET) // PADS_BANK0_GPIO0
// (Description copied from array index 0 register PADS_BANK0_GPIO0 applies similarly to other array indexes)
//
// Pad control register
// 0x00000080 [7] : OD (0): Output disable
// 0x00000040 [6] : IE (1): Input enable
// 0x00000030 [5:4] : DRIVE (1): Drive strength
// 0x00000008 [3] : PUE (0): Pull up enable
// 0x00000004 [2] : PDE (1): Pull down enable
// 0x00000002 [1] : SCHMITT (1): Enable schmitt trigger
// 0x00000001 [0] : SLEWFAST (0): Slew rate control
io_rw_32 io[NUM_BANK0_GPIOS]; // 30
} padsbank0_hw_t;

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/pio.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_pio
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_pio
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/pio.h.
@ -113,9 +113,15 @@ typedef struct {
io_ro_32 flevel;
_REG_(PIO_TXF0_OFFSET) // PIO_TXF0
// (Description copied from array index 0 register PIO_TXF0 applies similarly to other array indexes)
//
// Direct write access to the TX FIFO for this state machine
io_wo_32 txf[NUM_PIO_STATE_MACHINES]; // 4
_REG_(PIO_RXF0_OFFSET) // PIO_RXF0
// (Description copied from array index 0 register PIO_RXF0 applies similarly to other array indexes)
//
// Direct read access to the RX FIFO for this state machine
io_ro_32 rxf[NUM_PIO_STATE_MACHINES]; // 4
_REG_(PIO_IRQ_OFFSET) // PIO_IRQ
@ -148,6 +154,10 @@ typedef struct {
io_ro_32 dbg_cfginfo;
_REG_(PIO_INSTR_MEM0_OFFSET) // PIO_INSTR_MEM0
// (Description copied from array index 0 register PIO_INSTR_MEM0 applies similarly to other array indexes)
//
// Write-only access to instruction memory location 0
// 0x0000ffff [15:0] : INSTR_MEM0 (0)
io_wo_32 instr_mem[PIO_INSTRUCTION_COUNT]; // 32
pio_sm_hw_t sm[NUM_PIO_STATE_MACHINES]; // 4

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/pll.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_pll
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_pll
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/pll.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/psm.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_psm
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_psm
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/psm.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/pwm.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_pwm
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_pwm
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/pwm.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/resets.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_resets
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_resets
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/resets.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/rosc.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_rosc
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_rosc
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/rosc.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/rtc.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_rtc
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_rtc
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/rtc.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/m0plus.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/m0plus.h.

View File

@ -13,7 +13,7 @@
#include "hardware/regs/sio.h"
#include "hardware/structs/interp.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_sio
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_sio
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/sio.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/spi.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_spi
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_spi
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/spi.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/ssi.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_ssi
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_ssi
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/ssi.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/syscfg.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_syscfg
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_syscfg
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/syscfg.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/m0plus.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_m0plus
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/m0plus.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/timer.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_timer
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_timer
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/timer.h.
@ -38,6 +38,9 @@ typedef struct {
io_ro_32 timelr;
_REG_(TIMER_ALARM0_OFFSET) // TIMER_ALARM0
// (Description copied from array index 0 register TIMER_ALARM0 applies similarly to other array indexes)
//
// Arm alarm 0, and configure the time it will fire
io_rw_32 alarm[NUM_TIMERS]; // 4
_REG_(TIMER_ARMED_OFFSET) // TIMER_ARMED

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/uart.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_uart
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_uart
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/uart.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/usb.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_usb
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_usb
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/usb.h.
@ -129,6 +129,13 @@ typedef struct {
io_rw_32 dev_addr_ctrl;
_REG_(USB_ADDR_ENDP1_OFFSET) // USB_ADDR_ENDP1
// (Description copied from array index 0 register USB_ADDR_ENDP1 applies similarly to other array indexes)
//
// Interrupt endpoint 1
// 0x04000000 [26] : INTEP_PREAMBLE (0): Interrupt EP requires preamble (is a low speed device on a full speed hub)
// 0x02000000 [25] : INTEP_DIR (0): Direction of the interrupt endpoint
// 0x000f0000 [19:16] : ENDPOINT (0): Endpoint number of the interrupt endpoint
// 0x0000007f [6:0] : ADDRESS (0): Device address
io_rw_32 int_ep_addr_ctrl[USB_HOST_INTERRUPT_ENDPOINTS]; // 15
_REG_(USB_MAIN_CTRL_OFFSET) // USB_MAIN_CTRL

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/vreg_and_chip_reset.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_vreg_and_chip_reset
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_vreg_and_chip_reset
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/vreg_and_chip_reset.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/watchdog.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_watchdog
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_watchdog
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/watchdog.h.
@ -43,6 +43,9 @@ typedef struct {
io_ro_32 reason;
_REG_(WATCHDOG_SCRATCH0_OFFSET) // WATCHDOG_SCRATCH0
// (Description copied from array index 0 register WATCHDOG_SCRATCH0 applies similarly to other array indexes)
//
// Scratch register
io_rw_32 scratch[8];
_REG_(WATCHDOG_TICK_OFFSET) // WATCHDOG_TICK

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/xip.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_xip
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_xip
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/xip.h.

View File

@ -12,7 +12,7 @@
#include "hardware/address_mapped.h"
#include "hardware/regs/xosc.h"
// Reference to datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf#tab-registerlist_xosc
// Reference to datasheet: https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf#tab-registerlist_xosc
//
// The _REG_ macro is intended to help make the register navigable in your IDE (for example, using the "Go to Definition" feature)
// _REG_(x) will link to the corresponding register in hardware/regs/xosc.h.