github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_atmega328pb.go (about) 1 //go:build avr && atmega328pb 2 3 package machine 4 5 // Return the current CPU frequency in hertz. 6 func CPUFrequency() uint32 { 7 return 16000000 8 } 9 10 const ( 11 // Note: start at port B because there is no port A. 12 portB Pin = iota * 8 13 portC 14 portD 15 portE 16 ) 17 18 const ( 19 PB0 = portB + 0 20 PB1 = portB + 1 // peripherals: Timer1 channel A 21 PB2 = portB + 2 // peripherals: Timer1 channel B 22 PB3 = portB + 3 // peripherals: Timer2 channel A 23 PB4 = portB + 4 24 PB5 = portB + 5 25 PB6 = portB + 6 26 PB7 = portB + 7 27 PC0 = portC + 0 28 PC1 = portC + 1 29 PC2 = portC + 2 30 PC3 = portC + 3 31 PC4 = portC + 4 32 PC5 = portC + 5 33 PC6 = portC + 6 34 PC7 = portC + 7 35 PD0 = portD + 0 36 PD1 = portD + 1 37 PD2 = portD + 2 38 PD3 = portD + 3 // peripherals: Timer2 channel B 39 PD4 = portD + 4 40 PD5 = portD + 5 // peripherals: Timer0 channel B 41 PD6 = portD + 6 // peripherals: Timer0 channel A 42 PD7 = portD + 7 43 PE0 = portE + 0 44 PE1 = portE + 1 45 PE2 = portE + 2 46 PE3 = portE + 3 47 PE4 = portE + 4 48 PE5 = portE + 5 49 PE6 = portE + 6 50 PE7 = portE + 7 51 )