mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +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)
|
// Averaging (see datasheet table in AVGCTRL register description)
|
||||||
var samples uint32
|
var samples uint32
|
||||||
switch config.Resolution {
|
switch config.Samples {
|
||||||
case 1:
|
case 1:
|
||||||
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@@ -757,7 +757,7 @@ func (a ADC) Configure(config ADCConfig) {
|
|||||||
|
|
||||||
// Averaging (see datasheet table in AVGCTRL register description)
|
// Averaging (see datasheet table in AVGCTRL register description)
|
||||||
var samples uint32
|
var samples uint32
|
||||||
switch config.Resolution {
|
switch config.Samples {
|
||||||
case 1:
|
case 1:
|
||||||
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
samples = sam.ADC_AVGCTRL_SAMPLENUM_1
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user