#include <aversive/queue.h>
#include <uart.h>
-#include <clock_time.h>
-
-#include <scheduler.h>
-#include <scheduler_stats.h>
#include <rdline.h>
#include <parse.h>
};
/**********************************************************/
-/* Scheduler show */
+/* Callout show */
-/* this structure is filled when cmd_scheduler is parsed successfully */
-struct cmd_scheduler_result {
+/* this structure is filled when cmd_callout is parsed successfully */
+struct cmd_callout_result {
fixed_string_t arg0;
fixed_string_t arg1;
};
-/* function called when cmd_scheduler is parsed successfully */
-static void cmd_scheduler_parsed(void *parsed_result, void *data)
+/* function called when cmd_callout is parsed successfully */
+static void cmd_callout_parsed(void *parsed_result, void *data)
{
(void)parsed_result;
(void)data;
- scheduler_dump_events();
- scheduler_stats_dump();
+ printf_P(PSTR("intr_cm:\n"));
+ callout_dump_stats(&xbeeboard.intr_cm);
+ printf_P(PSTR("mainloop_cm:\n"));
+ callout_dump_stats(&xbeeboard.mainloop_cm);
}
-const char PROGMEM str_scheduler_arg0[] = "scheduler";
-const parse_token_string_t PROGMEM cmd_scheduler_arg0 = TOKEN_STRING_INITIALIZER(struct cmd_scheduler_result, arg0, str_scheduler_arg0);
-const char PROGMEM str_scheduler_arg1[] = "show";
-const parse_token_string_t PROGMEM cmd_scheduler_arg1 = TOKEN_STRING_INITIALIZER(struct cmd_scheduler_result, arg1, str_scheduler_arg1);
+const char PROGMEM str_callout_arg0[] = "callout";
+const parse_token_string_t PROGMEM cmd_callout_arg0 = TOKEN_STRING_INITIALIZER(struct cmd_callout_result, arg0, str_callout_arg0);
+const char PROGMEM str_callout_arg1[] = "show";
+const parse_token_string_t PROGMEM cmd_callout_arg1 = TOKEN_STRING_INITIALIZER(struct cmd_callout_result, arg1, str_callout_arg1);
-const char PROGMEM help_scheduler[] = "Show scheduler events";
-const parse_inst_t PROGMEM cmd_scheduler = {
- .f = cmd_scheduler_parsed, /* function to call */
+const char PROGMEM help_callout[] = "Show callout events";
+const parse_inst_t PROGMEM cmd_callout = {
+ .f = cmd_callout_parsed, /* function to call */
.data = NULL, /* 2nd arg of func */
- .help_str = help_scheduler,
+ .help_str = help_callout,
.tokens = { /* token list, NULL terminated */
- (PGM_P)&cmd_scheduler_arg0,
- (PGM_P)&cmd_scheduler_arg1,
+ (PGM_P)&cmd_callout_arg0,
+ (PGM_P)&cmd_callout_arg1,
NULL,
},
};