Skip to content

Commit 9d0a8d5

Browse files
committed
reference: regenerate machine package documentation
Signed-off-by: deadprogram <[email protected]>
1 parent 6e79723 commit 9d0a8d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2755
-976
lines changed

content/docs/reference/microcontrollers/machine/arduino-mega1280.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ const (
205205
PC5 = portC + 5
206206
PC6 = portC + 6
207207
PC7 = portC + 7
208-
PD0 = portD + 0
209-
PD1 = portD + 1
208+
PD0 = portD + 0 // peripherals: I2C0 SCL
209+
PD1 = portD + 1 // peripherals: I2C0 SDA
210210
PD2 = portD + 2
211211
PD3 = portD + 3
212212
PD7 = portD + 7

content/docs/reference/microcontrollers/machine/arduino-mkr1000.md

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,30 @@ I2S pins
111111

112112
```go
113113
const (
114-
PA00 Pin = 0 // peripherals: TCC2 channel 0
115-
PA01 Pin = 1 // peripherals: TCC2 channel 1
114+
PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA
115+
PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL
116116
PA02 Pin = 2
117117
PA03 Pin = 3
118118
PA04 Pin = 4 // peripherals: TCC0 channel 0
119119
PA05 Pin = 5 // peripherals: TCC0 channel 1
120120
PA06 Pin = 6 // peripherals: TCC1 channel 0
121121
PA07 Pin = 7 // peripherals: TCC1 channel 1
122-
PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2
123-
PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3
122+
PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA
123+
PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL
124124
PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2
125125
PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3
126-
PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2
127-
PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3
126+
PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA
127+
PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL
128128
PA14 Pin = 14 // peripherals: TCC0 channel 0
129129
PA15 Pin = 15 // peripherals: TCC0 channel 1
130-
PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2
131-
PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3
130+
PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA
131+
PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL
132132
PA18 Pin = 18 // peripherals: TCC0 channel 2
133133
PA19 Pin = 19 // peripherals: TCC0 channel 3
134134
PA20 Pin = 20 // peripherals: TCC0 channel 2
135135
PA21 Pin = 21 // peripherals: TCC0 channel 3
136-
PA22 Pin = 22 // peripherals: TCC0 channel 0
137-
PA23 Pin = 23 // peripherals: TCC0 channel 1
136+
PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA
137+
PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL
138138
PA24 Pin = 24 // peripherals: TCC1 channel 2
139139
PA25 Pin = 25 // peripherals: TCC1 channel 3
140140
PA26 Pin = 26
@@ -145,22 +145,22 @@ const (
145145
PA31 Pin = 31 // peripherals: TCC1 channel 1
146146
PB00 Pin = 32
147147
PB01 Pin = 33
148-
PB02 Pin = 34
149-
PB03 Pin = 35
148+
PB02 Pin = 34 // peripherals: sercomI2CM5 SDA
149+
PB03 Pin = 35 // peripherals: sercomI2CM5 SCL
150150
PB04 Pin = 36
151151
PB05 Pin = 37
152152
PB06 Pin = 38
153153
PB07 Pin = 39
154-
PB08 Pin = 40
155-
PB09 Pin = 41
154+
PB08 Pin = 40 // peripherals: sercomI2CM4 SDA
155+
PB09 Pin = 41 // peripherals: sercomI2CM4 SCL
156156
PB10 Pin = 42 // peripherals: TCC0 channel 0
157157
PB11 Pin = 43 // peripherals: TCC0 channel 1
158-
PB12 Pin = 44 // peripherals: TCC0 channel 2
159-
PB13 Pin = 45 // peripherals: TCC0 channel 3
158+
PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA
159+
PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL
160160
PB14 Pin = 46
161161
PB15 Pin = 47
162-
PB16 Pin = 48 // peripherals: TCC0 channel 0
163-
PB17 Pin = 49 // peripherals: TCC0 channel 1
162+
PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA
163+
PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL
164164
PB18 Pin = 50
165165
PB19 Pin = 51
166166
PB20 Pin = 52
@@ -173,8 +173,8 @@ const (
173173
PB27 Pin = 59
174174
PB28 Pin = 60
175175
PB29 Pin = 61
176-
PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2
177-
PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3
176+
PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA
177+
PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL
178178
)
179179
```
180180

@@ -328,6 +328,33 @@ const (
328328
Pin change interrupt constants for SetInterrupt.
329329

330330

331+
```go
332+
const (
333+
// WatchdogMaxTimeout in milliseconds (16s)
334+
WatchdogMaxTimeout = (16384 * 1000) / 1024
335+
)
336+
```
337+
338+
339+
340+
```go
341+
const (
342+
// these are SAMD21 specific.
343+
usb_DEVICE_PCKSIZE_BYTE_COUNT_Pos = 0
344+
usb_DEVICE_PCKSIZE_BYTE_COUNT_Mask = 0x3FFF
345+
346+
usb_DEVICE_PCKSIZE_SIZE_Pos = 28
347+
usb_DEVICE_PCKSIZE_SIZE_Mask = 0x7
348+
349+
usb_DEVICE_PCKSIZE_MULTI_PACKET_SIZE_Pos = 14
350+
usb_DEVICE_PCKSIZE_MULTI_PACKET_SIZE_Mask = 0x3FFF
351+
352+
NumberOfUSBEndpoints = 8
353+
)
354+
```
355+
356+
357+
331358
```go
332359
const (
333360
Mode0 = 0
@@ -417,6 +444,14 @@ var Flash flashBlockDevice
417444

418445

419446

447+
```go
448+
var Watchdog = &watchdogImpl{}
449+
```
450+
451+
Watchdog provides access to the hardware watchdog available
452+
in the SAMD21.
453+
454+
420455
```go
421456
var (
422457
ErrPWMPeriodTooLong = errors.New("pwm: period too long")
@@ -463,6 +498,15 @@ var (
463498

464499

465500

501+
### func AckUsbOutTransfer
502+
503+
```go
504+
func AckUsbOutTransfer(ep uint32)
505+
```
506+
507+
AckUsbOutTransfer is called to acknowledge the completion of a USB OUT transfer.
508+
509+
466510
### func CPUFrequency
467511

468512
```go
@@ -1658,3 +1702,21 @@ Configure the USB peripheral. The config is here for compatibility with the UART
16581702

16591703

16601704

1705+
## type WatchdogConfig
1706+
1707+
```go
1708+
type WatchdogConfig struct {
1709+
// The timeout (in milliseconds) before the watchdog fires.
1710+
//
1711+
// If the requested timeout exceeds `MaxTimeout` it will be rounded
1712+
// down.
1713+
TimeoutMillis uint32
1714+
}
1715+
```
1716+
1717+
WatchdogConfig holds configuration for the watchdog timer.
1718+
1719+
1720+
1721+
1722+

content/docs/reference/microcontrollers/machine/arduino-mkrwifi1010.md

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -128,30 +128,30 @@ NINA-W102 Pins
128128

129129
```go
130130
const (
131-
PA00 Pin = 0 // peripherals: TCC2 channel 0
132-
PA01 Pin = 1 // peripherals: TCC2 channel 1
131+
PA00 Pin = 0 // peripherals: TCC2 channel 0, sercomI2CM1 SDA
132+
PA01 Pin = 1 // peripherals: TCC2 channel 1, sercomI2CM1 SCL
133133
PA02 Pin = 2
134134
PA03 Pin = 3
135135
PA04 Pin = 4 // peripherals: TCC0 channel 0
136136
PA05 Pin = 5 // peripherals: TCC0 channel 1
137137
PA06 Pin = 6 // peripherals: TCC1 channel 0
138138
PA07 Pin = 7 // peripherals: TCC1 channel 1
139-
PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2
140-
PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3
139+
PA08 Pin = 8 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM0 SDA, sercomI2CM2 SDA
140+
PA09 Pin = 9 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM0 SCL, sercomI2CM2 SCL
141141
PA10 Pin = 10 // peripherals: TCC1 channel 0, TCC0 channel 2
142142
PA11 Pin = 11 // peripherals: TCC1 channel 1, TCC0 channel 3
143-
PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2
144-
PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3
143+
PA12 Pin = 12 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM2 SDA, sercomI2CM4 SDA
144+
PA13 Pin = 13 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM2 SCL, sercomI2CM4 SCL
145145
PA14 Pin = 14 // peripherals: TCC0 channel 0
146146
PA15 Pin = 15 // peripherals: TCC0 channel 1
147-
PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2
148-
PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3
147+
PA16 Pin = 16 // peripherals: TCC2 channel 0, TCC0 channel 2, sercomI2CM1 SDA, sercomI2CM3 SDA
148+
PA17 Pin = 17 // peripherals: TCC2 channel 1, TCC0 channel 3, sercomI2CM1 SCL, sercomI2CM3 SCL
149149
PA18 Pin = 18 // peripherals: TCC0 channel 2
150150
PA19 Pin = 19 // peripherals: TCC0 channel 3
151151
PA20 Pin = 20 // peripherals: TCC0 channel 2
152152
PA21 Pin = 21 // peripherals: TCC0 channel 3
153-
PA22 Pin = 22 // peripherals: TCC0 channel 0
154-
PA23 Pin = 23 // peripherals: TCC0 channel 1
153+
PA22 Pin = 22 // peripherals: TCC0 channel 0, sercomI2CM3 SDA, sercomI2CM5 SDA
154+
PA23 Pin = 23 // peripherals: TCC0 channel 1, sercomI2CM3 SCL, sercomI2CM5 SCL
155155
PA24 Pin = 24 // peripherals: TCC1 channel 2
156156
PA25 Pin = 25 // peripherals: TCC1 channel 3
157157
PA26 Pin = 26
@@ -162,22 +162,22 @@ const (
162162
PA31 Pin = 31 // peripherals: TCC1 channel 1
163163
PB00 Pin = 32
164164
PB01 Pin = 33
165-
PB02 Pin = 34
166-
PB03 Pin = 35
165+
PB02 Pin = 34 // peripherals: sercomI2CM5 SDA
166+
PB03 Pin = 35 // peripherals: sercomI2CM5 SCL
167167
PB04 Pin = 36
168168
PB05 Pin = 37
169169
PB06 Pin = 38
170170
PB07 Pin = 39
171-
PB08 Pin = 40
172-
PB09 Pin = 41
171+
PB08 Pin = 40 // peripherals: sercomI2CM4 SDA
172+
PB09 Pin = 41 // peripherals: sercomI2CM4 SCL
173173
PB10 Pin = 42 // peripherals: TCC0 channel 0
174174
PB11 Pin = 43 // peripherals: TCC0 channel 1
175-
PB12 Pin = 44 // peripherals: TCC0 channel 2
176-
PB13 Pin = 45 // peripherals: TCC0 channel 3
175+
PB12 Pin = 44 // peripherals: TCC0 channel 2, sercomI2CM4 SDA
176+
PB13 Pin = 45 // peripherals: TCC0 channel 3, sercomI2CM4 SCL
177177
PB14 Pin = 46
178178
PB15 Pin = 47
179-
PB16 Pin = 48 // peripherals: TCC0 channel 0
180-
PB17 Pin = 49 // peripherals: TCC0 channel 1
179+
PB16 Pin = 48 // peripherals: TCC0 channel 0, sercomI2CM5 SDA
180+
PB17 Pin = 49 // peripherals: TCC0 channel 1, sercomI2CM5 SCL
181181
PB18 Pin = 50
182182
PB19 Pin = 51
183183
PB20 Pin = 52
@@ -190,8 +190,8 @@ const (
190190
PB27 Pin = 59
191191
PB28 Pin = 60
192192
PB29 Pin = 61
193-
PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2
194-
PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3
193+
PB30 Pin = 62 // peripherals: TCC0 channel 0, TCC1 channel 2, sercomI2CM5 SDA
194+
PB31 Pin = 63 // peripherals: TCC0 channel 1, TCC1 channel 3, sercomI2CM5 SCL
195195
)
196196
```
197197

@@ -345,6 +345,33 @@ const (
345345
Pin change interrupt constants for SetInterrupt.
346346

347347

348+
```go
349+
const (
350+
// WatchdogMaxTimeout in milliseconds (16s)
351+
WatchdogMaxTimeout = (16384 * 1000) / 1024
352+
)
353+
```
354+
355+
356+
357+
```go
358+
const (
359+
// these are SAMD21 specific.
360+
usb_DEVICE_PCKSIZE_BYTE_COUNT_Pos = 0
361+
usb_DEVICE_PCKSIZE_BYTE_COUNT_Mask = 0x3FFF
362+
363+
usb_DEVICE_PCKSIZE_SIZE_Pos = 28
364+
usb_DEVICE_PCKSIZE_SIZE_Mask = 0x7
365+
366+
usb_DEVICE_PCKSIZE_MULTI_PACKET_SIZE_Pos = 14
367+
usb_DEVICE_PCKSIZE_MULTI_PACKET_SIZE_Mask = 0x3FFF
368+
369+
NumberOfUSBEndpoints = 8
370+
)
371+
```
372+
373+
374+
348375
```go
349376
const (
350377
Mode0 = 0
@@ -470,6 +497,14 @@ var Flash flashBlockDevice
470497

471498

472499

500+
```go
501+
var Watchdog = &watchdogImpl{}
502+
```
503+
504+
Watchdog provides access to the hardware watchdog available
505+
in the SAMD21.
506+
507+
473508
```go
474509
var (
475510
ErrPWMPeriodTooLong = errors.New("pwm: period too long")
@@ -516,6 +551,15 @@ var (
516551

517552

518553

554+
### func AckUsbOutTransfer
555+
556+
```go
557+
func AckUsbOutTransfer(ep uint32)
558+
```
559+
560+
AckUsbOutTransfer is called to acknowledge the completion of a USB OUT transfer.
561+
562+
519563
### func CPUFrequency
520564

521565
```go
@@ -1711,3 +1755,21 @@ Configure the USB peripheral. The config is here for compatibility with the UART
17111755

17121756

17131757

1758+
## type WatchdogConfig
1759+
1760+
```go
1761+
type WatchdogConfig struct {
1762+
// The timeout (in milliseconds) before the watchdog fires.
1763+
//
1764+
// If the requested timeout exceeds `MaxTimeout` it will be rounded
1765+
// down.
1766+
TimeoutMillis uint32
1767+
}
1768+
```
1769+
1770+
WatchdogConfig holds configuration for the watchdog timer.
1771+
1772+
1773+
1774+
1775+

content/docs/reference/microcontrollers/machine/arduino-nano.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ const (
7373
PC1 = portC + 1
7474
PC2 = portC + 2
7575
PC3 = portC + 3
76-
PC4 = portC + 4
77-
PC5 = portC + 5
76+
PC4 = portC + 4 // peripherals: I2C0 SDA
77+
PC5 = portC + 5 // peripherals: I2C0 SCL
7878
PC6 = portC + 6
7979
PC7 = portC + 7
8080
PD0 = portD + 0

0 commit comments

Comments
 (0)