Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset() API uses 0 for multiple purposes #79

Open
nomis opened this issue Sep 29, 2019 · 0 comments
Open

reset() API uses 0 for multiple purposes #79

nomis opened this issue Sep 29, 2019 · 0 comments

Comments

@nomis
Copy link

nomis commented Sep 29, 2019

    // Perform a 1-Wire reset cycle. Returns 1 if a device responds
    // with a presence pulse.  Returns 0 if there is no device or the
    // bus is shorted or otherwise held low for more than 250uS
    uint8_t reset(void);

Having two different meanings for 0 is not helpful and requires modifying the code to find out which of the two outcomes has occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant