mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
machine/rp2040: gpio and adc pin definitions
This commit is contained in:
@@ -7,6 +7,46 @@ import (
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// GPIO pins
|
||||
GPIO0 Pin = 0
|
||||
GPIO1 Pin = 1
|
||||
GPIO2 Pin = 2
|
||||
GPIO3 Pin = 3
|
||||
GPIO4 Pin = 4
|
||||
GPIO5 Pin = 5
|
||||
GPIO6 Pin = 6
|
||||
GPIO7 Pin = 7
|
||||
GPIO8 Pin = 8
|
||||
GPIO9 Pin = 9
|
||||
GPIO10 Pin = 10
|
||||
GPIO11 Pin = 11
|
||||
GPIO12 Pin = 12
|
||||
GPIO13 Pin = 13
|
||||
GPIO14 Pin = 14
|
||||
GPIO15 Pin = 15
|
||||
GPIO16 Pin = 16
|
||||
GPIO17 Pin = 17
|
||||
GPIO18 Pin = 18
|
||||
GPIO19 Pin = 19
|
||||
GPIO20 Pin = 20
|
||||
GPIO21 Pin = 21
|
||||
GPIO22 Pin = 22
|
||||
GPIO23 Pin = 23
|
||||
GPIO24 Pin = 24
|
||||
GPIO25 Pin = 25
|
||||
GPIO26 Pin = 26
|
||||
GPIO27 Pin = 27
|
||||
GPIO28 Pin = 28
|
||||
GPIO29 Pin = 29
|
||||
|
||||
// Analog pins
|
||||
ADC0 Pin = GPIO26
|
||||
ADC1 Pin = GPIO27
|
||||
ADC2 Pin = GPIO28
|
||||
ADC3 Pin = GPIO29
|
||||
)
|
||||
|
||||
//go:linkname machineInit runtime.machineInit
|
||||
func machineInit() {
|
||||
// Reset all peripherals to put system into a known state,
|
||||
|
||||
Reference in New Issue
Block a user