Closed DavidArmstrong closed 3 years ago
While doing testing, I noticed that it was possible on some MCUs to generate a warning on this source line:
serialNum = (SCL3300_DATA << 16) | serialNum;
It doesn't always happen, as other MCUs, like SAMD chips, handle the bit shift just fine. The solution is to force a conversion as follows:
serialNum = ((unsigned long)SCL3300_DATA << 16) | serialNum;
While doing testing, I noticed that it was possible on some MCUs to generate a warning on this source line:
serialNum = (SCL3300_DATA << 16) | serialNum;
It doesn't always happen, as other MCUs, like SAMD chips, handle the bit shift just fine. The solution is to force a conversion as follows:
serialNum = ((unsigned long)SCL3300_DATA << 16) | serialNum;