diff options
Diffstat (limited to 'os/rt/include/chschd.h')
-rw-r--r-- | os/rt/include/chschd.h | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h index 8a7a59aae..f2deb3b92 100644 --- a/os/rt/include/chschd.h +++ b/os/rt/include/chschd.h @@ -285,6 +285,36 @@ struct ch_ready_list { };
/**
+ * @brief System debug data structure.
+ */
+struct ch_system_debug {
+ /**
+ * @brief Pointer to the panic message.
+ * @details This pointer is meant to be accessed through the debugger, it is
+ * written once and then the system is halted.
+ * @note Accesses to this pointer must never be optimized out so the
+ * field itself is declared volatile.
+ */
+ const char * volatile panic_msg;
+#if CH_DBG_SYSTEM_STATE_CHECK || defined(__DOXYGEN__)
+ /**
+ * @brief ISR nesting level.
+ */
+ cnt_t isr_cnt;
+ /**
+ * @brief Lock nesting level.
+ */
+ cnt_t lock_cnt;
+#endif
+#if CH_DBG_ENABLE_TRACE || defined(__DOXYGEN__)
+ /**
+ * @brief Public trace buffer.
+ */
+ ch_trace_buffer_t trace_buffer;
+#endif
+};
+
+/**
* @brief System data structure.
* @note This structure contain all the data areas used by the OS except
* stacks.
@@ -298,11 +328,15 @@ struct ch_system { * @brief Virtual timers delta list header.
*/
virtual_timers_list_t vtlist;
+ /**
+ * @brief System debug.
+ */
+ system_debug_t dbg;
#if CH_CFG_USE_TM || defined(__DOXYGEN__)
/**
- * @brief Measurement calibration value.
+ * @brief Time measurement calibration data.
*/
- rtcnt_t measurement_offset;
+ tm_calibration_t tm;
#endif
#if CH_DBG_STATISTICS || defined(__DOXYGEN__)
/**
@@ -310,32 +344,6 @@ struct ch_system { */
kernel_stats_t kernel_stats;
#endif
-#if CH_DBG_ENABLED || defined(__DOXYGEN__)
- /**
- * @brief Pointer to the panic message.
- * @details This pointer is meant to be accessed through the debugger, it is
- * written once and then the system is halted.
- * @note Accesses to this pointer must never be optimized out so the
- * field itself is declared volatile.
- */
- const char * volatile dbg_panic_msg;
-#endif
-#if CH_DBG_SYSTEM_STATE_CHECK || defined(__DOXYGEN__)
- /**
- * @brief ISR nesting level.
- */
- cnt_t dbg_isr_cnt;
- /**
- * @brief Lock nesting level.
- */
- cnt_t dbg_lock_cnt;
-#endif
-#if CH_DBG_ENABLE_TRACE || defined(__DOXYGEN__)
- /**
- * @brief Public trace buffer.
- */
- ch_trace_buffer_t dbg_trace_buffer;
-#endif
};
/*===========================================================================*/
|