github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_arduino_leonardo.go (about) 1 //go:build arduino_leonardo 2 3 package machine 4 5 // Return the current CPU frequency in hertz. 6 func CPUFrequency() uint32 { 7 return 16000000 8 } 9 10 // Digital pins, marked as plain numbers on the board. 11 const ( 12 D0 = PD2 // RX 13 D1 = PD3 // TX 14 D2 = PD1 15 D3 = PD0 16 D4 = PD4 17 D5 = PC6 18 D6 = PD7 19 D7 = PE6 20 D8 = PB4 21 D9 = PB5 22 D10 = PB6 23 D11 = PB7 24 D12 = PD6 25 D13 = PC7 26 ) 27 28 // LED on the Arduino 29 const LED Pin = D13 30 31 // ADC on the Arduino 32 const ( 33 ADC0 Pin = PF7 34 ADC1 Pin = PF6 35 ADC2 Pin = PF5 36 ADC3 Pin = PF4 37 ADC4 Pin = PF1 38 ADC5 Pin = PF0 39 )