mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
machine: refactor PWM support
This commit refactors PWM support in the machine package to be more flexible. The new API can be used to produce tones at a specific frequency and control servos in a portable way, by abstracting over counter widths and prescalers.
This commit is contained in:
committed by
Ron Evans
parent
f880950c3e
commit
72acda22b0
@@ -25,8 +25,8 @@ const (
|
||||
|
||||
// Analog Pins
|
||||
const (
|
||||
A0 = PA02 // PWM available, also ADC/AIN[0]
|
||||
A1 = PA05 // ADC/AIN[5]
|
||||
A0 = PA02 // ADC/AIN[0]
|
||||
A1 = PA05 // PWM available, also ADC/AIN[5]
|
||||
A2 = PA06 // PWM available, also ADC/AIN[6]
|
||||
A3 = PA07 // PWM available, also ADC/AIN[7]
|
||||
A4 = PB03 // PORTB
|
||||
|
||||
Reference in New Issue
Block a user