#include "driverlib.h" #include "device.h" #include "c2000ware_libraries.h" #include "string.h" #include <sdspi/sdspi.h> #include <sdspi/SDFatFS.h> #define DRIVE_NUM 0 // // Main // int32_t fatfs_getFatTime(void) { return 0; } // // End File // void main(void) { Device_init(); // // Disable pin locks and enable internal pullups. // Device_initGPIO(); // // Initialize PIE and clear PIE registers. Disables CPU interrupts. // Interrupt_initModule(); // // Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // Interrupt_initVectorTable(); // // Board initialization // Board_init(); C2000Ware_libraries_init(); FIL dst; FRESULT fresult; const char inputfile[8] = "test.txt"; char readBuffer[20] = ""; uint16_t bytesRead = 0; fresult = f_open(&dst, inputfile, FA_READ); if (fresult != FR_OK) { ESTOP0; while(1); } fresult = f_read(&dst, readBuffer, 20, &bytesRead); if (fresult != FR_OK) { ESTOP0; while(1); } fresult = f_close(&dst); if (fresult != FR_OK) { ESTOP0; while(1); } // // Enable Global Interrupt (INTM) and realtime interrupt (DBGM) // EINT; ERTM; SDFatFS_close(myFATFS0_Handle); ESTOP0; } // // End File //