58 lines
1.9 KiB
C
58 lines
1.9 KiB
C
/**
|
|
* @file debugger.h
|
|
*
|
|
* @brief Header file for debugging functions and status in the ChainLube application.
|
|
*
|
|
* This file declares functions and status definitions for debugging purposes in the ChainLube project.
|
|
* It includes functions to print system information, WiFi information, format EEPROM data,
|
|
* handle debug messages, and manage the status of different debug ports.
|
|
*
|
|
* @author Marcel Peterkau
|
|
* @date 09.01.2024
|
|
*/
|
|
|
|
#ifndef _DEBUGGER_H_
|
|
#define _DEBUGGER_H_
|
|
|
|
#include <Arduino.h>
|
|
#include "webui.h"
|
|
const char PROGMEM helpCmd[] = "sysinfo - System Info\n"
|
|
"netinfo - WiFi Info\n"
|
|
"formatPDS - Format Persistence EEPROM Data\n"
|
|
"formatCFG - Format Configuration EEPROM Data\n"
|
|
"checkEE - Check EEPROM with checksum\n"
|
|
"dumpEE1k - dump the first 1kb of EEPROM to Serial\n"
|
|
"dumpEE - dump the whole EPPROM to Serial\n"
|
|
"resetPageEE - Reset the PersistenceData Page\n"
|
|
"dumpCFG - print Config struct\n"
|
|
"dumpPDS - print PersistanceStruct\n"
|
|
"saveEE - save EE-Data\n"
|
|
"showdtc - Show all DTCs\n"
|
|
"dumpGlobals - print globals\n";
|
|
|
|
typedef enum DebugStatus_e
|
|
{
|
|
disabled,
|
|
enabled
|
|
} DebugStatus_t;
|
|
|
|
typedef enum DebugPorts_e
|
|
{
|
|
dbg_Serial,
|
|
dbg_Webui,
|
|
dbg_cntElements
|
|
} DebugPorts_t;
|
|
|
|
const char sDebugPorts[dbg_cntElements][7] = {
|
|
"Serial",
|
|
"WebUI"};
|
|
|
|
extern DebugStatus_t DebuggerStatus[dbg_cntElements];
|
|
|
|
void initDebugger();
|
|
void pushCANDebug(uint32_t id, uint8_t dlc, uint8_t *data);
|
|
void Debug_pushMessage(const char *format, ...);
|
|
void SetDebugportStatus(DebugPorts_t port, DebugStatus_t status);
|
|
void Debug_Process();
|
|
|
|
#endif |