Skip to content
Discussion options

You must be logged in to vote

The PWM class is pretty limited in methods. The class dictionary is in extmod/machine_pwm.c, and the per-port machine_pwm implementation is just included into that file. The only freedom you have is in the keyword arguments of the constructor or the init() method. The rp2 port does not support keyword arguments for the constructor, but you can use pwm.init(), and there is no init() method. So for any extension you have to change extmod/machine_pwm.c, or extend the existing rp2 port e.g. with pwm.init().

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@robert-hh
Comment options

@webdeb
Comment options

@robert-hh
Comment options

@robert-hh
Comment options

@webdeb
Comment options

Answer selected by webdeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants