@@ -62,7 +62,7 @@ General Methods
6262
6363.. only :: port_wipy
6464
65- .. method :: i2c .init(mode, \*, baudrate=100000, pins=(SDA, SCL))
65+ .. method :: I2C .init(mode, \*, baudrate=100000, pins=(SDA, SCL))
6666
6767 Initialise the I2C bus with the given parameters:
6868
@@ -72,21 +72,21 @@ General Methods
7272
7373.. only :: port_esp8266
7474
75- .. method :: i2c .init(scl, sda, \*, freq=400000)
75+ .. method :: I2C .init(scl, sda, \*, freq=400000)
7676
7777 Initialise the I2C bus with the given arguments:
7878
7979 - `scl ` is a pin object for the SCL line
8080 - `sda ` is a pin object for the SDA line
8181 - `freq ` is the SCL clock rate
8282
83- .. method :: i2c .deinit()
83+ .. method :: I2C .deinit()
8484
8585 Turn off the I2C bus.
8686
8787 Availability: WiPy.
8888
89- .. method :: i2c .scan()
89+ .. method :: I2C .scan()
9090
9191 Scan all I2C addresses between 0x08 and 0x77 inclusive and return a list of
9292 those that respond. A device responds if it pulls the SDA line low after
@@ -101,19 +101,19 @@ The following methods implement the primitive I2C master bus operations and can
101101be combined to make any I2C transaction. They are provided if you need more
102102control over the bus, otherwise the standard methods (see below) can be used.
103103
104- .. method :: i2c .start()
104+ .. method :: I2C .start()
105105
106106 Send a start bit on the bus (SDA transitions to low while SCL is high).
107107
108108 Availability: ESP8266.
109109
110- .. method :: i2c .stop()
110+ .. method :: I2C .stop()
111111
112112 Send a stop bit on the bus (SDA transitions to high while SCL is high).
113113
114114 Availability: ESP8266.
115115
116- .. method :: i2c .readinto(buf)
116+ .. method :: I2C .readinto(buf)
117117
118118 Reads bytes from the bus and stores them into `buf `. The number of bytes
119119 read is the length of `buf `. An ACK will be sent on the bus after
@@ -122,7 +122,7 @@ control over the bus, otherwise the standard methods (see below) can be used.
122122
123123 Availability: ESP8266.
124124
125- .. method :: i2c .write(buf)
125+ .. method :: I2C .write(buf)
126126
127127 Write all the bytes from `buf ` to the bus. Checks that an ACK is received
128128 after each byte and raises an OSError if not.
@@ -135,20 +135,20 @@ Standard bus operations
135135The following methods implement the standard I2C master read and write
136136operations that target a given slave device.
137137
138- .. method :: i2c .readfrom(addr, nbytes)
138+ .. method :: I2C .readfrom(addr, nbytes)
139139
140140 Read `nbytes ` from the slave specified by `addr `.
141141 Returns a `bytes ` object with the data read.
142142
143- .. method :: i2c .readfrom_into(addr, buf)
143+ .. method :: I2C .readfrom_into(addr, buf)
144144
145145 Read into `buf ` from the slave specified by `addr `.
146146 The number of bytes read will be the length of `buf `.
147147
148148 On WiPy the return value is the number of bytes read. Otherwise the
149149 return value is `None `.
150150
151- .. method :: i2c .writeto(addr, buf, \*, stop=True)
151+ .. method :: I2C .writeto(addr, buf, \*, stop=True)
152152
153153 Write the bytes from `buf ` to the slave specified by `addr `.
154154
@@ -167,15 +167,15 @@ from and written to. In this case there are two addresses associated with an
167167I2C transaction: the slave address and the memory address. The following
168168methods are convenience functions to communicate with such devices.
169169
170- .. method :: i2c .readfrom_mem(addr, memaddr, nbytes, \*, addrsize=8)
170+ .. method :: I2C .readfrom_mem(addr, memaddr, nbytes, \*, addrsize=8)
171171
172172 Read `nbytes ` from the slave specified by `addr ` starting from the memory
173173 address specified by `memaddr `.
174174 The argument `addrsize ` specifies the address size in bits (on ESP8266
175175 this argument is not recognised and the address size is always 8 bits).
176176 Returns a `bytes ` object with the data read.
177177
178- .. method :: i2c .readfrom_mem_into(addr, memaddr, buf, \*, addrsize=8)
178+ .. method :: I2C .readfrom_mem_into(addr, memaddr, buf, \*, addrsize=8)
179179
180180 Read into `buf ` from the slave specified by `addr ` starting from the
181181 memory address specified by `memaddr `. The number of bytes read is the
@@ -186,7 +186,7 @@ methods are convenience functions to communicate with such devices.
186186 On WiPy the return value is the number of bytes read. Otherwise the
187187 return value is `None `.
188188
189- .. method :: i2c .writeto_mem(addr, memaddr, buf, \*, addrsize=8)
189+ .. method :: I2C .writeto_mem(addr, memaddr, buf, \*, addrsize=8)
190190
191191 Write `buf ` to the slave specified by `addr ` starting from the
192192 memory address specified by `memaddr `.
0 commit comments