@@ -55,14 +55,17 @@ an ordinal pin number:
5555You can set ``pyb.Pin.debug(True) `` to get some debug information about
5656how a particular object gets mapped to a pin.
5757
58+ When a pin has the ``Pin.PULL_UP `` or ``Pin.PULL_DOWN `` pull-mode enabled,
59+ that pin has an effective 40k Ohm resistor pulling it to 3V3 or GND
60+ respectively (except pin Y5 which has 11k Ohm resistors).
5861
5962Constructors
6063------------
6164
6265.. class :: pyb.Pin(id, ...)
6366
6467 Create a new Pin object associated with the id. If additional arguments are given,
65- they are used to initialise the pin. See `` init ` `.
68+ they are used to initialise the pin. See :meth: ` pin. init `.
6669
6770
6871Class methods
@@ -88,24 +91,6 @@ Class methods
8891Methods
8992-------
9093
91- .. method :: pin.__str__()
92-
93- Return a string describing the pin object.
94-
95- .. method :: pin.af()
96-
97- Returns the currently configured alternate-function of the pin. The
98- integer returned will match one of the allowed constants for the af
99- argument to the init function.
100-
101- .. method :: pin.gpio()
102-
103- Returns the base address of the GPIO block associated with this pin.
104-
105- .. method :: pin.high()
106-
107- Set the pin to a high logic level.
108-
10994.. method :: pin.init(mode, pull=Pin.PULL_NONE, af=-1)
11095
11196 Initialise the pin:
@@ -126,10 +111,37 @@ Methods
126111
127112 Returns: ``None ``.
128113
114+ .. method :: pin.high()
115+
116+ Set the pin to a high logic level.
117+
129118.. method :: pin.low()
130119
131120 Set the pin to a low logic level.
132121
122+ .. method :: pin.value([value])
123+
124+ Get or set the digital logic level of the pin:
125+
126+ - With no argument, return 0 or 1 depending on the logic level of the pin.
127+ - With ``value `` given, set the logic level of the pin. ``value `` can be
128+ anything that converts to a boolean. If it converts to ``True ``, the pin
129+ is set high, otherwise it is set low.
130+
131+ .. method :: pin.__str__()
132+
133+ Return a string describing the pin object.
134+
135+ .. method :: pin.af()
136+
137+ Returns the currently configured alternate-function of the pin. The
138+ integer returned will match one of the allowed constants for the af
139+ argument to the init function.
140+
141+ .. method :: pin.gpio()
142+
143+ Returns the base address of the GPIO block associated with this pin.
144+
133145.. method :: pin.mode()
134146
135147 Returns the currently configured mode of the pin. The integer returned
@@ -158,15 +170,6 @@ Methods
158170 will match one of the allowed constants for the pull argument to the init
159171 function.
160172
161- .. method :: pin.value([value])
162-
163- Get or set the digital logic level of the pin:
164-
165- - With no argument, return 0 or 1 depending on the logic level of the pin.
166- - With ``value `` given, set the logic level of the pin. ``value `` can be
167- anything that converts to a boolean. If it converts to ``True ``, the pin
168- is set high, otherwise it is set low.
169-
170173
171174Constants
172175---------
0 commit comments