Some Pin alternate functions are inputs, for example, timer capture and
break inputs. In Pyb.Pin the only way to set alt mode is with Pin.AF_PP or
Pin.AF_OD. It is not intuitive to use an output mode to configure an
input. Pin.ALT is used in the machine.Pin class and works in pyb.Pin.
The examples are changed to use Pin.ALT because TIM2_CH3 can be a capture
input or pulse output.
Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
Remove out of context callback paragraph, it was part of the wipy docs.
And move the paragraph about PULL_UP/PULL_DOWN resistor values to within
the init() method docs. Also fix pull-pull -> push-pull.
Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
The keyword "af" has been deprecated for some time and "alt" should be used
instead (but "af" still works).
Signed-off-by: Damien George <damien@micropython.org>
By virtue of its name, the pyb module would only be available on a pyboard
and so does not need to have conditional "only" directives throughout its
documentation.
These conditionals were added mostly in
cfcf47c064 in the initial development of the
cc3200 port, which had the pyb module before it switched to the machine
module. And wipy only conditionals were removed from the pyb module
documentation in 4542643025, so there's no
need to retain any more conditionals.
This is how the names will be printed on the sticker that goes on top
of the EMI shield. The shorter names also help saving a few bytes of
RAM and ROM.