mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 15:33:40 +00:00
sam: return an error when an incorrect PWM pin is used
Previously it would trigger a nil pointer panic.
This commit is contained in:
committed by
Ron Evans
parent
b5f028e1f7
commit
38fc340802
@@ -104,8 +104,8 @@ func InitADC() {
|
||||
}
|
||||
|
||||
// Configure configures an ADC pin to be able to read analog data.
|
||||
func (a ADC) Configure() {
|
||||
return // no pin specific setup on nrf52840 machine.
|
||||
func (a ADC) Configure() error {
|
||||
return nil // no pin specific setup on nrf52840 machine.
|
||||
}
|
||||
|
||||
// Get returns the current value of a ADC pin in the range 0..0xffff.
|
||||
|
||||
Reference in New Issue
Block a user