auto-sync
This commit is contained in:
parent
f5ee4bd1d6
commit
a4dc948a2e
|
@ -38,11 +38,11 @@ void chDbgPanic3(const char *msg, const char * file, int line) {
|
|||
* low-level function is used here to reduce stack usage
|
||||
*/
|
||||
palWritePad(LED_ERROR_PORT, LED_ERROR_PIN, 1);
|
||||
turnAllPinsOff();
|
||||
turnAllPinsOff();
|
||||
#if EFI_HD44780_LCD
|
||||
lcdShowFatalMessage((char *) msg);
|
||||
#endif /* EFI_HD44780_LCD */
|
||||
|
||||
|
||||
if (!main_loop_started) {
|
||||
print("fatal %s %s:%d\r\n", msg, file, line);
|
||||
chThdSleepSeconds(1);
|
||||
|
@ -89,5 +89,5 @@ char *getWarninig(void) {
|
|||
|
||||
void initErrorHandling(void) {
|
||||
initLogging(&logger, "error handling");
|
||||
msObjectInit(&warningStream, (uint8_t *)warningBuffer, WARNING_BUFFER_SIZE, 0);
|
||||
msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,9 @@ void HardFaultVector(void) {
|
|||
#endif
|
||||
|
||||
int cfsr = GET_CFSR();
|
||||
if (cfsr & 0x100) {
|
||||
if (cfsr & 0x1) {
|
||||
chDbgPanic3("H IACCVIOL", __FILE__, __LINE__);
|
||||
} else if (cfsr & 0x100) {
|
||||
chDbgPanic3("H IBUSERR", __FILE__, __LINE__);
|
||||
} else if (cfsr & 0x20000) {
|
||||
chDbgPanic3("H INVSTATE", __FILE__, __LINE__);
|
||||
|
|
Loading…
Reference in New Issue