2025-06-02 09:02:19 +02:00

52 lines
1.1 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"
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];
enum LogLevel
{
LOG_INFO,
LOG_WARN,
LOG_ERROR
};
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