Skip to content

Commit d91a198

Browse files
committed
docs/library/pyb.CAN: Update markup to use latest doc conventions.
1 parent 0db49c3 commit d91a198

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

docs/library/pyb.CAN.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Constructors
2424

2525
.. class:: pyb.CAN(bus, ...)
2626

27-
Construct a CAN object on the given bus. ``bus`` can be 1-2, or 'YA' or 'YB'.
27+
Construct a CAN object on the given bus. *bus* can be 1-2, or ``'YA'`` or ``'YB'``.
2828
With no additional parameters, the CAN object is created but not
2929
initialised (it has the settings from the last initialisation of
3030
the bus, if any). If extra arguments are given, the bus is initialised.
31-
See ``init`` for parameters of initialisation.
31+
See :meth:`CAN.init` for parameters of initialisation.
3232

3333
The physical pins of the CAN busses are:
3434

@@ -42,7 +42,7 @@ Class Methods
4242
Reset and disable all filter banks and assign how many banks should be available for CAN(1).
4343

4444
STM32F405 has 28 filter banks that are shared between the two available CAN bus controllers.
45-
This function configures how many filter banks should be assigned to each. ``nr`` is the number of banks
45+
This function configures how many filter banks should be assigned to each. *nr* is the number of banks
4646
that will be assigned to CAN(1), the rest of the 28 are assigned to CAN(2).
4747
At boot, 14 banks are assigned to each controller.
4848

@@ -53,16 +53,16 @@ Methods
5353

5454
Initialise the CAN bus with the given parameters:
5555

56-
- ``mode`` is one of: NORMAL, LOOPBACK, SILENT, SILENT_LOOPBACK
57-
- if ``extframe`` is True then the bus uses extended identifiers in the frames
56+
- *mode* is one of: NORMAL, LOOPBACK, SILENT, SILENT_LOOPBACK
57+
- if *extframe* is True then the bus uses extended identifiers in the frames
5858
(29 bits); otherwise it uses standard 11 bit identifiers
59-
- ``prescaler`` is used to set the duration of 1 time quanta; the time quanta
59+
- *prescaler* is used to set the duration of 1 time quanta; the time quanta
6060
will be the input clock (PCLK1, see :meth:`pyb.freq()`) divided by the prescaler
61-
- ``sjw`` is the resynchronisation jump width in units of the time quanta;
61+
- *sjw* is the resynchronisation jump width in units of the time quanta;
6262
it can be 1, 2, 3, 4
63-
- ``bs1`` defines the location of the sample point in units of the time quanta;
63+
- *bs1* defines the location of the sample point in units of the time quanta;
6464
it can be between 1 and 1024 inclusive
65-
- ``bs2`` defines the location of the transmit point in units of the time quanta;
65+
- *bs2* defines the location of the transmit point in units of the time quanta;
6666
it can be between 1 and 16 inclusive
6767

6868
The time quanta tq is the basic unit of time for the CAN bus. tq is the CAN
@@ -89,13 +89,13 @@ Methods
8989

9090
Configure a filter bank:
9191

92-
- ``bank`` is the filter bank that is to be configured.
93-
- ``mode`` is the mode the filter should operate in.
94-
- ``fifo`` is which fifo (0 or 1) a message should be stored in, if it is accepted by this filter.
95-
- ``params`` is an array of values the defines the filter. The contents of the array depends on the ``mode`` argument.
92+
- *bank* is the filter bank that is to be configured.
93+
- *mode* is the mode the filter should operate in.
94+
- *fifo* is which fifo (0 or 1) a message should be stored in, if it is accepted by this filter.
95+
- *params* is an array of values the defines the filter. The contents of the array depends on the *mode* argument.
9696

9797
+-----------+---------------------------------------------------------+
98-
|``mode`` |contents of parameter array |
98+
|*mode* |contents of *params* array |
9999
+===========+=========================================================+
100100
|CAN.LIST16 |Four 16 bit ids that will be accepted |
101101
+-----------+---------------------------------------------------------+
@@ -110,13 +110,13 @@ Methods
110110
|CAN.MASK32 |As with CAN.MASK16 but with only one 32 bit id/mask pair.|
111111
+-----------+---------------------------------------------------------+
112112

113-
- ``rtr`` is an array of booleans that states if a filter should accept a
113+
- *rtr* is an array of booleans that states if a filter should accept a
114114
remote transmission request message. If this argument is not given
115-
then it defaults to False for all entries. The length of the array
116-
depends on the ``mode`` argument.
115+
then it defaults to ``False`` for all entries. The length of the array
116+
depends on the *mode* argument.
117117

118118
+-----------+----------------------+
119-
|``mode`` |length of rtr array |
119+
|*mode* |length of *rtr* array |
120120
+===========+======================+
121121
|CAN.LIST16 |4 |
122122
+-----------+----------------------+
@@ -131,7 +131,7 @@ Methods
131131

132132
Clear and disables a filter bank:
133133

134-
- ``bank`` is the filter bank that is to be cleared.
134+
- *bank* is the filter bank that is to be cleared.
135135

136136
.. method:: CAN.any(fifo)
137137

@@ -141,8 +141,8 @@ Methods
141141

142142
Receive data on the bus:
143143

144-
- ``fifo`` is an integer, which is the FIFO to receive on
145-
- ``timeout`` is the timeout in milliseconds to wait for the receive.
144+
- *fifo* is an integer, which is the FIFO to receive on
145+
- *timeout* is the timeout in milliseconds to wait for the receive.
146146

147147
Return value: A tuple containing four values.
148148

@@ -155,13 +155,13 @@ Methods
155155

156156
Send a message on the bus:
157157

158-
- ``data`` is the data to send (an integer to send, or a buffer object).
159-
- ``id`` is the id of the message to be sent.
160-
- ``timeout`` is the timeout in milliseconds to wait for the send.
161-
- ``rtr`` is a boolean that specifies if the message shall be sent as
162-
a remote transmission request. If ``rtr`` is True then only the length
163-
of ``data`` is used to fill in the DLC slot of the frame; the actual
164-
bytes in ``data`` are unused.
158+
- *data* is the data to send (an integer to send, or a buffer object).
159+
- *id* is the id of the message to be sent.
160+
- *timeout* is the timeout in milliseconds to wait for the send.
161+
- *rtr* is a boolean that specifies if the message shall be sent as
162+
a remote transmission request. If *rtr* is True then only the length
163+
of *data* is used to fill in the DLC slot of the frame; the actual
164+
bytes in *data* are unused.
165165

166166
If timeout is 0 the message is placed in a buffer in one of three hardware
167167
buffers and the method returns immediately. If all three buffers are in use
@@ -175,8 +175,8 @@ Methods
175175

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

178-
- ``fifo`` is the receiving fifo.
179-
- ``fun`` is the function to be called when the fifo becomes non empty.
178+
- *fifo* is the receiving fifo.
179+
- *fun* is the function to be called when the fifo becomes non empty.
180180

181181
The callback function takes two arguments the first is the can object it self the second is
182182
a integer that indicates the reason for the callback.

0 commit comments

Comments
 (0)