Further work on safety controller
This commit is contained in:
		@@ -32,6 +32,8 @@ enum safety_flag {
 | 
			
		||||
	ERR_FLAG_AMON_VREF = (1<<6),
 | 
			
		||||
	ERR_FLAG_AMON_UC_TEMP = (1<<7),
 | 
			
		||||
	ERR_FLAG_STACK = (1<<8),
 | 
			
		||||
	ERR_FLAG_SAFETY_ADC = (1<<9),
 | 
			
		||||
	ERR_FLAG_SYSTICK = (1<<10),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum timing_monitor {
 | 
			
		||||
@@ -51,12 +53,16 @@ enum analog_value_monitor {
 | 
			
		||||
 */
 | 
			
		||||
#define WATCHDOG_MAGIC_KEY 0x1a2c56F4
 | 
			
		||||
 | 
			
		||||
#ifdef DEBUGBUILD
 | 
			
		||||
/**
 | 
			
		||||
 * @brief If one, the watchdog is halted whenever the core is halted by the debugger.
 | 
			
		||||
 *
 | 
			
		||||
 * This is only applicable in a debug build. In release mode, the watchdog stays always enabled
 | 
			
		||||
 */
 | 
			
		||||
#define WATCHDOG_HALT_DEBUG (1)
 | 
			
		||||
#else
 | 
			
		||||
#define WATCHDOG_HALT_DEBUG (0)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define WATCHDOG_PRESCALER 4
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,9 @@ int safety_controller_enable_timing_mon(enum timing_monitor monitor, bool enable
 | 
			
		||||
 | 
			
		||||
enum analog_monitor_status safety_controller_get_analog_mon_value(enum analog_value_monitor monitor, float *value);
 | 
			
		||||
 | 
			
		||||
bool safety_controller_get_flag(enum safety_flag);
 | 
			
		||||
int safety_controller_get_flag(enum safety_flag flag, bool *status, bool try_ack);
 | 
			
		||||
 | 
			
		||||
int safety_controller_ack_flag(enum safety_flag flag);
 | 
			
		||||
 | 
			
		||||
#endif /* __SAFETY_CONTROLLER_H__ */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user