use shutdown from startup.s

pull/25/head
Pavol Rusnak 5 years ago
parent 44bb5864d4
commit c7af39bf8d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -22,15 +22,11 @@
#include "rng.h"
#include "layout.h"
#include "oled.h"
#include "util.h"
#include "firmware/usb.h"
uint8_t HW_ENTROPY_DATA[HW_ENTROPY_LEN];
static void __attribute__((noreturn)) shutdown(void)
{
for (;;);
}
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line_num, const char *func) {
const BITMAP *icon = &bmp_icon_error;
char line[128] = {0};
@ -63,13 +59,11 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
oledRefresh();
shutdown();
for (;;);
}
void __attribute__((noreturn)) error_shutdown(const char *line1, const char *line2, const char *line3, const char *line4) {
layoutDialog(&bmp_icon_error, NULL, NULL, NULL, line1, line2, line3, line4, "Please unplug", "the device.");
shutdown();
for (;;);
}
#ifndef NDEBUG

@ -44,6 +44,7 @@ void data2hex(const void *data, uint32_t len, char *str);
// read protobuf integer and advance pointer
uint32_t readprotobufint(const uint8_t **ptr);
// defined in startup.s (or setup.c for emulator)
extern void __attribute__((noreturn)) shutdown(void);
#if !EMULATOR

Loading…
Cancel
Save