Skip to content

Commit a384a53

Browse files
committed
docs/pyb.*: Use proper class case in method headers.
Class designator will be used as is in indexes, so must match actual class name.
1 parent 585aafc commit a384a53

File tree

16 files changed

+108
-107
lines changed

16 files changed

+108
-107
lines changed

docs/library/pyb.ADC.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Methods
3636

3737
.. only:: port_pyboard
3838

39-
.. method:: adc.read()
39+
.. method:: ADC.read()
4040

4141
Read the value on the analog pin and return it. The returned value
4242
will be between 0 and 4095.
4343

44-
.. method:: adc.read_timed(buf, timer)
44+
.. method:: ADC.read_timed(buf, timer)
4545

4646
Read analog values into ``buf`` at a rate set by the ``timer`` object.
4747

docs/library/pyb.Accel.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Constructors
2222
Methods
2323
-------
2424

25-
.. method:: accel.filtered_xyz()
25+
.. method:: Accel.filtered_xyz()
2626

2727
Get a 3-tuple of filtered x, y and z values.
2828

@@ -31,18 +31,18 @@ Methods
3131
with the sample from the current call. Returned values are therefore 4
3232
times the size of what they would be from the raw x(), y() and z() calls.
3333

34-
.. method:: accel.tilt()
34+
.. method:: Accel.tilt()
3535

3636
Get the tilt register.
3737

38-
.. method:: accel.x()
38+
.. method:: Accel.x()
3939

4040
Get the x-axis value.
4141

42-
.. method:: accel.y()
42+
.. method:: Accel.y()
4343

4444
Get the y-axis value.
4545

46-
.. method:: accel.z()
46+
.. method:: Accel.z()
4747

4848
Get the z-axis value.

docs/library/pyb.CAN.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Class Methods
4848
Methods
4949
-------
5050

51-
.. method:: can.init(mode, extframe=False, prescaler=100, \*, sjw=1, bs1=6, bs2=8)
51+
.. method:: CAN.init(mode, extframe=False, prescaler=100, \*, sjw=1, bs1=6, bs2=8)
5252

5353
Initialise the CAN bus with the given parameters:
5454

@@ -80,11 +80,11 @@ Methods
8080

8181
See page 680 of the STM32F405 datasheet for more details.
8282

83-
.. method:: can.deinit()
83+
.. method:: CAN.deinit()
8484

8585
Turn off the CAN bus.
8686

87-
.. method:: can.setfilter(bank, mode, fifo, params, \*, rtr)
87+
.. method:: CAN.setfilter(bank, mode, fifo, params, \*, rtr)
8888

8989
Configure a filter bank:
9090

@@ -126,17 +126,17 @@ Methods
126126
|CAN.MASK32 |1 |
127127
+-----------+----------------------+
128128

129-
.. method:: can.clearfilter(bank)
129+
.. method:: CAN.clearfilter(bank)
130130

131131
Clear and disables a filter bank:
132132

133133
- ``bank`` is the filter bank that is to be cleared.
134134

135-
.. method:: can.any(fifo)
135+
.. method:: CAN.any(fifo)
136136

137137
Return ``True`` if any message waiting on the FIFO, else ``False``.
138138

139-
.. method:: can.recv(fifo, \*, timeout=5000)
139+
.. method:: CAN.recv(fifo, \*, timeout=5000)
140140

141141
Receive data on the bus:
142142

@@ -150,7 +150,7 @@ Methods
150150
- The FMI (Filter Match Index) value.
151151
- An array containing the data.
152152

153-
.. method:: can.send(data, id, \*, timeout=0, rtr=False)
153+
.. method:: CAN.send(data, id, \*, timeout=0, rtr=False)
154154

155155
Send a message on the bus:
156156

@@ -170,7 +170,7 @@ Methods
170170

171171
Return value: ``None``.
172172

173-
.. method:: can.rxcallback(fifo, fun)
173+
.. method:: CAN.rxcallback(fifo, fun)
174174

175175
Register a function to be called when a message is accepted into a empty fifo:
176176

docs/library/pyb.DAC.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,32 +63,32 @@ Constructors
6363
Methods
6464
-------
6565

66-
.. method:: dac.init(bits=8)
66+
.. method:: DAC.init(bits=8)
6767

6868
Reinitialise the DAC. ``bits`` can be 8 or 12.
6969

70-
.. method:: dac.deinit()
70+
.. method:: DAC.deinit()
7171

7272
De-initialise the DAC making its pin available for other uses.
7373

74-
.. method:: dac.noise(freq)
74+
.. method:: DAC.noise(freq)
7575

7676
Generate a pseudo-random noise signal. A new random sample is written
7777
to the DAC output at the given frequency.
7878

79-
.. method:: dac.triangle(freq)
79+
.. method:: DAC.triangle(freq)
8080

8181
Generate a triangle wave. The value on the DAC output changes at
8282
the given frequency, and the frequence of the repeating triangle wave
8383
itself is 2048 times smaller.
8484

85-
.. method:: dac.write(value)
85+
.. method:: DAC.write(value)
8686

8787
Direct access to the DAC output. The minimum value is 0. The maximum
8888
value is 2\*\*``bits``-1, where ``bits`` is set when creating the DAC
8989
object or by using the ``init`` method.
9090

91-
.. method:: dac.write_timed(data, freq, \*, mode=DAC.NORMAL)
91+
.. method:: DAC.write_timed(data, freq, \*, mode=DAC.NORMAL)
9292

9393
Initiates a burst of RAM to DAC using a DMA transfer.
9494
The input data is treated as an array of bytes in 8-bit mode, and

docs/library/pyb.ExtInt.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ Class methods
8080
Methods
8181
-------
8282

83-
.. method:: extint.disable()
83+
.. method:: ExtInt.disable()
8484

8585
Disable the interrupt associated with the ExtInt object.
8686
This could be useful for debouncing.
8787

88-
.. method:: extint.enable()
88+
.. method:: ExtInt.enable()
8989

9090
Enable a disabled interrupt.
9191

92-
.. method:: extint.line()
92+
.. method:: ExtInt.line()
9393

9494
Return the line number that the pin is mapped to.
9595

96-
.. method:: extint.swint()
96+
.. method:: ExtInt.swint()
9797

9898
Trigger the callback from software.
9999

docs/library/pyb.I2C.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ Constructors
8686
Methods
8787
-------
8888

89-
.. method:: i2c.deinit()
89+
.. method:: I2C.deinit()
9090

9191
Turn off the I2C bus.
9292

9393
.. only:: port_pyboard
9494

95-
.. method:: i2c.init(mode, \*, addr=0x12, baudrate=400000, gencall=False)
95+
.. method:: I2C.init(mode, \*, addr=0x12, baudrate=400000, gencall=False)
9696

9797
Initialise the I2C bus with the given parameters:
9898

@@ -101,11 +101,11 @@ Methods
101101
- ``baudrate`` is the SCL clock rate (only sensible for a master)
102102
- ``gencall`` is whether to support general call mode
103103

104-
.. method:: i2c.is_ready(addr)
104+
.. method:: I2C.is_ready(addr)
105105

106106
Check if an I2C device responds to the given address. Only valid when in master mode.
107107

108-
.. method:: i2c.mem_read(data, addr, memaddr, \*, timeout=5000, addr_size=8)
108+
.. method:: I2C.mem_read(data, addr, memaddr, \*, timeout=5000, addr_size=8)
109109

110110
Read from the memory of an I2C device:
111111

@@ -118,7 +118,7 @@ Methods
118118
Returns the read data.
119119
This is only valid in master mode.
120120

121-
.. method:: i2c.mem_write(data, addr, memaddr, \*, timeout=5000, addr_size=8)
121+
.. method:: I2C.mem_write(data, addr, memaddr, \*, timeout=5000, addr_size=8)
122122

123123
Write to the memory of an I2C device:
124124

@@ -131,7 +131,7 @@ Methods
131131
Returns ``None``.
132132
This is only valid in master mode.
133133

134-
.. method:: i2c.recv(recv, addr=0x00, \*, timeout=5000)
134+
.. method:: I2C.recv(recv, addr=0x00, \*, timeout=5000)
135135

136136
Receive data on the bus:
137137

@@ -143,7 +143,7 @@ Methods
143143
Return value: if ``recv`` is an integer then a new buffer of the bytes received,
144144
otherwise the same buffer that was passed in to ``recv``.
145145

146-
.. method:: i2c.send(send, addr=0x00, \*, timeout=5000)
146+
.. method:: I2C.send(send, addr=0x00, \*, timeout=5000)
147147

148148
Send data on the bus:
149149

@@ -153,7 +153,7 @@ Methods
153153

154154
Return value: ``None``.
155155

156-
.. method:: i2c.scan()
156+
.. method:: I2C.scan()
157157

158158
Scan all I2C addresses from 0x01 to 0x7f and return a list of those that respond.
159159
Only valid when in master mode.

docs/library/pyb.LCD.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,48 +49,48 @@ Constructors
4949
Methods
5050
-------
5151

52-
.. method:: lcd.command(instr_data, buf)
52+
.. method:: LCD.command(instr_data, buf)
5353

5454
Send an arbitrary command to the LCD. Pass 0 for ``instr_data`` to send an
5555
instruction, otherwise pass 1 to send data. ``buf`` is a buffer with the
5656
instructions/data to send.
5757

58-
.. method:: lcd.contrast(value)
58+
.. method:: LCD.contrast(value)
5959

6060
Set the contrast of the LCD. Valid values are between 0 and 47.
6161

62-
.. method:: lcd.fill(colour)
62+
.. method:: LCD.fill(colour)
6363

6464
Fill the screen with the given colour (0 or 1 for white or black).
6565

6666
This method writes to the hidden buffer. Use ``show()`` to show the buffer.
6767

68-
.. method:: lcd.get(x, y)
68+
.. method:: LCD.get(x, y)
6969

7070
Get the pixel at the position ``(x, y)``. Returns 0 or 1.
7171

7272
This method reads from the visible buffer.
7373

74-
.. method:: lcd.light(value)
74+
.. method:: LCD.light(value)
7575

7676
Turn the backlight on/off. True or 1 turns it on, False or 0 turns it off.
7777

78-
.. method:: lcd.pixel(x, y, colour)
78+
.. method:: LCD.pixel(x, y, colour)
7979

8080
Set the pixel at ``(x, y)`` to the given colour (0 or 1).
8181

8282
This method writes to the hidden buffer. Use ``show()`` to show the buffer.
8383

84-
.. method:: lcd.show()
84+
.. method:: LCD.show()
8585

8686
Show the hidden buffer on the screen.
8787

88-
.. method:: lcd.text(str, x, y, colour)
88+
.. method:: LCD.text(str, x, y, colour)
8989

9090
Draw the given text to the position ``(x, y)`` using the given colour (0 or 1).
9191

9292
This method writes to the hidden buffer. Use ``show()`` to show the buffer.
9393

94-
.. method:: lcd.write(str)
94+
.. method:: LCD.write(str)
9595

9696
Write the string ``str`` to the screen. It will appear immediately.

docs/library/pyb.LED.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Constructors
2020
Methods
2121
-------
2222

23-
.. method:: led.intensity([value])
23+
.. method:: LED.intensity([value])
2424

2525
Get or set the LED intensity. Intensity ranges between 0 (off) and 255 (full on).
2626
If no argument is given, return the LED intensity.
@@ -32,15 +32,15 @@ Methods
3232
relevant LED is set to a value between 1 and 254. Otherwise the timers are
3333
free for general purpose use.
3434

35-
.. method:: led.off()
35+
.. method:: LED.off()
3636

3737
Turn the LED off.
3838

39-
.. method:: led.on()
39+
.. method:: LED.on()
4040

4141
Turn the LED on, to maximum intensity.
4242

43-
.. method:: led.toggle()
43+
.. method:: LED.toggle()
4444

4545
Toggle the LED between on (maximum intensity) and off. If the LED is at
4646
non-zero intensity then it is considered "on" and toggle will turn it off.

docs/library/pyb.Pin.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Methods
104104

105105
.. only:: port_pyboard
106106

107-
.. method:: pin.init(mode, pull=Pin.PULL_NONE, af=-1)
107+
.. method:: Pin.init(mode, pull=Pin.PULL_NONE, af=-1)
108108

109109
Initialise the pin:
110110

@@ -128,7 +128,7 @@ Methods
128128

129129
Returns: ``None``.
130130

131-
.. method:: pin.value([value])
131+
.. method:: Pin.value([value])
132132

133133
Get or set the digital logic level of the pin:
134134

@@ -139,47 +139,47 @@ Methods
139139

140140
.. only:: port_pyboard
141141

142-
.. method:: pin.__str__()
142+
.. method:: Pin.__str__()
143143

144144
Return a string describing the pin object.
145145

146-
.. method:: pin.af()
146+
.. method:: Pin.af()
147147

148148
Returns the currently configured alternate-function of the pin. The
149149
integer returned will match one of the allowed constants for the af
150150
argument to the init function.
151151

152-
.. method:: pin.gpio()
152+
.. method:: Pin.gpio()
153153

154154
Returns the base address of the GPIO block associated with this pin.
155155

156-
.. method:: pin.mode()
156+
.. method:: Pin.mode()
157157

158158
Returns the currently configured mode of the pin. The integer returned
159159
will match one of the allowed constants for the mode argument to the init
160160
function.
161161

162-
.. method:: pin.name()
162+
.. method:: Pin.name()
163163

164164
Get the pin name.
165165

166-
.. method:: pin.names()
166+
.. method:: Pin.names()
167167

168168
Returns the cpu and board names for this pin.
169169

170-
.. method:: pin.pin()
170+
.. method:: Pin.pin()
171171

172172
Get the pin number.
173173

174-
.. method:: pin.port()
174+
.. method:: Pin.port()
175175

176176
Get the pin port.
177177

178178
.. method:: Pin.af_list()
179179

180180
Returns an array of alternate functions available for this pin.
181181

182-
.. method:: pin.pull()
182+
.. method:: Pin.pull()
183183

184184
Returns the currently configured pull of the pin. The integer returned
185185
will match one of the allowed constants for the pull argument to the init

0 commit comments

Comments
 (0)