Added the "KEvent" console command. #17

Merged
Joe merged 3 commits from new_SystemK into main 2026-03-01 22:19:58 +00:00
Showing only changes of commit a65c53f4b2 - Show all commits

View file

@ -29,12 +29,14 @@
#include "esp_log.h"
#include "SystemK.h"
uint32_t parse_uint32(const char *str, bool *ok) {
static uint32_t parse_uint32(const char *str, bool *ok)
{
char *end;
errno = 0;
unsigned long val = strtoul(str, &end, 10);
if (errno != 0 || end == str || *end != '\0' || val > UINT32_MAX) {
if (errno != 0 || end == str || *end != '\0' || val > UINT32_MAX)
{
*ok = false;
return 0;
}
@ -48,7 +50,7 @@ static void print_usage(void)
printf(
"Usage:\n"
" KEvent <Event ID> <Event Data>\n"
" (Note that IDs may be SystemK version-dependant.)\n");
" (Note that IDs may be SystemK version-dependent.)\n");
}
static int cmd_KEvent(int argc, char **argv)