/****************************************************************************** * * Freescale Semiconductor Inc. * (c) Copyright 2004-2006 Freescale Semiconductor, Inc. * (c) Copyright 2001-2004 Motorola, Inc. * ALL RIGHTS RESERVED. * ****************************************************************************//*! * * @file PE_freemaster_fastrec.c * * @brief FreeMASTER 56F800E-hardware dependent fast-recorder routines * * @version 1.0.2.0 * * @date Sep-6-2006 * *******************************************************************************/ #include "PE_freemaster.h" #include "PE_freemaster_private.h" #if FMSTR_USE_RECORDER && FMSTR_USE_FASTREC #include "PE_freemaster_fastrec.h" /* global variables */ FMSTR_ADDR pcm_dwFastRecWritePtr; FMSTR_ADDR pcm_dwFastRecStartBuffPtr; FMSTR_ADDR pcm_dwFastRecEndBuffPtr; /* statically allocated recorder buffer (FMSTR_REC_OWNBUFF is FALSE) */ #if FMSTR_REC_FARBUFF #pragma section fardata begin #endif /* FMSTR_REC_FARBUFF */ static FMSTR_U16 pcm_pFastRecBuffer[FMSTR_REC_BUFF_SIZE/2]; /* end of far memory section */ #if FMSTR_REC_FARBUFF #pragma section fardata end #endif /* FMSTR_REC_FARBUFF */ /**************************************************************************//*! * * @brief Fast Recorder Initialization * ******************************************************************************/ void FMSTR_InitFastRec(void) { /* get array pointer as 32bit value */ FMSTR_ARR2ADDR(pcm_dwFastRecStartBuffPtr, pcm_pFastRecBuffer); /* base driver requires byte-addressing */ FMSTR_SetUpRecBuff(pcm_dwFastRecStartBuffPtr * 2, FMSTR_REC_BUFF_SIZE); } /**************************************************************************//*! * * @brief Check if recorder configuration can be used in fast-recorder mode * ******************************************************************************/ FMSTR_BOOL FMSTR_SetUpFastRec(void) { FMSTR_INDEX i; /* check all recorder variables */ for(i=0; i