auto-sync

This commit is contained in:
rusEfi 2014-11-08 12:04:00 -06:00
parent f5ee4bd1d6
commit a4dc948a2e
2 changed files with 6 additions and 4 deletions

View File

@ -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);
}

View File

@ -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__);