2022-07-03 05:25:24 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if HAL_USE_CAN
|
|
|
|
CANDriver* detectCanDevice(brain_pin_e pinRx, brain_pin_e pinTx);
|
2024-03-28 18:20:40 -07:00
|
|
|
inline bool isValidCanTxPin(brain_pin_e) { return true; }
|
|
|
|
inline bool isValidCanRxPin(brain_pin_e) { return true; }
|
2024-03-15 17:30:09 -07:00
|
|
|
void canHwInfo(CANDriver*);
|
2022-07-03 05:25:24 -07:00
|
|
|
#endif // HAL_USE_CAN
|
2022-09-23 05:47:50 -07:00
|
|
|
|
2024-03-15 17:30:09 -07:00
|
|
|
bool allowFlashWhileRunning() ;
|
|
|
|
void causeHardFault() ;
|
2023-11-29 05:34:34 -08:00
|
|
|
|
2023-12-13 04:41:56 -08:00
|
|
|
|
|
|
|
// Reset Cause
|
|
|
|
typedef enum {
|
|
|
|
Reset_Cause_Unknown = 0,
|
|
|
|
Reset_Cause_IWatchdog, // Independent hardware watchdog (we use it)
|
|
|
|
Reset_Cause_WWatchdog, // Window watchdog
|
|
|
|
Reset_Cause_Soft_Reset, // NVIC_SystemReset or by debugger
|
|
|
|
Reset_Cause_NRST_Pin, // Reset from NRST pin
|
|
|
|
Reset_Cause_Illegal_Mode, // Reset after illegal Stop, Standby or Shutdown mode entry
|
|
|
|
Reset_Cause_BOR, // BOR reset
|
|
|
|
Reset_Cause_Firewall, // Firewall reset
|
|
|
|
Reset_Cause_Option_Byte, // Option byte load reset
|
|
|
|
} Reset_Cause_t;
|
|
|
|
|
2024-03-15 17:30:09 -07:00
|
|
|
Reset_Cause_t getMCUResetCause() ;
|
2023-12-12 14:03:50 -08:00
|
|
|
|
2024-03-15 17:30:09 -07:00
|
|
|
const char *getMCUResetCause(Reset_Cause_t);
|
2023-12-12 14:03:50 -08:00
|
|
|
|
2023-11-29 05:34:34 -08:00
|
|
|
#include "sim_watchdog.h"
|