Anonymous
Not applicable
Mar 05, 2013
05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 05, 2013
05:27 AM
#include <device.h>
#include <stdio.h>
#include <stdlib.h>
*******************************************************************************/
void main()
{
...
FILE *fp;
....
fp = fopen( "Slave.txt", "w" ); // Open file for writing
fprintf(fp, " %u %u\n", Array[0],Array[1]);
....
}
is that correct?
1 Reply
Mar 05, 2013
05:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 05, 2013
05:02 PM
Short answer: no, this won't work.
Long answer: where do you intend the file to be written to? There is no fixed disk available on the PSoC, nor is there any operating system available handling the file system.
If you want to write to a SD card, look at the emfile component: http://www3.cypress.com/?rID=58694