Browse Source

machine: add PWM peripheral comments to pins

These comments will be used in a change to the tinygo.org documentation.
pull/3137/head
Ayke van Laethem 2 years ago
committed by Ron Evans
parent
commit
4ca9b34133
  1. 12
      src/machine/board_atmega328p.go
  2. 68
      src/machine/board_atsamd21.go
  3. 30
      src/machine/machine_atmega1280.go
  4. 128
      src/machine/machine_atsamd51.go
  5. 60
      src/machine/machine_rp2040.go

12
src/machine/board_atmega328p.go

@ -12,9 +12,9 @@ const (
const ( const (
PB0 = portB + 0 PB0 = portB + 0
PB1 = portB + 1 PB1 = portB + 1 // peripherals: Timer1 channel A
PB2 = portB + 2 PB2 = portB + 2 // peripherals: Timer1 channel B
PB3 = portB + 3 PB3 = portB + 3 // peripherals: Timer2 channel A
PB4 = portB + 4 PB4 = portB + 4
PB5 = portB + 5 PB5 = portB + 5
PB6 = portB + 6 PB6 = portB + 6
@ -30,9 +30,9 @@ const (
PD0 = portD + 0 PD0 = portD + 0
PD1 = portD + 1 PD1 = portD + 1
PD2 = portD + 2 PD2 = portD + 2
PD3 = portD + 3 PD3 = portD + 3 // peripherals: Timer2 channel B
PD4 = portD + 4 PD4 = portD + 4
PD5 = portD + 5 PD5 = portD + 5 // peripherals: Timer0 channel B
PD6 = portD + 6 PD6 = portD + 6 // peripherals: Timer0 channel A
PD7 = portD + 7 PD7 = portD + 7
) )

68
src/machine/board_atsamd21.go

@ -10,38 +10,38 @@ func CPUFrequency() uint32 {
// Hardware pins // Hardware pins
const ( const (
PA00 Pin = 0 PA00 Pin = 0 // peripherals: TCC2 channel 0
PA01 Pin = 1 PA01 Pin = 1 // peripherals: TCC2 channel 1
PA02 Pin = 2 PA02 Pin = 2
PA03 Pin = 3 PA03 Pin = 3
PA04 Pin = 4 PA04 Pin = 4 // peripherals: TCC0 channel 0
PA05 Pin = 5 PA05 Pin = 5 // peripherals: TCC0 channel 1
PA06 Pin = 6 PA06 Pin = 6 // peripherals: TCC1 channel 0
PA07 Pin = 7 PA07 Pin = 7 // peripherals: TCC1 channel 1
PA08 Pin = 8 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2
PA09 Pin = 9 PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3
PA10 Pin = 10 PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2
PA11 Pin = 11 PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3
PA12 Pin = 12 PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2
PA13 Pin = 13 PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3
PA14 Pin = 14 PA14 Pin = 14 // peripherals: TCC0 channel 0
PA15 Pin = 15 PA15 Pin = 15 // peripherals: TCC0 channel 1
PA16 Pin = 16 PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2
PA17 Pin = 17 PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3
PA18 Pin = 18 PA18 Pin = 18 // peripherals: TCC0 channel 2
PA19 Pin = 19 PA19 Pin = 19 // peripherals: TCC0 channel 3
PA20 Pin = 20 PA20 Pin = 20 // peripherals: TCC0 channel 2
PA21 Pin = 21 PA21 Pin = 21 // peripherals: TCC0 channel 3
PA22 Pin = 22 PA22 Pin = 22 // peripherals: TCC0 channel 0
PA23 Pin = 23 PA23 Pin = 23 // peripherals: TCC0 channel 1
PA24 Pin = 24 PA24 Pin = 24 // peripherals: TCC1 channel 2
PA25 Pin = 25 PA25 Pin = 25 // peripherals: TCC1 channel 3
PA26 Pin = 26 PA26 Pin = 26
PA27 Pin = 27 PA27 Pin = 27
PA28 Pin = 28 PA28 Pin = 28
PA29 Pin = 29 PA29 Pin = 29
PA30 Pin = 30 PA30 Pin = 30 // peripherals: TCC1 channel 0
PA31 Pin = 31 PA31 Pin = 31 // peripherals: TCC1 channel 1
PB00 Pin = 32 PB00 Pin = 32
PB01 Pin = 33 PB01 Pin = 33
PB02 Pin = 34 PB02 Pin = 34
@ -52,14 +52,14 @@ const (
PB07 Pin = 39 PB07 Pin = 39
PB08 Pin = 40 PB08 Pin = 40
PB09 Pin = 41 PB09 Pin = 41
PB10 Pin = 42 PB10 Pin = 42 // peripherals: TCC0 channel 0
PB11 Pin = 43 PB11 Pin = 43 // peripherals: TCC0 channel 1
PB12 Pin = 44 PB12 Pin = 44 // peripherals: TCC0 channel 2
PB13 Pin = 45 PB13 Pin = 45 // peripherals: TCC0 channel 3
PB14 Pin = 46 PB14 Pin = 46
PB15 Pin = 47 PB15 Pin = 47
PB16 Pin = 48 PB16 Pin = 48 // peripherals: TCC0 channel 0
PB17 Pin = 49 PB17 Pin = 49 // peripherals: TCC0 channel 1
PB18 Pin = 50 PB18 Pin = 50
PB19 Pin = 51 PB19 Pin = 51
PB20 Pin = 52 PB20 Pin = 52
@ -72,6 +72,6 @@ const (
PB27 Pin = 59 PB27 Pin = 59
PB28 Pin = 60 PB28 Pin = 60
PB29 Pin = 61 PB29 Pin = 61
PB30 Pin = 62 PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2
PB31 Pin = 63 PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3
) )

30
src/machine/machine_atmega1280.go

@ -38,10 +38,10 @@ const (
PB1 = portB + 1 PB1 = portB + 1
PB2 = portB + 2 PB2 = portB + 2
PB3 = portB + 3 PB3 = portB + 3
PB4 = portB + 4 PB4 = portB + 4 // peripherals: Timer2 channel A
PB5 = portB + 5 PB5 = portB + 5 // peripherals: Timer1 channel A
PB6 = portB + 6 PB6 = portB + 6 // peripherals: Timer1 channel B
PB7 = portB + 7 PB7 = portB + 7 // peripherals: Timer0 channel A
PC0 = portC + 0 PC0 = portC + 0
PC1 = portC + 1 PC1 = portC + 1
PC2 = portC + 2 PC2 = portC + 2
@ -57,9 +57,9 @@ const (
PD7 = portD + 7 PD7 = portD + 7
PE0 = portE + 0 PE0 = portE + 0
PE1 = portE + 1 PE1 = portE + 1
PE3 = portE + 3 PE3 = portE + 3 // peripherals: Timer3 channel A
PE4 = portE + 4 PE4 = portE + 4 // peripherals: Timer3 channel B
PE5 = portE + 5 PE5 = portE + 5 // peripherals: Timer3 channel C
PE6 = portE + 6 PE6 = portE + 6
PF0 = portF + 0 PF0 = portF + 0
PF1 = portF + 1 PF1 = portF + 1
@ -72,13 +72,13 @@ const (
PG0 = portG + 0 PG0 = portG + 0
PG1 = portG + 1 PG1 = portG + 1
PG2 = portG + 2 PG2 = portG + 2
PG5 = portG + 5 PG5 = portG + 5 // peripherals: Timer0 channel B
PH0 = portH + 0 PH0 = portH + 0
PH1 = portH + 1 PH1 = portH + 1
PH3 = portH + 3 PH3 = portH + 3 // peripherals: Timer4 channel A
PH4 = portH + 4 PH4 = portH + 4 // peripherals: Timer4 channel B
PH5 = portH + 5 PH5 = portH + 5 // peripherals: Timer4 channel C
PH6 = portH + 6 PH6 = portH + 6 // peripherals: Timer0 channel B
PJ0 = portJ + 0 PJ0 = portJ + 0
PJ1 = portJ + 1 PJ1 = portJ + 1
PK0 = portK + 0 PK0 = portK + 0
@ -92,9 +92,9 @@ const (
PL0 = portL + 0 PL0 = portL + 0
PL1 = portL + 1 PL1 = portL + 1
PL2 = portL + 2 PL2 = portL + 2
PL3 = portL + 3 PL3 = portL + 3 // peripherals: Timer5 channel A
PL4 = portL + 4 PL4 = portL + 4 // peripherals: Timer5 channel B
PL5 = portL + 5 PL5 = portL + 5 // peripherals: Timer5 channel C
PL6 = portL + 6 PL6 = portL + 6
PL7 = portL + 7 PL7 = portL + 7
) )

128
src/machine/machine_atsamd51.go

@ -78,86 +78,86 @@ const (
PA05 Pin = 5 PA05 Pin = 5
PA06 Pin = 6 PA06 Pin = 6
PA07 Pin = 7 PA07 Pin = 7
PA08 Pin = 8 PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 4
PA09 Pin = 9 PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 5
PA10 Pin = 10 PA10 Pin = 10 // peripherals: TCC0 channel 2, TCC1 channel 6
PA11 Pin = 11 PA11 Pin = 11 // peripherals: TCC0 channel 3, TCC1 channel 7
PA12 Pin = 12 PA12 Pin = 12 // peripherals: TCC0 channel 6, TCC1 channel 2
PA13 Pin = 13 PA13 Pin = 13 // peripherals: TCC0 channel 7, TCC1 channel 3
PA14 Pin = 14 PA14 Pin = 14 // peripherals: TCC2 channel 0, TCC1 channel 2
PA15 Pin = 15 PA15 Pin = 15 // peripherals: TCC2 channel 1, TCC1 channel 3
PA16 Pin = 16 PA16 Pin = 16 // peripherals: TCC1 channel 0, TCC0 channel 4
PA17 Pin = 17 PA17 Pin = 17 // peripherals: TCC1 channel 1, TCC0 channel 5
PA18 Pin = 18 PA18 Pin = 18 // peripherals: TCC1 channel 2, TCC0 channel 6
PA19 Pin = 19 PA19 Pin = 19 // peripherals: TCC1 channel 3, TCC0 channel 7
PA20 Pin = 20 PA20 Pin = 20 // peripherals: TCC1 channel 4, TCC0 channel 0
PA21 Pin = 21 PA21 Pin = 21 // peripherals: TCC1 channel 5, TCC0 channel 1
PA22 Pin = 22 PA22 Pin = 22 // peripherals: TCC1 channel 6, TCC0 channel 2
PA23 Pin = 23 PA23 Pin = 23 // peripherals: TCC1 channel 7, TCC0 channel 3
PA24 Pin = 24 PA24 Pin = 24 // peripherals: TCC2 channel 2
PA25 Pin = 25 PA25 Pin = 25 // peripherals: TCC2 channel 3
PA26 Pin = 26 PA26 Pin = 26
PA27 Pin = 27 PA27 Pin = 27
PA28 Pin = 28 PA28 Pin = 28
PA29 Pin = 29 PA29 Pin = 29
PA30 Pin = 30 PA30 Pin = 30 // peripherals: TCC2 channel 0
PA31 Pin = 31 PA31 Pin = 31 // peripherals: TCC2 channel 1
PB00 Pin = 32 PB00 Pin = 32
PB01 Pin = 33 PB01 Pin = 33
PB02 Pin = 34 PB02 Pin = 34 // peripherals: TCC2 channel 2
PB03 Pin = 35 PB03 Pin = 35 // peripherals: TCC2 channel 3
PB04 Pin = 36 PB04 Pin = 36
PB05 Pin = 37 PB05 Pin = 37
PB06 Pin = 38 PB06 Pin = 38
PB07 Pin = 39 PB07 Pin = 39
PB08 Pin = 40 PB08 Pin = 40
PB09 Pin = 41 PB09 Pin = 41
PB10 Pin = 42 PB10 Pin = 42 // peripherals: TCC0 channel 4, TCC1 channel 0
PB11 Pin = 43 PB11 Pin = 43 // peripherals: TCC0 channel 5, TCC1 channel 1
PB12 Pin = 44 PB12 Pin = 44 // peripherals: TCC3 channel 0, TCC0 channel 0
PB13 Pin = 45 PB13 Pin = 45 // peripherals: TCC3 channel 1, TCC0 channel 1
PB14 Pin = 46 PB14 Pin = 46 // peripherals: TCC4 channel 0, TCC0 channel 2
PB15 Pin = 47 PB15 Pin = 47 // peripherals: TCC4 channel 1, TCC0 channel 3
PB16 Pin = 48 PB16 Pin = 48 // peripherals: TCC3 channel 0, TCC0 channel 4
PB17 Pin = 49 PB17 Pin = 49 // peripherals: TCC3 channel 1, TCC0 channel 5
PB18 Pin = 50 PB18 Pin = 50 // peripherals: TCC1 channel 0
PB19 Pin = 51 PB19 Pin = 51 // peripherals: TCC1 channel 1
PB20 Pin = 52 PB20 Pin = 52 // peripherals: TCC1 channel 2
PB21 Pin = 53 PB21 Pin = 53 // peripherals: TCC1 channel 3
PB22 Pin = 54 PB22 Pin = 54
PB23 Pin = 55 PB23 Pin = 55
PB24 Pin = 56 PB24 Pin = 56
PB25 Pin = 57 PB25 Pin = 57
PB26 Pin = 58 PB26 Pin = 58 // peripherals: TCC1 channel 2
PB27 Pin = 59 PB27 Pin = 59 // peripherals: TCC1 channel 3
PB28 Pin = 60 PB28 Pin = 60 // peripherals: TCC1 channel 4
PB29 Pin = 61 PB29 Pin = 61 // peripherals: TCC1 channel 5
PB30 Pin = 62 PB30 Pin = 62 // peripherals: TCC4 channel 0, TCC0 channel 6
PB31 Pin = 63 PB31 Pin = 63 // peripherals: TCC4 channel 1, TCC0 channel 7
PC00 Pin = 64 PC00 Pin = 64
PC01 Pin = 65 PC01 Pin = 65
PC02 Pin = 66 PC02 Pin = 66
PC03 Pin = 67 PC03 Pin = 67
PC04 Pin = 68 PC04 Pin = 68 // peripherals: TCC0 channel 0
PC05 Pin = 69 PC05 Pin = 69 // peripherals: TCC0 channel 1
PC06 Pin = 70 PC06 Pin = 70
PC07 Pin = 71 PC07 Pin = 71
PC08 Pin = 72 PC08 Pin = 72
PC09 Pin = 73 PC09 Pin = 73
PC10 Pin = 74 PC10 Pin = 74 // peripherals: TCC0 channel 0, TCC1 channel 4
PC11 Pin = 75 PC11 Pin = 75 // peripherals: TCC0 channel 1, TCC1 channel 5
PC12 Pin = 76 PC12 Pin = 76 // peripherals: TCC0 channel 2, TCC1 channel 6
PC13 Pin = 77 PC13 Pin = 77 // peripherals: TCC0 channel 3, TCC1 channel 7
PC14 Pin = 78 PC14 Pin = 78 // peripherals: TCC0 channel 4, TCC1 channel 0
PC15 Pin = 79 PC15 Pin = 79 // peripherals: TCC0 channel 5, TCC1 channel 1
PC16 Pin = 80 PC16 Pin = 80 // peripherals: TCC0 channel 0
PC17 Pin = 81 PC17 Pin = 81 // peripherals: TCC0 channel 1
PC18 Pin = 82 PC18 Pin = 82 // peripherals: TCC0 channel 2
PC19 Pin = 83 PC19 Pin = 83 // peripherals: TCC0 channel 3
PC20 Pin = 84 PC20 Pin = 84 // peripherals: TCC0 channel 4
PC21 Pin = 85 PC21 Pin = 85 // peripherals: TCC0 channel 5
PC22 Pin = 86 PC22 Pin = 86 // peripherals: TCC0 channel 6
PC23 Pin = 87 PC23 Pin = 87 // peripherals: TCC0 channel 7
PC24 Pin = 88 PC24 Pin = 88
PC25 Pin = 89 PC25 Pin = 89
PC26 Pin = 90 PC26 Pin = 90
@ -174,20 +174,20 @@ const (
PD05 Pin = 101 PD05 Pin = 101
PD06 Pin = 102 PD06 Pin = 102
PD07 Pin = 103 PD07 Pin = 103
PD08 Pin = 104 PD08 Pin = 104 // peripherals: TCC0 channel 1
PD09 Pin = 105 PD09 Pin = 105 // peripherals: TCC0 channel 2
PD10 Pin = 106 PD10 Pin = 106 // peripherals: TCC0 channel 3
PD11 Pin = 107 PD11 Pin = 107 // peripherals: TCC0 channel 4
PD12 Pin = 108 PD12 Pin = 108 // peripherals: TCC0 channel 5
PD13 Pin = 109 PD13 Pin = 109 // peripherals: TCC0 channel 6
PD14 Pin = 110 PD14 Pin = 110
PD15 Pin = 111 PD15 Pin = 111
PD16 Pin = 112 PD16 Pin = 112
PD17 Pin = 113 PD17 Pin = 113
PD18 Pin = 114 PD18 Pin = 114
PD19 Pin = 115 PD19 Pin = 115
PD20 Pin = 116 PD20 Pin = 116 // peripherals: TCC1 channel 0
PD21 Pin = 117 PD21 Pin = 117 // peripherals: TCC1 channel 1
PD22 Pin = 118 PD22 Pin = 118
PD23 Pin = 119 PD23 Pin = 119
PD24 Pin = 120 PD24 Pin = 120

60
src/machine/machine_rp2040.go

@ -11,36 +11,36 @@ const deviceName = rp.Device
const ( const (
// GPIO pins // GPIO pins
GPIO0 Pin = 0 GPIO0 Pin = 0 // peripherals: PWM0 channel A
GPIO1 Pin = 1 GPIO1 Pin = 1 // peripherals: PWM0 channel B
GPIO2 Pin = 2 GPIO2 Pin = 2 // peripherals: PWM1 channel A
GPIO3 Pin = 3 GPIO3 Pin = 3 // peripherals: PWM1 channel B
GPIO4 Pin = 4 GPIO4 Pin = 4 // peripherals: PWM2 channel A
GPIO5 Pin = 5 GPIO5 Pin = 5 // peripherals: PWM2 channel B
GPIO6 Pin = 6 GPIO6 Pin = 6 // peripherals: PWM3 channel A
GPIO7 Pin = 7 GPIO7 Pin = 7 // peripherals: PWM3 channel B
GPIO8 Pin = 8 GPIO8 Pin = 8 // peripherals: PWM4 channel A
GPIO9 Pin = 9 GPIO9 Pin = 9 // peripherals: PWM4 channel B
GPIO10 Pin = 10 GPIO10 Pin = 10 // peripherals: PWM5 channel A
GPIO11 Pin = 11 GPIO11 Pin = 11 // peripherals: PWM5 channel B
GPIO12 Pin = 12 GPIO12 Pin = 12 // peripherals: PWM6 channel A
GPIO13 Pin = 13 GPIO13 Pin = 13 // peripherals: PWM6 channel B
GPIO14 Pin = 14 GPIO14 Pin = 14 // peripherals: PWM7 channel A
GPIO15 Pin = 15 GPIO15 Pin = 15 // peripherals: PWM7 channel B
GPIO16 Pin = 16 GPIO16 Pin = 16 // peripherals: PWM0 channel A
GPIO17 Pin = 17 GPIO17 Pin = 17 // peripherals: PWM0 channel B
GPIO18 Pin = 18 GPIO18 Pin = 18 // peripherals: PWM1 channel A
GPIO19 Pin = 19 GPIO19 Pin = 19 // peripherals: PWM1 channel B
GPIO20 Pin = 20 GPIO20 Pin = 20 // peripherals: PWM2 channel A
GPIO21 Pin = 21 GPIO21 Pin = 21 // peripherals: PWM2 channel B
GPIO22 Pin = 22 GPIO22 Pin = 22 // peripherals: PWM3 channel A
GPIO23 Pin = 23 GPIO23 Pin = 23 // peripherals: PWM3 channel B
GPIO24 Pin = 24 GPIO24 Pin = 24 // peripherals: PWM4 channel A
GPIO25 Pin = 25 GPIO25 Pin = 25 // peripherals: PWM4 channel B
GPIO26 Pin = 26 GPIO26 Pin = 26 // peripherals: PWM5 channel A
GPIO27 Pin = 27 GPIO27 Pin = 27 // peripherals: PWM5 channel B
GPIO28 Pin = 28 GPIO28 Pin = 28 // peripherals: PWM6 channel A
GPIO29 Pin = 29 GPIO29 Pin = 29 // peripherals: PWM6 channel B
// Analog pins // Analog pins
ADC0 Pin = GPIO26 ADC0 Pin = GPIO26

Loading…
Cancel
Save