Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
[docs] Updating I2C document file (#583)
Browse files Browse the repository at this point in the history
Fixes issue #475.
  • Loading branch information
brianjjones authored and grgustaf committed Dec 31, 2016
1 parent e80110a commit e034d5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/i2c.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ dictionary I2CInit {
interface I2CBus {
// has all the properties of I2CInit as read-only attributes
write(octet device, Buffer data);
read(octet device, unsigned int size, octet registerAddress);
burstRead(octet device, unsigned int size, octet registerAddress);
};
```

Expand All @@ -58,18 +60,19 @@ to device.

### I2CBus.read

`void read(octet device, unsigned int size, octet registerAddress);`
`Buffer read(octet device, unsigned int size, octet registerAddress);`

Reads 'size' bytes of data from the device at the registerAddress. The default
value of registerAdress is 0x00;

### I2CBus.burstRead

`void burstRead(octet device, unsigned int size, octet registerAddress);`
`Buffer burstRead(octet device, unsigned int size, octet registerAddress);`

Reads 'size' bytes of data from the device across multiple addresses starting
at the registerAddress. The default value of registerAdress is 0x00;

Sample Apps
-----------
* [I2C sample](../samples/I2C.js)
* [BMP280 temp](../samples/I2CBMP280.js)

0 comments on commit e034d5c

Please sign in to comment.