Merge branch 'hardware-unavailable' of git://github.com/microbit-sam/microbit-dal into dal-integration

master
Joe Finney 2018-09-05 10:31:13 +01:00
commit 14f4c0e64e
3 changed files with 4 additions and 3 deletions

View File

@ -84,6 +84,7 @@ enum PanicCode{
MICROBIT_NULL_DEREFERENCE = 40,
// A requested hardware peripheral could not be found,
MICROBIT_HARDWARE_UNAVAILABLE = 50,
MICROBIT_HARDWARE_UNAVAILABLE_ACC = 50,
MICROBIT_HARDWARE_UNAVAILABLE_MAG = 51,
};
#endif

View File

@ -112,7 +112,7 @@ MicroBitAccelerometer& MicroBitAccelerometer::autoDetect(MicroBitI2C &i2c)
else
{
microbit_panic(MICROBIT_HARDWARE_UNAVAILABLE);
microbit_panic(MICROBIT_HARDWARE_UNAVAILABLE_ACC);
}
}

View File

@ -134,7 +134,7 @@ MicroBitCompass& MicroBitCompass::autoDetect(MicroBitI2C &i2c)
else
{
microbit_panic(MICROBIT_HARDWARE_UNAVAILABLE);
microbit_panic(MICROBIT_HARDWARE_UNAVAILABLE_MAG);
}
}