30 #define GPIO_PIN(port, pin) (((port) & 0) | (pin))
33 #define _u(x) ((uint32_t)(x))
35 #ifdef RP2350_USE_RISCV
36 # include "periph_cpu_common.h"
40 #include "core_cm33.h"
47 #if !(defined(RP2350_USE_ARM) || defined(RP2350_USE_RISCV))
48 # error "Either RP2350_USE_ARM or RP2350_USE_RISCV must be defined"
51 #if (defined(RP2350_USE_ARM) && defined(RP2350_USE_RISCV))
52 # error "Only one of RP2350_USE_ARM or RP2350_USE_RISCV can be defined"
60 #define OSC_DEBUG_PIN_ID 15u
63 #define RESET_PLL_SYS (1u << 14u)
66 #define RESET_PADS_BANK0 (1u << 9u)
69 #define RESET_UART0 (1u << 26u)
72 #define RESET_UART1 (1u << 27u)
75 #define RESET_IO_BANK0 (1u << 6u)
78 #define PADS_BANK0_GPIO0_IE_BITS (1u << 6u)
81 #define PADS_BANK0_ISO_BITS (1u << 8u)
99 return (uint32_t*) (PADS_BANK0_BASE + (4 * (pin + 1)));
109 return IO_BANK0_BASE + (8 * pin);
Clock configuration for the RP2350.
GPIO configuration for the RP2350.
unsigned int gpio_t
GPIO type identifier.
Helper functions for atomic register operations.
Adds include for missing inttype definitions.
void rp2350_init(void)
Initialize RP2350 specific CPU peripherals that are not architecture specific.
static uint32_t calculate_gpio_io_status_register_addr(gpio_t pin)
Calculate the address of the GPIO IO status register for a given pin.
static uint32_t * calculate_gpio_pad_register_addr(gpio_t pin)
Calculate the address of the GPIO pad register for a given pin.
static uint32_t * calculate_gpio_io_ctrl_register_addr(gpio_t pin)
Calculate the address of the GPIO IO control register for a given pin.
UART configuration for the RP2350.
xh3irq.h interrupt controller support