MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / probeDS3231Signature

Function probeDS3231Signature

lib/hal/HalGPIO.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78bool probeDS3231Signature() {
79 uint8_t sec = 0;
80 if (!readI2CReg8(I2C_ADDR_DS3231, DS3231_SEC_REG, &sec)) {
81 return false;
82 }
83 const uint8_t tensDigit = (sec >> 4) & 0x07;
84 const uint8_t onesDigit = sec & 0x0F;
85
86 return tensDigit <= 5 && onesDigit <= 9;
87}
88
89bool probeQMI8658Signature() {
90 uint8_t whoami = 0;

Callers 1

runX3ProbePassFunction · 0.85

Calls 1

readI2CReg8Function · 0.85

Tested by

no test coverage detected