Other Parts Discussed in Thread: CC1310
I am trying to open and read a binary file.
I am using the following code:
FILE* BinFile; BinFile = fopen("output123.bin", "rb");
if(BinFile) { Display_printf(displayHandle, 0, 0, "File exists... = %x \n", BinFile); }
if (BinFile == NULL) { Display_printf(displayHandle, 0, 0, "Error opening file...\n"); perror("fopen"); return (NULL); }
Now the problem is that the file "output123.bin" does not exist anywhere, but I get no error message instead the output is :
File exists... = 20002120
When I try to read a file that actually exists in the same directory, what I read is completely wrong.