@@ -37,16 +37,16 @@ Constructors
3737
3838 Construct and return a new I2C object using the following parameters:
3939
40- - ` id ` identifies the particular I2C peripheral. The default
40+ - * id * identifies a particular I2C peripheral. The default
4141 value of -1 selects a software implementation of I2C which can
4242 work (in most cases) with arbitrary pins for SCL and SDA.
43- If ` id ` is -1 then ` scl ` and ` sda ` must be specified. Other
44- allowed values for ` id ` depend on the particular port/board,
45- and specifying ` scl ` and ` sda ` may or may not be required or
43+ If * id * is -1 then * scl * and * sda * must be specified. Other
44+ allowed values for * id * depend on the particular port/board,
45+ and specifying * scl * and * sda * may or may not be required or
4646 allowed in this case.
47- - ` scl ` should be a pin object specifying the pin to use for SCL.
48- - ` sda ` should be a pin object specifying the pin to use for SDA.
49- - ` freq ` should be an integer which sets the maximum frequency
47+ - * scl * should be a pin object specifying the pin to use for SCL.
48+ - * sda * should be a pin object specifying the pin to use for SDA.
49+ - * freq * should be an integer which sets the maximum frequency
5050 for SCL.
5151
5252General Methods
@@ -56,9 +56,9 @@ General Methods
5656
5757 Initialise the I2C bus with the given arguments:
5858
59- - ` scl ` is a pin object for the SCL line
60- - ` sda ` is a pin object for the SDA line
61- - ` freq ` is the SCL clock rate
59+ - * scl * is a pin object for the SCL line
60+ - * sda * is a pin object for the SDA line
61+ - * freq * is the SCL clock rate
6262
6363.. method :: I2C.deinit()
6464
@@ -93,17 +93,17 @@ control over the bus, otherwise the standard methods (see below) can be used.
9393
9494.. method :: I2C.readinto(buf, nack=True)
9595
96- Reads bytes from the bus and stores them into ` buf ` . The number of bytes
97- read is the length of ` buf ` . An ACK will be sent on the bus after
98- receiving all but the last byte. After the last byte is received, if ` nack `
96+ Reads bytes from the bus and stores them into * buf * . The number of bytes
97+ read is the length of * buf * . An ACK will be sent on the bus after
98+ receiving all but the last byte. After the last byte is received, if * nack *
9999 is true then a NACK will be sent, otherwise an ACK will be sent (and in this
100100 case the slave assumes more bytes are going to be read in a later call).
101101
102102 Availability: ESP8266.
103103
104104.. method :: I2C.write(buf)
105105
106- Write the bytes from ` buf ` to the bus. Checks that an ACK is received
106+ Write the bytes from * buf * to the bus. Checks that an ACK is received
107107 after each byte and stops transmitting the remaining bytes if a NACK is
108108 received. The function returns the number of ACKs that were received.
109109
@@ -117,23 +117,23 @@ operations that target a given slave device.
117117
118118.. method :: I2C.readfrom(addr, nbytes, stop=True)
119119
120- Read ` nbytes ` from the slave specified by ` addr ` .
121- If ` stop ` is true then a STOP condition is generated at the end of the transfer.
120+ Read * nbytes * from the slave specified by * addr * .
121+ If * stop * is true then a STOP condition is generated at the end of the transfer.
122122 Returns a `bytes ` object with the data read.
123123
124124.. method :: I2C.readfrom_into(addr, buf, stop=True)
125125
126- Read into ` buf ` from the slave specified by ` addr ` .
127- The number of bytes read will be the length of ` buf ` .
128- If ` stop ` is true then a STOP condition is generated at the end of the transfer.
126+ Read into * buf * from the slave specified by * addr * .
127+ The number of bytes read will be the length of * buf * .
128+ If * stop * is true then a STOP condition is generated at the end of the transfer.
129129
130- The method returns `None `.
130+ The method returns `` None ` `.
131131
132132.. method :: I2C.writeto(addr, buf, stop=True)
133133
134- Write the bytes from ` buf ` to the slave specified by ` addr ` . If a
135- NACK is received following the write of a byte from ` buf ` then the
136- remaining bytes are not sent. If ` stop ` is true then a STOP condition is
134+ Write the bytes from * buf * to the slave specified by * addr * . If a
135+ NACK is received following the write of a byte from * buf * then the
136+ remaining bytes are not sent. If * stop * is true then a STOP condition is
137137 generated at the end of the transfer, even if a NACK is received.
138138 The function returns the number of ACKs that were received.
139139
@@ -147,26 +147,26 @@ methods are convenience functions to communicate with such devices.
147147
148148.. method :: I2C.readfrom_mem(addr, memaddr, nbytes, \*, addrsize=8)
149149
150- Read ` nbytes ` from the slave specified by ` addr ` starting from the memory
151- address specified by ` memaddr ` .
152- The argument ` addrsize ` specifies the address size in bits.
150+ Read * nbytes * from the slave specified by * addr * starting from the memory
151+ address specified by * memaddr * .
152+ The argument * addrsize * specifies the address size in bits.
153153 Returns a `bytes ` object with the data read.
154154
155155.. method :: I2C.readfrom_mem_into(addr, memaddr, buf, \*, addrsize=8)
156156
157- Read into ` buf ` from the slave specified by ` addr ` starting from the
158- memory address specified by ` memaddr ` . The number of bytes read is the
159- length of ` buf ` .
160- The argument ` addrsize ` specifies the address size in bits (on ESP8266
157+ Read into * buf * from the slave specified by * addr * starting from the
158+ memory address specified by * memaddr * . The number of bytes read is the
159+ length of * buf * .
160+ The argument * addrsize * specifies the address size in bits (on ESP8266
161161 this argument is not recognised and the address size is always 8 bits).
162162
163- The method returns `None `.
163+ The method returns `` None ` `.
164164
165165.. method :: I2C.writeto_mem(addr, memaddr, buf, \*, addrsize=8)
166166
167- Write ` buf ` to the slave specified by ` addr ` starting from the
168- memory address specified by ` memaddr ` .
169- The argument ` addrsize ` specifies the address size in bits (on ESP8266
167+ Write * buf * to the slave specified by * addr * starting from the
168+ memory address specified by * memaddr * .
169+ The argument * addrsize * specifies the address size in bits (on ESP8266
170170 this argument is not recognised and the address size is always 8 bits).
171171
172- The method returns `None `.
172+ The method returns `` None ` `.
0 commit comments