1 /* 2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _HARDWARE_PLATFORM_DEFS_H 8 #define _HARDWARE_PLATFORM_DEFS_H 9 10 // This header is included from C and assembler - intended mostly for #defines; guard other stuff with #ifdef __ASSEMBLER__ 11 12 #ifndef _u 13 #ifdef __ASSEMBLER__ 14 #define _u(x) x 15 #else 16 #define _u(x) x ## u 17 #endif 18 #endif 19 20 #define NUM_CORES _u(2) 21 #define NUM_DMA_CHANNELS _u(12) 22 #define NUM_DMA_TIMERS _u(4) 23 #define NUM_IRQS _u(32) 24 #define NUM_USER_IRQS _u(6) 25 #define NUM_PIOS _u(2) 26 #define NUM_PIO_STATE_MACHINES _u(4) 27 #define NUM_PWM_SLICES _u(8) 28 #define NUM_SPIN_LOCKS _u(32) 29 #define NUM_UARTS _u(2) 30 #define NUM_I2CS _u(2) 31 #define NUM_SPIS _u(2) 32 #define NUM_TIMERS _u(4) 33 #define NUM_ADC_CHANNELS _u(5) 34 35 #define NUM_BANK0_GPIOS _u(30) 36 #define NUM_QSPI_GPIOS _u(6) 37 38 #define PIO_INSTRUCTION_COUNT _u(32) 39 40 // PICO_CONFIG: XOSC_MHZ, The crystal oscillator frequency in Mhz, type=int, default=12, advanced=true, group=hardware_base 41 #ifndef XOSC_MHZ 42 #define XOSC_MHZ _u(12) 43 #endif 44 45 #define FIRST_USER_IRQ (NUM_IRQS - NUM_USER_IRQS) 46 #define VTABLE_FIRST_IRQ 16 47 48 #endif 49 50