http://elm-chan.org/fsw/ff/doc/open.html
Parameters fp ตัวชี้ไปยัง the blank file object structure.
path ตัวชี้ไปยัง the null-terminated string ที่ระบุ the file name เพื่อเปิดหรือสร้าง.
mode Mode flags ที่ระบุประเภทของ access and open method สำหรับ the file. มันถูกระบุโดยการรวมของ flags ต่อไปนี้.

Mode flags ใน POSIX fopen() function ตรงกันกับ FatFs mode flags ดังต่อไปนี้:
Return ValuesFR_OK, FR_DISK_ERR, FR_INT_ERR, FR_NOT_READY, FR_NO_FILE, FR_NO_PATH, FR_INVALID_NAME, FR_DENIED, FR_EXIST, FR_INVALID_OBJECT, FR_WRITE_PROTECTED, FR_INVALID_DRIVE, FR_NOT_ENABLED, FR_NO_FILESYSTEM, FR_TIMEOUT, FR_LOCKED, FR_NOT_ENOUGH_CORE, FR_TOO_MANY_OPEN_FILES
DescriptionThe f_open function เปิด a file และสร้าง a file object. The file object เป็น an identifier สำหรับการดำเนินการที่ตามมาของ the file. Open file ควรถูกปิดด้วย f_close function หลังจาก the session ของ the file access. ถ้าการเปลี่ยนแปลงใดๆกับ the file ถูกทำแล้วและไม่ถูกปิดก่อน power off, media removal หรือ re-mount, หรือ the file สามารถถูกพังลง.
ถ้า duplicated file open ถูกต้องการ, โปรดอ่านที่นี่อย่างละเอียด. อย่างไรก็ตาม duplicated open of a file ด้วย any write mode flag ถูกห้ามเสมอ.
QuickInfoมีให้ใช้ประโยชน์เสมอ. มีเพียง FA_READ and FA_OPEN_EXISTING มีให้ใช้ประโยชน์สำหรับ the mode flags เมื่อ FF_FS_READONLY == 1.
Example(ตัวอย่างโค้ดดูในลิ้งค์เอานะครับ)
See Alsof_read, f_write, f_close, FIL, FATFS