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

[I2C] Adding the doc file #209

Merged
merged 1 commit into from
Sep 24, 2016
Merged

[I2C] Adding the doc file #209

merged 1 commit into from
Sep 24, 2016

Conversation

brianjjones
Copy link
Contributor

Adding the documentation for the I2C API

unsigned long size,
optional octet register,
optional repetitions = 1);
write(octet device, (USVString or sequence<octet>) data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies since this is nice, but the intent of these docs is to exactly match the actual existing functionality available today. So if I'm correct in assuming this is the goal rather than the present state, please save a copy of this somewhere but remove the things that aren't actually implemented.

I don't know what a USVString is, but if we're just accepting a Jerry string I'd just call this 'string' and probably for sequence it should be Buffer, if that's indeed supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, ill update it to only include what currently works

optional repetitions = 1);
write(octet device, (USVString or sequence<octet>) data);
writeBit(octet device, boolean data);
void abort(); // abort all current read / write operations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really abort the operation? or this is just like aborting the promises like the Soletta api did? Because all your api is synchrounous

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't implemented either yet so I took them out until I know what they will do. Or if they will even do anything, which likely they wont since as you said its synchronous.


### I2CBus.abort

`void abort();`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


dictionary I2CInit {
octet bus;
I2CBusSpeed speed;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be 4-space indented like above


[NoInterfaceObject]
interface I2CBus {
// has all the properties of I2CInit as read-only attributes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this too

[NoInterfaceObject]
interface I2CBus {
// has all the properties of I2CInit as read-only attributes
write(octet device, (string or sequence<octet>) data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From IRC, sounds like data is just Buffer, not a choice of types.

Adding the documentation for the I2C API
@grgustaf grgustaf merged commit c21b9fe into intel:master Sep 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants