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

onewire: Implement scan for multiple devices #139

Merged
merged 6 commits into from
Sep 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a comment to reference the bus scanning application note
  • Loading branch information
jbglaw committed Sep 27, 2022
commit 52b27151fa799862a2ff6b55bcda0c44428313fc
8 changes: 8 additions & 0 deletions src/hydrabus/hydrabus_mode_onewire.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ static uint8_t onewire_crc8(uint8_t value, struct onewire_scan_state *state)
return state->crc8;
}

/* onewire_search() is based on the official bus scan example published by
* Dallas and now hosted by Maxim. It can be found at
* https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/187.html
*
* Changes have been made: Variables no longer use camel case and search state
* was move from a bunch of global variables to a struct. But the overall
* design remains unchanged.
*/
static bool onewire_search(t_hydra_console *con, struct onewire_scan_state *state, enum onewire_scan_mode mode)
jbglaw marked this conversation as resolved.
Show resolved Hide resolved
{
int id_bit_number;
Expand Down