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

📄 schedule.h

📁 mega128平台下
💻 H
字号:
#ifndef	_SCHEDULE_H
#define	_SCHEDULE_H


unsigned char atomic_start(void);


void atomic_end(unsigned char );


/* These are provided in HPL.td */
void TOSH_wait(void);


void TOSH_sleep(void);

void sched_init(void);


/*
 * TOS_post (thread_pointer)
 *  
 * Put the task pointer into the next free slot.
 * Return 1 if successful, 0 if there is no free slot.
 *
 * This function uses a critical section to protect TOSH_sched_free.
 * As tasks can be posted in both interrupt and non-interrupt context,
 * this is necessary.
 */
char post(void (*tp) ()) ;

/*
 * TOSH_schedule_task()
 *
 * Remove the task at the head of the queue and execute it, freeing
 * the queue entry. Return 1 if a task was executed, 0 if the queue
 * is empty.
 */

int TOSH_run_next_task (void);

void run_task(void);



void __nesc_enable_interrupt(void) ;

#endif

⌨️ 快捷键说明

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