|
TuyaOS
|
Common process - Initialization 更多...


宏定义 | |
| #define | tuya_hal_dir_close(dir) tal_dir_close(dir) |
| Close directory 更多... | |
| #define | tuya_hal_dir_is_directory(info, is_dir) tal_dir_is_directory(info, is_dir) |
| Check whether the node is a directory 更多... | |
| #define | tuya_hal_dir_is_regular(info, is_regular) tal_dir_is_regular(info, is_regular) |
| Check whether the node is a normal file 更多... | |
| #define | tuya_hal_dir_name(info, name) tal_dir_name(info, name) |
| Get the name of the file node 更多... | |
| #define | tuya_hal_dir_open(path, dir) tal_dir_open(path, dir) |
| Open directory 更多... | |
| #define | tuya_hal_dir_read(dir, info) tal_dir_read(dir, info) |
| Read directory 更多... | |
| #define | tuya_hal_faccess(Cfilepath, mode) tal_faccess(Cfilepath, mode) |
| Judge if the file can be access 更多... | |
| #define | tuya_hal_fclose(file) tal_fclose(file) |
| Close file 更多... | |
| #define | tuya_hal_feof(file) tal_feof(file) |
| Check wheather to reach the end fo the file 更多... | |
| #define | tuya_hal_fflush(file) tal_fflush(file) |
| flush the IO read/write stream 更多... | |
| #define | tuya_hal_fgetc(file) tal_fgetc(file) |
| read the next character from stream 更多... | |
| #define | tuya_hal_fgets(buf, len, file) tal_fgets(buf, len, file) |
| Read string from file 更多... | |
| #define | tuya_hal_fgetsize(filepath) tal_fgetsize(filepath) |
| Get file size 更多... | |
| #define | tuya_hal_fileno(file) tal_fileno(file) |
| get the file fd 更多... | |
| #define | tuya_hal_fopen(path, mode) tal_fopen(path, mode) |
| Open file 更多... | |
| #define | tuya_hal_fread(buf, bytes, file) tal_fread(buf, bytes, file) |
| Read file 更多... | |
| #define | tuya_hal_fs_is_exist(path, is_exist) tal_fs_is_exist(path, is_exist) |
| Check whether the file or directory exists 更多... | |
| #define | tuya_hal_fs_mkdir(path) tal_fs_mkdir(path) |
| Make directory 更多... | |
| #define | tuya_hal_fs_mode(path, mode) tal_fs_mode(path, mode) |
| Get file mode 更多... | |
| #define | tuya_hal_fs_remove(path) tal_fs_remove(path) |
| Remove directory 更多... | |
| #define | tuya_hal_fs_rename(path_old, path_new) tal_fs_rename(path_old, path_new) |
| File rename 更多... | |
| #define | tuya_hal_fseek(file, offs, whence) tal_fseek(file, offs, whence) |
| Seek to the offset position of the file 更多... | |
| #define | tuya_hal_fsync(fd) tal_fsync(fd) |
| write buffer to flash 更多... | |
| #define | tuya_hal_ftell(file) tal_ftell(file) |
| Get current position of file 更多... | |
| #define | tuya_hal_ftruncate(fd, length) tal_ftruncate(fd, length) |
| truncate one file according to the length 更多... | |
| #define | tuya_hal_fwrite(buf, bytes, file) tal_fwrite(buf, bytes, file) |
| write file 更多... | |
Common process - Initialization
| #define tuya_hal_dir_close | ( | dir | ) | tal_dir_close(dir) |
Close directory
| [in] | dir | handle of directory |
| #define tuya_hal_dir_is_directory | ( | info, | |
| is_dir | |||
| ) | tal_dir_is_directory(info, is_dir) |
Check whether the node is a directory
| [in] | info | file information |
| [out] | is_dir | is directory or not |
| #define tuya_hal_dir_is_regular | ( | info, | |
| is_regular | |||
| ) | tal_dir_is_regular(info, is_regular) |
Check whether the node is a normal file
| [in] | info | file information |
| [out] | is_regular | is normal file or not |
| #define tuya_hal_dir_name | ( | info, | |
| name | |||
| ) | tal_dir_name(info, name) |
Get the name of the file node
| [in] | info | file information |
| [out] | name | file name |
| #define tuya_hal_dir_open | ( | path, | |
| dir | |||
| ) | tal_dir_open(path, dir) |
Open directory
| [in] | path | path of directory |
| [out] | dir | handle of directory |
| #define tuya_hal_dir_read | ( | dir, | |
| info | |||
| ) | tal_dir_read(dir, info) |
Read directory
| [in] | dir | handle of directory |
| [out] | info | file information |
| #define tuya_hal_faccess | ( | Cfilepath, | |
| mode | |||
| ) | tal_faccess(Cfilepath, mode) |
Judge if the file can be access
| [in] | filepath | file path + file name |
| [in] | mode | access mode |
| #define tuya_hal_fclose | ( | file | ) | tal_fclose(file) |
Close file
| [in] | file | file handle |
| #define tuya_hal_feof | ( | file | ) | tal_feof(file) |
Check wheather to reach the end fo the file
| [in] | file | file handle |
| #define tuya_hal_fflush | ( | file | ) | tal_fflush(file) |
flush the IO read/write stream
| [in] | file | char stream |
| #define tuya_hal_fgetc | ( | file | ) | tal_fgetc(file) |
read the next character from stream
| [in] | file | char stream |
| #define tuya_hal_fgets | ( | buf, | |
| len, | |||
| file | |||
| ) | tal_fgets(buf, len, file) |
Read string from file
| [in] | buf | buffer for reading file |
| [in] | len | buffer size |
| [in] | file | file handle |
| #define tuya_hal_fgetsize | ( | filepath | ) | tal_fgetsize(filepath) |
Get file size
| [in] | filepath | file path + file name |
| #define tuya_hal_fileno | ( | file | ) | tal_fileno(file) |
get the file fd
| [in] | file | char stream |
| #define tuya_hal_fopen | ( | path, | |
| mode | |||
| ) | tal_fopen(path, mode) |
Open file
| [in] | path | path of file |
| [in] | mode | file open mode: "r","w"... |
| #define tuya_hal_fread | ( | buf, | |
| bytes, | |||
| file | |||
| ) | tal_fread(buf, bytes, file) |
Read file
| [in] | buf | buffer for reading file |
| [in] | bytes | buffer size |
| [in] | file | file handle |
| #define tuya_hal_fs_is_exist | ( | path, | |
| is_exist | |||
| ) | tal_fs_is_exist(path, is_exist) |
Check whether the file or directory exists
| [in] | path | path of directory |
| [out] | is_exist | the file or directory exists or not |
| #define tuya_hal_fs_mkdir | ( | path | ) | tal_fs_mkdir(path) |
Make directory
| [in] | path | path of directory |
| #define tuya_hal_fs_mode | ( | path, | |
| mode | |||
| ) | tal_fs_mode(path, mode) |
Get file mode
| [in] | path | path of directory |
| [out] | mode | bit attibute of directory |
| #define tuya_hal_fs_remove | ( | path | ) | tal_fs_remove(path) |
Remove directory
| [in] | path | path of directory |
| #define tuya_hal_fs_rename | ( | path_old, | |
| path_new | |||
| ) | tal_fs_rename(path_old, path_new) |
File rename
| [in] | path_old | old path of directory |
| [in] | path_new | new path of directory |
| #define tuya_hal_fseek | ( | file, | |
| offs, | |||
| whence | |||
| ) | tal_fseek(file, offs, whence) |
Seek to the offset position of the file
| [in] | file | file handle |
| [in] | offs | offset |
| [in] | whence | seek start point mode |
| #define tuya_hal_fsync | ( | fd | ) | tal_fsync(fd) |
write buffer to flash
| [in] | fd | file fd |
| #define tuya_hal_ftell | ( | file | ) | tal_ftell(file) |
Get current position of file
| [in] | file | file handle |
| #define tuya_hal_ftruncate | ( | fd, | |
| length | |||
| ) | tal_ftruncate(fd, length) |
truncate one file according to the length
| [in] | fd | file description |
| [in] | length | the length want to truncate |
| #define tuya_hal_fwrite | ( | buf, | |
| bytes, | |||
| file | |||
| ) | tal_fwrite(buf, bytes, file) |
write file
| [in] | buf | buffer for writing file |
| [in] | bytes | buffer size |
| [in] | file | file handle |