Implement Panic() stub.

This commit is contained in:
Michael Scire
2018-02-27 19:43:07 -08:00
parent fba3d1c2d9
commit 66b3b3a706
6 changed files with 59 additions and 9 deletions

View File

@@ -14,10 +14,23 @@ static inline uintptr_t get_timers_base(void) {
#define TIMERUS_CNTR_1US_0 (*((volatile uint32_t *)(TIMERS_BASE + 0x10)))
typedef struct {
uint32_t CONFIG;
uint32_t STATUS;
uint32_t COMMAND;
uint32_t PATTERN;
} watchdog_timers_t;
#define GET_WDT(n) ((volatile watchdog_timers_t *)(TIMERS_BASE + 0x100 + 0x20 * n))
#define WDT_REBOOT_PATTERN 0xC45A
#define GET_WDT_REBOOT_CFG_REG(n) (*((volatile uint32_t *)(TIMERS_BASE + 0x60 + 0x8*n)))
void wait(uint32_t microseconds);
static inline uint32_t get_time(void) {
return TIMERUS_CNTR_1US_0;
}
__attribute__ ((noreturn)) void watchdog_reboot(void);
#endif