Skip to content

Commit efd3f3d

Browse files
committed
fix(src/machine/nrf52xxx/adc): conversion
Signed-off-by: Paul Schroeder <milkpirate@users.noreply.github.com>
1 parent 223e299 commit efd3f3d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/machine/machine_nrf52xxx.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,7 @@ func (a ADC) Get() uint16 {
191191
}
192192
nrf.SAADC.EVENTS_STOPPED.Set(0)
193193

194-
value := int16(rawValue.Get())
195-
if value < 0 {
196-
value = 0
197-
}
198-
199-
// Return 16-bit result from 12-bit value.
200-
return uint16(value << 4)
194+
return rawValue.Get()
201195
}
202196

203197
// SPI on the NRF.

0 commit comments

Comments
 (0)