1 Reply Latest reply on Oct 7, 2010 9:02 AM by userc_42488

    FILES IN main.c

      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:


















      FILE *fp;




          main()    int    result,i;    /* Place your initialization/startup code here (e.g. MyInst_Start()) */   



          /* CYGlobalIntEnable; */        /* Uncomment this line to enable global interrupts. */   


      fp = fopen(




      ADCDelSig_IsEndConversion(ADCDelSig_WAIT_FOR_RESULT );





          "primeros.dat"    ,     "wb"    );    for    (i=0;i<10;i++)    sizeof    (    int    ), 1, fp);    /*for*/   




      /* [] END OF FILE */


      Some idea to create a file?

        • 1. Re: FILES IN main.c

          I obtained this answer in PsOC developer:


          Where do you want to write the data to? EEPROM or back in the computer?

          You cannot create a file from PSoC itself.
          If you want use the data for some calculation etc, you can write the data to a temporary buffer (malloc).
          If you want it to be in non-volatile you can write the data to EEPROM.
          If you want to send it back to the PC, you need to have some kind of communication from PSoC to PC - like serial or USB.


          By Ravi.