⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sos_types.h

📁 SOS操作系统用于无线传感器网络节点的源代码
💻 H
字号:
#ifndef _SOS_TYPES_H
#define _SOS_TYPES_H

#include "sos_inttypes.h"
#include <sos_endian.h>

enum
{
  FALSE = 0,
  TRUE = 1,
};



#ifndef NULL
#define NULL 0
#endif

/**
 * @brief handler return type
 */
enum
  {
	SOS_SPLIT = 1,    /* the operation will be handled in split phase */
	SOS_OK    = 0,    /* general OK for most ker_ system calls */
  };

/**
 * @brief SOS booting conditions
 */
enum
{
  SOS_BOOT_NORMAL =   0,      // normal reboot
  SOS_BOOT_CRASHED =  1,      // system was crashed
  SOS_BOOT_WDOGED  =  3,      // system was having watchdog timeout
};
/**
 * @brief error number
 * all fail will be in the form of error number
 * NOTE: the errno cannot be greater than 127
 * Simon: I have disabled the ones that are never used...
 */
#ifndef EPERM
#define	EPERM		 1	/* Operation not permitted */
#define	ENOENT       2  /* No such file or directory */
#define	ESRCH		 3  /* No such process */
#define	EIO			 5   /* I/O error */
#define	ENXIO	     6   /* No such device or address */
#define	EAGAIN		11	/* Try again */
#define	ENOMEM		12	/* Out of memory */
#define	EFAULT		14	/* Bad address */
#define	EBUSY		16	/* Device or resource busy */
#define	EEXIST		17	/* File exists */
#define	EINVAL		22	/* Invalid argument */
#define	ENOSYS		38	/* Function not implemented */
#define	EOVERFLOW	75	/* Value too large for defined data type */
#define ENOPROGMEM 125  /* no more program space for module */
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -