fopen not working
feilmeier
Posts: 2
Hi,
I just started up on the propeller this last weekend, and when I try to open a Full Duplex Serial Link, my file pointer gets filled with NULL. What is missing, or is it a compiler option that I have missed somewhere?
Here is the result I get from errno, which by the looks of the documentation, is file not found.
I just started up on the propeller this last weekend, and when I try to open a Full Duplex Serial Link, my file pointer gets filled with NULL. What is missing, or is it a compiler option that I have missed somewhere?
#include<stdio.h>#include<propeller.h> #include<cog.h> #include<errno.h> #include<driver.h> int main(void) { FILE* t; extern _Driver _FullDuplexSerialDriver; _Driver *_driverlist[] = { &_FullDuplexSerialDriver, NULL }; waitcnt(CLKFREQ+CNT); t = fopen("FDS:4800,15,14","r"); if(t == NULL){ printf("Fatal Error: %d\n",errno); } else{ printf("All Okay\n"); } waitcnt(CLKFREQ+CNT); }
Here is the result I get from errno, which by the looks of the documentation, is file not found.
Comments