This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/MSP430F5529:读取.dat文件的特定列并将数据存储在缓冲区中。

Guru**** 2595770 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/638373/ccs-msp430f5529-reading-specific-columns-of-a-dat-file-and-storing-the-data-in-a-buffer

部件号:MSP430F5529

工具/软件:Code Composer Studio

我尝试读取 存储在EXP-MSP430F5529板SD卡中的.dat文件的特定列。

我正在使用  Chan (FatFs)的FAT文件系统模块。

我在 文件中存储了2500 x 9数据。

示例-前2行。

        0 0.1446 1.4404 4.2689           - 9.2554  - 2.8426 0.2229     - 2.5650 - 10.8490
     0.0040 - 0.1554 0.1404 3.3689       - 10.5550  - 2.0426 - 21.7770 - 16.5650  - 6.8493


目前我正在使用此API:

rc = f_open(&fil, filename, FA_READ); rc = f_read(&fil, testbuff, sizeof(Testbuer),&br); /*读取一个文件块*/

 

但我不清楚如何在空格或数字之间进行划分。

缓冲区还将每个字符保存为一个条目,如何读取整数?

如何最好地读取单个库房并将数据存储在缓冲区中?

提前感谢。