Razvalyaev
7e0063eee0
Все основные файлы подтянуты без изменений Изменены (только папка main_matlab): - заглушки для ненужных функций (main_matlab.c) - iq библиотека (IQmathLib_matlab.c) - библиотеки DSP281x
97 lines
2.3 KiB
C
97 lines
2.3 KiB
C
/****************************************************************/
|
|
/* TMS320C32 */
|
|
/* ====== BIOS, ÊËÀÈÍ, ÊËÂÑÏ ====== */
|
|
/* ÖÍÈÈ ÑÝÒ (ñ) 1998-2001ã. */
|
|
/****************************************************************/
|
|
/* log_to_mem.h
|
|
****************************************************************
|
|
* Çàïèñü ëîãîâ â ïàìyòü *
|
|
****************************************************************/
|
|
|
|
#ifndef _LOG_TO_MEM
|
|
#define _LOG_TO_MEM
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define SIZE_LOGS_ARRAY 92
|
|
|
|
#define INIT_LOG 3
|
|
//#define ERR_LOG 2
|
|
//#define ALARM_SAVE_MEMORY 1
|
|
#define FAST_LOG 0
|
|
#define SLOW_LOG 4
|
|
#define ALL_LOG 5
|
|
|
|
|
|
typedef struct
|
|
{
|
|
// int copy_log_to_const_memory;
|
|
//
|
|
//// int start_write_fast_log; //Íà÷àëî çàïèñè ëîãà, äëÿ îïðåäåëåíèÿ count_log_params_fast_log
|
|
//// int count_log_params_fast_log; //Êîëè÷åñòâî çàïèñûâàåìûõ â ëîã ïàðàìåòðîâ
|
|
//
|
|
// int block_size_counter_fast;
|
|
// int block_size_counter_slow;
|
|
//
|
|
int block_size_fast;
|
|
int block_size_slow;
|
|
|
|
int logs[SIZE_LOGS_ARRAY];
|
|
|
|
} LOGSDATA;
|
|
|
|
//extern int LOAG[];
|
|
|
|
#define LOGSDATA_DEFAULT {0,0, {0} }
|
|
|
|
|
|
/* íå ïðîâîäèòü ðîòàöèþ ëîãîâ */
|
|
#define NO_ROTATE_LOG 0
|
|
|
|
//extern int no_write; // Ôëàã, ÷òîáû íå ïèñàòü (åñëè ÷òî)
|
|
//extern int stop_log; // Ëîãè îñòàíîâèëèñü
|
|
//extern int Fast_log_written; //FAST LOG çàïèñàí
|
|
//extern int block_size_counter_slow;
|
|
//extern int block_size_counter_fast;
|
|
|
|
//extern int block_size_counter;// ðàçìåð áëîêà
|
|
//extern int size_fast_done;
|
|
//extern int size_slow_done;
|
|
|
|
|
|
/* Çàïèñü äâóõ ìëàäøèõ áàéòîâ àðãóìåíòà â ïàìyòü, ãäå ëîãè ëåæàò */
|
|
void write_to_mem(int tlog,int DataM);
|
|
void write_to_mem_a(int DataM);
|
|
|
|
|
|
/* Ïðîâåðêà ãðàíèöû ïàìyòè äëy ëîãîâ */
|
|
void test_mem_limit(int tlog,int ciclelog);
|
|
void set_start_mem(int tlog);
|
|
|
|
/* Î÷èñòêà ïàìyòè (îáíóëåíèå) */
|
|
void clear_mem(int tlog);
|
|
void clear_mem_all(void);
|
|
|
|
void getFastLogs(int cicleLog);
|
|
void getSlowLogs(int cicleLog);
|
|
|
|
//Ñîõðàíåíèå ëîãîâ â íåçàòèðàåìóþ ïðè ðàáîòå ÷àñòü ïàìÿòè
|
|
void copyLogsToSaveArea(void);
|
|
//Ñîõðàíåíèå ñ ðàçâîðà÷èâàíèåì êîëüöà.
|
|
//Çàïèñü ïî âðåìåíè íà÷èíàåòñÿ â íà÷àëå ó÷àñòêà ïàìÿòè è çàêàí÷èâàåòñÿ â êîíöå.
|
|
void copyLogsToSaveAreaUnrolled(void);
|
|
void clear_logpar(void);
|
|
|
|
extern LOGSDATA logsdata;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _LOG_TO_MEM */
|