Skip to content

Commit c64d792

Browse files
deadprogramconejoninja
authored andcommitted
adc: update drivers with ADC to use new config struct
Signed-off-by: deadprogram <[email protected]>
1 parent 008157b commit c64d792

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

thermistor/thermistor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func New(pin machine.Pin) Device {
5757

5858
// Configure configures the ADC pin used for the thermistor.
5959
func (d *Device) Configure() {
60-
d.adc.Configure()
60+
d.adc.Configure(machine.ADCConfig{})
6161
}
6262

6363
// ReadTemperature returns the temperature in celsius milli degrees (°C/1000)

touch/resistive/fourwire.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (res *FourWire) ReadX() uint16 {
8686
res.xm.Pin.Configure(machine.PinConfig{Mode: machine.PinOutput})
8787
res.xm.Pin.Low()
8888

89-
res.yp.Configure()
89+
res.yp.Configure(machine.ADCConfig{})
9090

9191
return 0xFFFF - res.yp.Get()
9292
}
@@ -101,7 +101,7 @@ func (res *FourWire) ReadY() uint16 {
101101
res.ym.Pin.Configure(machine.PinConfig{Mode: machine.PinOutput})
102102
res.ym.Pin.Low()
103103

104-
res.xp.Configure()
104+
res.xp.Configure(machine.ADCConfig{})
105105

106106
return 0xFFFF - res.xp.Get()
107107
}
@@ -114,8 +114,8 @@ func (res *FourWire) ReadZ() uint16 {
114114
res.ym.Pin.Configure(machine.PinConfig{Mode: machine.PinOutput})
115115
res.ym.Pin.High()
116116

117-
res.xm.Configure()
118-
res.yp.Configure()
117+
res.xm.Configure(machine.ADCConfig{})
118+
res.yp.Configure(machine.ADCConfig{})
119119

120120
z1 := res.xm.Get()
121121
z2 := res.yp.Get()

0 commit comments

Comments
 (0)