clearStrongPullup() is supposed to keep the current config settings and just make sure that the SPU bit is cleared. However, the bitclear is not correct and erases bits that it should not.
This usually results in all config settings getting cleared, and since this function executes within the 1-wire reset function, it becomes impossible to communicate with chips that require overdrive speed.
Currently the function writes the new config as:
void OneWire::clearStrongPullup()
{
writeConfig(readConfig() & !DS2482_CONFIG_SPU);
}
Function should instead be as follows:
void OneWire::clearStrongPullup()
{
writeConfig(readConfig() &~(1 << 2));
}
clearStrongPullup() is supposed to keep the current config settings and just make sure that the SPU bit is cleared. However, the bitclear is not correct and erases bits that it should not.
This usually results in all config settings getting cleared, and since this function executes within the 1-wire reset function, it becomes impossible to communicate with chips that require overdrive speed.
Currently the function writes the new config as:
Function should instead be as follows: