github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_ae_rp2040.go (about) 1 //go:build ae_rp2040 2 3 package machine 4 5 // GPIO pins 6 const ( 7 GP0 Pin = GPIO0 8 GP1 Pin = GPIO1 9 GP2 Pin = GPIO2 10 GP3 Pin = GPIO3 11 GP4 Pin = GPIO4 12 GP5 Pin = GPIO5 13 GP6 Pin = GPIO6 14 GP7 Pin = GPIO7 15 GP8 Pin = GPIO8 16 GP9 Pin = GPIO9 17 GP10 Pin = GPIO10 18 GP11 Pin = GPIO11 19 GP12 Pin = GPIO12 20 GP13 Pin = GPIO13 21 GP14 Pin = GPIO14 22 GP15 Pin = GPIO15 23 GP16 Pin = GPIO16 24 GP17 Pin = GPIO17 25 GP18 Pin = GPIO18 26 GP19 Pin = GPIO19 27 GP20 Pin = GPIO20 28 GP21 Pin = GPIO21 29 GP22 Pin = GPIO22 30 GP26 Pin = GPIO26 31 GP27 Pin = GPIO27 32 GP28 Pin = GPIO28 33 GP29 Pin = GPIO29 34 35 // Onboard crystal oscillator frequency, in MHz. 36 xoscFreq = 12 // MHz 37 ) 38 39 // I2C Default pins on Raspberry Pico. 40 const ( 41 I2C0_SDA_PIN = GP4 42 I2C0_SCL_PIN = GP5 43 44 I2C1_SDA_PIN = GP2 45 I2C1_SCL_PIN = GP3 46 ) 47 48 // SPI default pins 49 const ( 50 // Default Serial Clock Bus 0 for SPI communications 51 SPI0_SCK_PIN = GPIO18 52 // Default Serial Out Bus 0 for SPI communications 53 SPI0_SDO_PIN = GPIO19 // Tx 54 // Default Serial In Bus 0 for SPI communications 55 SPI0_SDI_PIN = GPIO16 // Rx 56 57 // Default Serial Clock Bus 1 for SPI communications 58 SPI1_SCK_PIN = GPIO10 59 // Default Serial Out Bus 1 for SPI communications 60 SPI1_SDO_PIN = GPIO11 // Tx 61 // Default Serial In Bus 1 for SPI communications 62 SPI1_SDI_PIN = GPIO12 // Rx 63 ) 64 65 // UART pins 66 const ( 67 UART0_TX_PIN = GPIO0 68 UART0_RX_PIN = GPIO1 69 UART1_TX_PIN = GPIO8 70 UART1_RX_PIN = GPIO9 71 UART_TX_PIN = UART0_TX_PIN 72 UART_RX_PIN = UART0_RX_PIN 73 ) 74 75 var DefaultUART = UART0 76 77 // USB identifiers 78 const ( 79 usb_STRING_PRODUCT = "AE-RP2040" 80 usb_STRING_MANUFACTURER = "AKIZUKI DENSHI" 81 ) 82 83 var ( 84 usb_VID uint16 = 0x2E8A 85 usb_PID uint16 = 0x000A 86 )