|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
函数 | |
| void * | osal_klib_fopen (const char *file, int flags, int mode) |
| open file and return file pointer. | |
| void | osal_klib_fclose (void *filp) |
| close file. | |
| int | osal_klib_fwrite (const char *buf, unsigned long size, void *filp) |
| kernel write function. | |
| int | osal_klib_fread (char *buf, unsigned long size, void *filp) |
| Kernel read function. | |
| void | osal_klib_fsync (void *filp) |
| Perform a fsync or fdatasync on a file | |
| int | osal_klib_fseek (long long offset, int whence, void *filp) |
| Kernel file seek function. | |
| int | osal_klib_unlink (const char *path) |
| Removes a file or directory. | |
| int | osal_klib_ftruncate (void *filp, unsigned long len) |
| Truncates the size of the file to the specified size. | |
| void osal_klib_fclose | ( | void * | filp | ) |
close file.
| filp | [in] the result of osal_klib_fopen |
| void * osal_klib_fopen | ( | const char * | file, |
| int | flags, | ||
| int | mode | ||
| ) |
open file and return file pointer.
| file | [in] the filename of file |
| flags | [in] the opreation flag example: OSAL_O_CREAT |
| mode | [in] the mode example: OSAL_O_RDONLY |
| int osal_klib_fread | ( | char * | buf, |
| unsigned long | size, | ||
| void * | filp | ||
| ) |
Kernel read function.
| buf | [out] the buffer you want to read in |
| size | [in] the size of buffer |
| filp | [in] the result of osal_klib_fopen |
| int osal_klib_fseek | ( | long long | offset, |
| int | whence, | ||
| void * | filp | ||
| ) |
Kernel file seek function.
| offset | [in] the new position of file |
| whence | [in] the method of lseek,example:OSAL_SEEK_SET |
| filp | [in] the result of osal_klib_fopen |
| void osal_klib_fsync | ( | void * | filp | ) |
Perform a fsync or fdatasync on a file
| filp | [in] the result of osal_klib_fopen |
| int osal_klib_ftruncate | ( | void * | filp, |
| unsigned long | len | ||
| ) |
Truncates the size of the file to the specified size.
| filp | [in] the result of osal_klib_fopen |
| len | [in] the len of ftruncate |
| int osal_klib_fwrite | ( | const char * | buf, |
| unsigned long | size, | ||
| void * | filp | ||
| ) |
kernel write function.
| buf | [in] the buffer you want to write |
| size | [in] the size of buffer |
| filp | [in] the result of osal_klib_fopen |
| int osal_klib_unlink | ( | const char * | path | ) |
Removes a file or directory.
| path | [in] the file path of file |