35 lines
934 B
C
35 lines
934 B
C
/****************************************************************/
|
|
/* TMS320C32 */
|
|
/* ====== BIOS, ÊËÀÈÍ, ÊËÂÑÏ ====== */
|
|
/* ÖÍÈÈ ÑÝÒ (ñ) 1998-2001ã. */
|
|
/****************************************************************/
|
|
/* log_to_mem.c
|
|
****************************************************************
|
|
* Çàïèñü ëîãîâ â ïàìyòü *
|
|
****************************************************************/
|
|
|
|
#include "log_to_mem.h"
|
|
|
|
int no_write = 1,
|
|
never_write = 0; // Ôëàãè, ÷òîáû íå ïèñàòü (åñëè ÷òî)
|
|
|
|
#pragma DATA_SECTION(logs_block,".logg");
|
|
unsigned int logs_block[0xF000];
|
|
|
|
LOG Log;
|
|
unsigned int flog=0;
|
|
|
|
// Î÷èùåíèå ïàìàòè, ãäå ëîãè ëåæàò
|
|
void clear_mem()
|
|
{
|
|
unsigned long i;
|
|
|
|
Log.Start = LOG_PAGE_START;
|
|
Log.Finis = LOG_PAGE_START + LOG_PAGE_LEN;
|
|
Log.Adres = Log.Start;
|
|
Log.Circl = 0;
|
|
|
|
for (i=Log.Start; i<Log.Finis; i++)
|
|
*(volatile int *)i = 0;
|
|
}
|