debugVarTool/debug_tools.h
Razvalyaev e4fcfd11d7 Доработана функции для считывания переменных
Добавлены бета-функции для считывания переменны по адресу

+фиксы багов

future:
- в селекторе сделать две таблички для всех переменных и для выборанных
- по кнопке переносить переменные из всех в выбранные
- переменные из выбранных и добавлять в основную табличку
- сделать отдельный класс для таблички - который будет принимать спиоск переменных для отображения
2025-07-11 16:46:51 +03:00

97 lines
2.1 KiB
C

#ifndef DEBUG_TOOLS
#define DEBUG_TOOLS
#include "IQmathLib.h"
#include "DSP281x_Device.h"
typedef enum
{
pt_unknown, // unknown
pt_int8, // signed char
pt_int16, // int
pt_int32, // long
pt_int64, // long
pt_uint8, // unsigned char
pt_uint16, // unsigned int
pt_uint32, // unsigned long
pt_uint64, // unsigned long
pt_float, // float
pt_struct, // struct
pt_union, // struct
// pt_ptr_int8, // signed char*
// pt_ptr_int16, // int*
// pt_ptr_int32, // long*
// pt_ptr_uint8, // unsigned char*
// pt_ptr_uint16, // unsigned int*
// pt_ptr_uint32, // unsigned long*
// pt_arr_int8, // signed char[]
// pt_arr_int16, // int[]
// pt_arr_int32, // long[]
// pt_arr_uint8, // unsigned char[]
// pt_arr_uint16, // unsigned int[]
// pt_arr_uint32, // unsigned long[]
}DebugVarPtrType_t;
typedef enum
{
t_iq_none,
t_iq,
t_iq1,
t_iq2,
t_iq3,
t_iq4,
t_iq5,
t_iq6,
t_iq7,
t_iq8,
t_iq9,
t_iq10,
t_iq11,
t_iq12,
t_iq13,
t_iq14,
t_iq15,
t_iq16,
t_iq17,
t_iq18,
t_iq19,
t_iq20,
t_iq21,
t_iq22,
t_iq23,
t_iq24,
t_iq25,
t_iq26,
t_iq27,
t_iq28,
t_iq29,
t_iq30
}DebugVarIQType_t;
typedef struct
{
char* Ptr;
DebugVarPtrType_t ptr_type;
DebugVarIQType_t iq_type;
DebugVarIQType_t return_type;
char name[11]; // 10 ñèìâîëîâ + '\0'
}DebugVar_t;
typedef struct {
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
} DateTimeHex;
extern int DebugVar_Qnt;
extern DebugVar_t dbg_vars[];
int Debug_LowLevel_ReadVar(DebugVar_t *var_ll, long *return_long);
int Debug_ReadVar(DebugVar_t *var, long *return_long);
int Debug_ReadVarName(DebugVar_t *var, char *name_ptr);
#endif //DEBUG_TOOLS