17.01.2015 Views

ThaiEasyElec - 2.8 inch TFT Touch Shield User ... - ThaiEasyElec.net

ThaiEasyElec - 2.8 inch TFT Touch Shield User ... - ThaiEasyElec.net

ThaiEasyElec - 2.8 inch TFT Touch Shield User ... - ThaiEasyElec.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ฟังก์ชั น Mount SD Card<br />

FRESULT pf_mount (FATFS* FileSystemObject /* Pointer to the work area */);<br />

เป็ น Function ทีใช้จองตําแหน่งพื นทีในการใช้งาน SD Card หาก Mount ได้สําเร็จจะ Return ค่าเป็ น 0<br />

ตัวอย่างการใช้งาน<br />

uint8_t res;<br />

res = pf_mount (&pff.fs);<br />

ฟังก์ชั น เปิ ด File<br />

FRESULT pf_open (const char* FileName /* Pointer to the file neme */);<br />

เป็ น Function ทีใช้สําหรับเปิ ดใช้งาน File ทีต้องการ เขียน และ อ่าน โดยใส่ String ของ Path ทีต้องการเข้าใช้งานที<br />

const char* FileName หากสามารถเปิ ดไฟล์ได้สําเร็จจะ Return ค่าออกมาเป็ น 0<br />

ตัวอย่างการใช้งาน<br />

uint8_t res;<br />

res = pf_open(“test.txt”);<br />

ฟังก์ชั น Read File<br />

FRESULT pf_read (void* Buffer, WORD ByteToRead, WORD* BytesRead);<br />

เป็ น Function ทีใช้อ่าน Data ออกมาจาก File โดยมี Arguments ต่างๆดังนี <br />

void* Buffer pointer ของ Buffer ทีเก็บข้อมูลทีอ่านจาก File<br />

WORD ByteToRead จํานวน Byte ทีต้องการอ่านจาก File<br />

WORD* BytesRead จํานวน Byte ทีอ่านได้จาก File<br />

ตัวอย่างการใช้งาน<br />

15 <strong>ThaiEasyElec</strong> - <strong>2.8</strong> <strong>inch</strong> <strong>TFT</strong> <strong>Touch</strong> <strong>Shield</strong> user manual V1.0| Venus Supply Co.,ltd - Contact : Sales@thaieasyelec.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!