MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / setHysteresis

Method setHysteresis

libraries/AS5600/AS5600.cpp:216–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216bool AS5600::setHysteresis(uint8_t hysteresis)
217{
218 if (hysteresis > 3) return false;
219 uint8_t value = readReg(AS5600_CONF + 1);
220 value &= ~AS5600_CONF_HYSTERESIS;
221 value |= (hysteresis << 2);
222 writeReg(AS5600_CONF + 1, value);
223 return true;
224}
225
226uint8_t AS5600::getHysteresis()
227{

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64