55
66---
77
8- ## ** Constructor**
8+ ## Constructor
99
10- ---
1110
1211### I2C.new( id=nil, * params )
1312
@@ -39,16 +38,15 @@ Device-specific
3938
4039---
4140
42- ## ** Instance Methods**
41+ ## Instance Methods
4342
44- ---
4543
4644### read( i2c_adrs_7, read_bytes, * param ) -> String
4745
48- - Reads data of ** ` read_bytes ` ** bytes from the device with the address ** ` i2c_adrs_7 ` ** .
49- - If the device returns NAK in the middle, a String of shorter length than ** ` read_bytes ` ** may be returned.
50- - If data is specified in the ** ` param ` ** , it will be output before the repeated start, and then reading will start.
51- - Output specifications are the same as for ** ` write() ` ** .
46+ - Reads data of ` read_bytes ` bytes from the device with the address ` i2c_adrs_7 ` .
47+ - If the device returns NAK in the middle, a String of shorter length than ` read_bytes ` may be returned.
48+ - If data is specified in the ` param ` , it will be output before the repeated start, and then reading will start.
49+ - Output specifications are the same as for ` write() ` .
5250
5351Example of use:
5452
@@ -75,9 +73,9 @@ I2C bus sequence
7573
7674### write( i2c_adrs_7 , * outputs ) -> Integer
7775
78- - Writes data specified in ** ` outputs ` ** to the device with the address ** ` i2c_adrs_7 ` ** .
76+ - Writes data specified in ` outputs ` to the device with the address ` i2c_adrs_7 ` .
7977- The number of bytes successfully written is returned as the return value.
80- - ** ` outputs ` ** can be specified as an Integer, Array<Integer >, or String.
78+ - ` outputs ` can be specified as an Integer, Array<Integer >, or String.
8179
8280Example of use:
8381
@@ -138,8 +136,8 @@ i2c.send_stop
138136
139137### raw_read( read_bytes, ack_nack = false ) -> String
140138
141- - Reads ** ` read_bytes ` ** bytes from the I2C bus and returns them.
142- - ** ` ack_nack = true ` ** outputs ACK at the last byte reading, and ** ` false ` ** outputs NACK.
139+ - Reads ` read_bytes ` bytes from the I2C bus and returns them.
140+ - ` ack_nack = true ` outputs ACK at the last byte reading, and ` false ` outputs NACK.
143141
144142Example of use:
145143
@@ -151,9 +149,9 @@ str = i2c.raw_read( 20 )
151149
152150### raw_write( * outputs ) -> Integer
153151
154- - Writes data specified in ** ` outputs ` ** to the I2C bus.
152+ - Writes data specified in ` outputs ` to the I2C bus.
155153- The number of bytes successfully written is returned as the return value.
156- - ** ` outputs ` ** can be specified as an Integer, Array<Integer >, or String.
154+ - ` outputs ` can be specified as an Integer, Array<Integer >, or String.
157155
158156Example of use:
159157
0 commit comments