You are here

FILES IN main.c | Cypress Semiconductor

FILES IN main.c

Summary: 1 Reply, Latest post by mmoron21 on 07 Oct 2010 09:02 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_48311473's picture
71 posts

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?

user_48311473's picture
71 posts

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.


Log in to post new comments.