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

📄 os.h

📁 无线传感器星型网络的节点的基站程序,采用802.15.4协议
💻 H
字号:
//----------------------------------------------------//
//-------Institute Of  Computing Technology-----------//
//------------Chinese Academic  Science---------------//
//-----中国科学院计算技术研究所先进测试技术实验室-----//
//----------------------------------------------------//

// **************************************************
// * @copyright:nbicc_lpp
// * @this is OS code
// * @author zhouqiang  (zhouhongren@163.com)
// *              liulingyi      (lingyiliu@ict.ac.cn)
// * @data:2005.11.05
// * @version:0.0.1
// * @updata:$
// **************************************************
#ifndef os_h
#define os_h
#include "project.h"

	//原子操作
	 typedef uint8_t  os_atomic_t;
	 inline os_atomic_t  os_atomic_start(void );
	 inline void  os_atomic_end(os_atomic_t oldSreg);
	 inline void os_atomic_enable_interrupt(void);
	//系统函数
	 inline void OS_wait(void );
	 inline void OS_sleep(void );
	 inline void OS_sched_init(void );
	 inline bool OS_run_next_task(void);
	 inline void OS_run_task(void);
	 bool  OS_post(void (*tp)(void));
	 inline  void  error(char * info);
	//参数设置
	typedef struct _OS_sched_entry_T {
		void (*tp)(void);
	  
	}OS_sched_entry_T;

	enum OS_CON{
	  OS_MAX_TASKS = 8, 
	  OS_TASK_BITMASK = OS_MAX_TASKS - 1
	};
	volatile OS_sched_entry_T OS_queue[OS_MAX_TASKS];
	uint8_t OS_sched_full;
	volatile uint8_t OS_sched_free;

	
	

#endif

⌨️ 快捷键说明

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