Hi!
In this example, all the functions are put in one file. I try to only leave the main function only. For example, I put the function "status_t sdcardWaitCardInsert(void)" in board.c and it's declaration in board.h. All the necessary headers are included. But somehow when I transfer the functions to another file besides the main file, there will always be errors like "unknown type name 'sd_card_t'". Same problem also appears in other sdcard exapmles.
Also, I found that simply added #include "fsl_sd_disk.h" to board.h and did nothing else would also cause the problem. I wonder why those functions work in main file but not in the others?And is there a way to solve it? Because I found it a mess when all the functions are in the main file;;))
Has anyone tried the same thing? Need some help!
Thanks!
Best Regards.
Hello lessiffy@sjtu.edu.cn,
Checking the sdcardWaitCardInsert API this has the static modifier in it so that would explain you can use it outside the file you declare it. If you use this modifier the API will not be seen outside the same file.
Also, this could be caused by creating other folders and not adding the paths to your project settings.
Let me know if this helps you.
Best Regards,
Alexis Andalon