CREATE A FILE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I want to create a file into main.c to save some SIgDeltaADC values.

   

I wrote the typical C code to create a file but this compiler seems not to identify

   

the pointer.

   

I get and error in the instruction:

   

FILE *p;

   

The compiler sais: undefined identifier.

   

The code is:

   

 

   

   

 

   

<device.h> <math.h> <stdio.h> main()int result,i;/* Place your initialization/startup code here (e.g. MyInst_Start()) */ /* CYGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */ "primeros.dat", "wb");for(i=0;i<10;i++)sizeof(int), 1, fp);/*for*/ /*main*/

   

Some idea to create a file?

   

   

#include

   

 

   

#include

   

 

   

void

   

{

   

FILE *fp;

   

 

   

 

   

 

   

 

   

ADCDelSig_Start();

   

 

   

 

   

 

   

fp = fopen(

   

 

   

{

   

ADCDelSig_StartConvert();

   

ADCDelSig_IsEndConversion(ADCDelSig_WAIT_FOR_RESULT );

   

result=ADCDelSig_GetResult8();

   

fwrite(&result,

   

 

   

}

   

 

   

fclose(fp);

   

}

   

 

   

/* [] END OF FILE */

   

   

#include

0 Likes
1 Reply