4
0
mirror of https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.git synced 2025-02-13 19:29:15 +08:00
ZhuTianlong de7bad9245 1、【创建】GIT版本仓库
2、【创建】Eclipse工程,并支持IAR插件调试
3、【创建】Keil工程,位于/RVMDK目录下
4、【创建】IAR工程,位于/EWARM目录下
5、【添加】RT-Thread1.1.1操作系统支持
6、【添加】LED1、LED2系统运行指示灯
7、【修改】Readdme.md文件

Signed-off-by: armink <armink.ztl@gmail.com>
2013-08-02 14:00:55 +08:00

58 lines
1.3 KiB
C

#ifndef __RTT_DIRENT_H__
#define __RTT_DIRENT_H__
#include <rtthread.h>
/*
* dirent.h - format of directory entries
* Ref: http://www.opengroup.org/onlinepubs/009695399/basedefs/dirent.h.html
*/
/* File types */
#define FT_REGULAR 0 /* regular file */
#define FT_SOCKET 1 /* socket file */
#define FT_DIRECTORY 2 /* directory */
#define FT_USER 3 /* user defined */
#define DT_UNKNOWN 0x00
#define DT_REG 0x01
#define DT_DIR 0x02
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_DIR_STRUCTURE
typedef struct
{
int fd; /* directory file */
char buf[512];
int num;
int cur;
} DIR;
#endif
#ifndef HAVE_DIRENT_STRUCTURE
struct dirent
{
rt_uint8_t d_type; /* The type of the file */
rt_uint8_t d_namlen; /* The length of the not including the terminating null file name */
rt_uint16_t d_reclen; /* length of this record */
char d_name[256]; /* The null-terminated file name */
};
#endif
int closedir(DIR *);
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
void rewinddir(DIR *);
void seekdir(DIR *, long int);
long telldir(DIR *);
#ifdef __cplusplus
}
#endif
#endif