github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/machine/board_atsamd21.go (about)

     1  //go:build (sam && atsamd21) || arduino_nano33 || circuitplay_express
     2  
     3  package machine
     4  
     5  // Return the current CPU frequency in hertz.
     6  func CPUFrequency() uint32 {
     7  	return 48000000
     8  }
     9  
    10  // Hardware pins
    11  const (
    12  	PA00 Pin = 0 // peripherals: TCC2 channel 0
    13  	PA01 Pin = 1 // peripherals: TCC2 channel 1
    14  	PA02 Pin = 2
    15  	PA03 Pin = 3
    16  	PA04 Pin = 4  // peripherals: TCC0 channel 0
    17  	PA05 Pin = 5  // peripherals: TCC0 channel 1
    18  	PA06 Pin = 6  // peripherals: TCC1 channel 0
    19  	PA07 Pin = 7  // peripherals: TCC1 channel 1
    20  	PA08 Pin = 8  // peripherals: TCC0 channel 0, TCC1 channel 2
    21  	PA09 Pin = 9  // peripherals: TCC0 channel 1, TCC1 channel 3
    22  	PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2
    23  	PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3
    24  	PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2
    25  	PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3
    26  	PA14 Pin = 14 // peripherals: TCC0 channel 0
    27  	PA15 Pin = 15 // peripherals: TCC0 channel 1
    28  	PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2
    29  	PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3
    30  	PA18 Pin = 18 // peripherals: TCC0 channel 2
    31  	PA19 Pin = 19 // peripherals: TCC0 channel 3
    32  	PA20 Pin = 20 // peripherals: TCC0 channel 2
    33  	PA21 Pin = 21 // peripherals: TCC0 channel 3
    34  	PA22 Pin = 22 // peripherals: TCC0 channel 0
    35  	PA23 Pin = 23 // peripherals: TCC0 channel 1
    36  	PA24 Pin = 24 // peripherals: TCC1 channel 2
    37  	PA25 Pin = 25 // peripherals: TCC1 channel 3
    38  	PA26 Pin = 26
    39  	PA27 Pin = 27
    40  	PA28 Pin = 28
    41  	PA29 Pin = 29
    42  	PA30 Pin = 30 // peripherals: TCC1 channel 0
    43  	PA31 Pin = 31 // peripherals: TCC1 channel 1
    44  	PB00 Pin = 32
    45  	PB01 Pin = 33
    46  	PB02 Pin = 34
    47  	PB03 Pin = 35
    48  	PB04 Pin = 36
    49  	PB05 Pin = 37
    50  	PB06 Pin = 38
    51  	PB07 Pin = 39
    52  	PB08 Pin = 40
    53  	PB09 Pin = 41
    54  	PB10 Pin = 42 // peripherals: TCC0 channel 0
    55  	PB11 Pin = 43 // peripherals: TCC0 channel 1
    56  	PB12 Pin = 44 // peripherals: TCC0 channel 2
    57  	PB13 Pin = 45 // peripherals: TCC0 channel 3
    58  	PB14 Pin = 46
    59  	PB15 Pin = 47
    60  	PB16 Pin = 48 // peripherals: TCC0 channel 0
    61  	PB17 Pin = 49 // peripherals: TCC0 channel 1
    62  	PB18 Pin = 50
    63  	PB19 Pin = 51
    64  	PB20 Pin = 52
    65  	PB21 Pin = 53
    66  	PB22 Pin = 54
    67  	PB23 Pin = 55
    68  	PB24 Pin = 56
    69  	PB25 Pin = 57
    70  	PB26 Pin = 58
    71  	PB27 Pin = 59
    72  	PB28 Pin = 60
    73  	PB29 Pin = 61
    74  	PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2
    75  	PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3
    76  )