github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_arduino_mkr1000.go (about) 1 //go:build arduino_mkr1000 2 3 // This contains the pin mappings for the Arduino MKR1000 board. 4 // 5 // For more information, see: https://store.arduino.cc/usa/arduino-mkr1000-with-headers-mounted 6 package machine 7 8 // used to reset into bootloader 9 const resetMagicValue = 0x07738135 10 11 // GPIO Pins 12 const ( 13 D0 Pin = PA22 // PWM available 14 D1 Pin = PA23 // PWM available 15 D2 Pin = PA10 // PWM available 16 D3 Pin = PA11 // PWM available 17 D4 Pin = PB10 // PWM available 18 D5 Pin = PB11 // PWM available 19 20 D6 Pin = PA20 // PWM available 21 D7 Pin = PA21 // PWM available 22 D8 Pin = PA16 // PWM available 23 D9 Pin = PA17 24 D10 Pin = PA19 // PWM available 25 D11 Pin = PA08 // SDA 26 D12 Pin = PA09 // PWM available, SCL 27 D13 Pin = PB23 // RX 28 D14 Pin = PB22 // TX 29 30 RX0 Pin = PB23 // UART2 RX 31 TX1 Pin = PB22 // UART2 TX 32 ) 33 34 // Analog pins 35 const ( 36 A0 Pin = PA02 // ADC0/AIN[0] 37 A1 Pin = PB02 // AIN[10] 38 A2 Pin = PB03 // AIN[11] 39 A3 Pin = PA04 // AIN[04] 40 A4 Pin = PA05 // AIN[05] 41 A5 Pin = PA06 // AIN[06] 42 A6 Pin = PA07 // AIN[07] 43 ) 44 45 const ( 46 LED = D6 47 ) 48 49 // USBCDC pins 50 const ( 51 USBCDC_DM_PIN Pin = PA24 52 USBCDC_DP_PIN Pin = PA25 53 ) 54 55 // UART1 pins 56 const ( 57 UART_TX_PIN Pin = PB22 58 UART_RX_PIN Pin = PB23 59 ) 60 61 // I2C pins 62 const ( 63 SDA_PIN Pin = D11 // SDA 64 SCL_PIN Pin = D12 // SCL 65 ) 66 67 // SPI pins 68 const ( 69 SPI0_SCK_PIN Pin = D9 // SCK: S1 70 SPI0_SDO_PIN Pin = D8 // SDO: S1 71 SPI0_SDI_PIN Pin = D10 // SDI: S1 72 ) 73 74 // I2S pins 75 const ( 76 I2S_SCK_PIN Pin = PA10 77 I2S_SD_PIN Pin = PA07 78 I2S_WS_PIN = NoPin // TODO: figure out what this is on Arduino Nano 33. 79 ) 80 81 // USB CDC identifiers 82 const ( 83 usb_STRING_PRODUCT = "Arduino MKR1000" 84 usb_STRING_MANUFACTURER = "Arduino" 85 ) 86 87 var ( 88 usb_VID uint16 = 0x2341 89 usb_PID uint16 = 0x804e 90 )