mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +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
@@ -90,7 +90,8 @@ func InitPWM() {
|
||||
}
|
||||
|
||||
// Configure configures a PWM pin for output.
|
||||
func (pwm PWM) Configure() {
|
||||
func (pwm PWM) Configure() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Set turns on the duty cycle for a PWM pin using the provided value.
|
||||
|
||||
Reference in New Issue
Block a user