mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
Fix typo in ADC switch on config field Samples
This commit is contained in:
@@ -343,7 +343,7 @@ func (a ADC) Configure(config ADCConfig) {
|
||||
|
||||
// Averaging (see datasheet table in AVGCTRL register description)
|
||||
var samples uint32
|
||||
switch config.Resolution {
|
||||
switch config.Samples {
|
||||
case 1:
|
||||
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
||||
case 2:
|
||||
|
||||
@@ -757,7 +757,7 @@ func (a ADC) Configure(config ADCConfig) {
|
||||
|
||||
// Averaging (see datasheet table in AVGCTRL register description)
|
||||
var samples uint32
|
||||
switch config.Resolution {
|
||||
switch config.Samples {
|
||||
case 1:
|
||||
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
||||
case 2:
|
||||
|
||||
Reference in New Issue
Block a user