diff options
author | sago35 <[email protected]> | 2020-06-16 21:55:47 +0900 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-06-19 15:07:57 +0200 |
commit | 9a20af5b5902e7e8b9c291d2b8acb906d00d8b96 (patch) | |
tree | 2c21694f43a99cad2144b12d7c90024541a49d1b | |
parent | 4e8e3f348f29baf3b06050880370db050b540490 (diff) | |
download | tinygo-9a20af5b5902e7e8b9c291d2b8acb906d00d8b96.tar.gz tinygo-9a20af5b5902e7e8b9c291d2b8acb906d00d8b96.zip |
Add adc settings
-rw-r--r-- | src/machine/machine_atsamd21.go | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go index 0f2305a20..027e007e6 100644 --- a/src/machine/machine_atsamd21.go +++ b/src/machine/machine_atsamd21.go @@ -388,6 +388,16 @@ func (a ADC) getADCChannel() uint8 { switch a.Pin { case PA02: return 0 + case PA03: + return 1 + case PB04: + return 12 + case PB05: + return 13 + case PB06: + return 14 + case PB07: + return 15 case PB08: return 2 case PB09: @@ -400,14 +410,22 @@ func (a ADC) getADCChannel() uint8 { return 6 case PA07: return 7 - case PB02: - return 10 - case PB03: - return 11 + case PA08: + return 16 case PA09: return 17 + case PA10: + return 18 case PA11: return 19 + case PB00: + return 8 + case PB01: + return 9 + case PB02: + return 10 + case PB03: + return 11 default: return 0 } |