This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1298 and C5515

Hello ;

In the C5515 EVM ; there is a routine called before BPM calculations ; but I did not understand why we call  it ;

Anyone familier with C5515 EVM could  explain please .

 

/*-----------------------------------------------------------------------**
**                                                                       **
** 	Function Name : QRS_Algorithm_Interface                              **
** 	Description -   This function is called by the main acquisition      **
** 					thread when (N/3) samples are filled in				 **
** 					the Lead_Info_buffer for Lead II.Here N = 351 and    **
** 					thus it is called for a fill of every 117			 **
** 					samples												 **
**                  Before calling the process_buffer() the below check  **
** 					has to be done. i.e. We have always received +2      **
** 					samples before starting the processing  for each     **
** 					samples. This function basically checks the          **
** 					difference between the QRS_Lead_Process_Ptr and      **
** 					Main_Index_Ptr and picks the data from               **
** 					Lead_Info_Buffer for processing.  This function also **
** 					checks for the roll back and fill the variables      **
** 					accordingly which will be used in the 1st and 2nd    **
** 					differentiation calculations.                        **
**                                                                       **
** 	Parameters  : - data - array having eight channel read data          **
** 	Return		: None                                                   **
**-----------------------------------------------------------------------*/
void QRS_Algorithm_Interface(Int16 CurrSample)
{

	static short prev_data[32] ={0};
	short i;
	Int32 Mac=0;
	prev_data[0] = CurrSample;
	for ( i=31; i > 0; i--)
	{
		Mac += prev_data[i];
		prev_data[i] = prev_data[i-1];

	}
	Mac += CurrSample;
	Mac = Mac >> 2;
	CurrSample = (short) Mac;
	QRS_Second_Prev_Sample = QRS_Prev_Sample ;
	QRS_Prev_Sample = QRS_Current_Sample ;
	QRS_Current_Sample = QRS_Next_Sample ;
	QRS_Next_Sample = QRS_Second_Next_Sample ;
	QRS_Second_Next_Sample = CurrSample ;

	QRS_process_buffer();
}

Thank you