sdcard_fatfs example

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

sdcard_fatfs example

674件の閲覧回数
lessiffy
Contributor II

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.

タグ(3)
0 件の賞賛
1 返信

624件の閲覧回数
Alexis_A
NXP TechSupport
NXP TechSupport

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.

pastedImage_2.png

Let me know if this helps you.

Best Regards,

Alexis Andalon

0 件の賞賛