|
hi to all,
i am getting an error of
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ADC_Samples
The command 'LX51.exe' failed with exit code '2'.
-------------------------------------------------------------------------------------------------------
Here is my code , Can any body help me where i went wrong.
-----------------------------------------------------------------------------------------------------
#define ADC_NUMBER_SAMPLES ( )
/* Initialize array elements to zero. */
uint16 ADC_Samples[ ];
/* Defining and initializing the index */
int16 ADC_Sample_Index = 0;
///* Initiialize the average result */
uint32 ADC_Sample_Max = 0;
/* Sample read from ADC */
int16 ADC_Current_Sample = 0;
/* Indicator for when sample is available */
int8 ADC_Sample_Available = 0;
void main()
{
int8 i;
/* Start the VDAC component */
VDAC8_2_Start();
/* Start the opamp component */
Opamp_1_Start();
/* Sets the OpAmp power mode to high power */
Opamp_1_SetPower(Opamp_1_HIGHPOWER);
/* Start the VDAC component */
VDAC8_1_Start();
/* Start the TIA component */
TIA_1_Start();
/* Set the Resistive feedback to 40k ohms */
TIA_1_SetResFB(TIA_1_RES_FEEDBACK_40K);
/* Set the capacitive feedback to 3.3pF */
TIA_1_SetCapFB(TIA_1_CAP_FEEDBACK_1_3PF);
PGA_1_Start();
/* Sets the PGA gain to 4 */
PGA_1_SetGain(PGA_1_GAIN_08);
/* Sets the power mode to medium power */
PGA_1_SetPower(PGA_1_HIGHPOWER);
/* Start the ADC */
ADC_DelSig_1_Start();
/* Start the ADC conversion */
ADC_DelSig_1_StartConvert();
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
for(;;)
/* Place your application code here. */
{
/* Check whether ADC conversion complete or not */
if (ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT))
{
/* Get the result */
ADC_Current_Sample = ADC_DelSig_1_GetResult8();
ADC_Sample_Available = 1;
}
/* Testing for sample available from the ADC */
if (ADC_Sample_Available)
{
ADC_Sample_Available = 0;
/* storing the sample into the array, based on the index */
ADC_Samples[ADC_Sample_Index++] = ADC_Current_Sample;
ADC_Sample_Max = 0;
for (i = 0; i < ADC_Sample_Index; i++)
{
if(ADC_Samples[i]>ADC_Sample_Max)
{
ADC_Sample_Max=ADC_Samples[i];
}
}
}
}
}
|