📄 ts_interface.h
字号:
/*****************************************************************************
* This file contains Task_Scheduler API prototypes.
*
* (c) Copyright 2006, Freescale, Inc. All rights reserved.
*
* Freescale Semiconductor Confidential Proprietary
*
* No part of this document must be reproduced in any form - including copied,
* transcribed, printed or by any electronic means - without specific written
* permission from Freescale Semiconductor Denmark A/S.
*****************************************************************************/
#ifndef _KERNEL_INTERFACE_H_
#define _KERNEL_INTERFACE_H_
#include "EmbeddedTypes.h"
extern const uint8_t gIdleTask;
extern const uint8_t gMacTaskID_c;
extern const uint8_t gNwkTaskID_c;
extern const uint8_t gApsTaskID_c;
extern const uint8_t gAfTaskID_c;
extern const uint8_t gZdoTaskID_c;
extern const uint8_t gZdoStateMachineTaskID_c;
extern const uint8_t gTimerTask_c;
extern const uint8_t gZappTaskID_c;
extern const uint8_t gUartTaskID_c;
extern const uint8_t gZtcTaskID;
/*Note: added to avoid warnings*/
#ifndef gZtcIncluded_d
#define gZtcIncluded_d 0
#endif
/*********************************/
#ifndef gSchedulerIntegration_d
/*****************************************************************************
* Controls whether the task scheduler is integrated in the BeeStack
*
* Valid range:
* 1 (default) = Enable task scheduler integration
* 0 = Task scheduler integration disabled
*****************************************************************************/
#define gSchedulerIntegration_d 1
#endif
/*****************************************************************************
******************************************************************************
* Private type definitions
******************************************************************************
*****************************************************************************/
/* typedef for event ID. Events are single bit masks. 16 events are
* supported per task */
typedef uint16_t event_t;
/* typedef for task ID */
typedef uint8_t taskID_t;
/*****************************************************************************
* void TS_Init(void)
*
* TS_Init creates, initializes the task and calls scheduler
*
* Arguments
* void
*
* Return value:
* No return value provided.
*
* Revison history:
* date Author Comments
* ------ ------- --------
* 14092005 LS Created
******************************************************************************/
void TS_Init(void);
/*****************************************************************************
* void TS_IdleTask(event_t events);
*
* This is the lowest priority task that will be executed when there is no
* other task in ready state. The house keeping functions and power management
* functions can be called from this task.
*
* This task should always in READY state.
*
* Arguments:
* event_t events
*
* Return value:
* No return value provided.
*
* Revison history:
* date Author Comments
* ------ ------- --------
* 14092005 LS Created
*****************************************************************************/
void TS_IdleTask(event_t events);
/*****************************************************************************
* void TS_SendEvent(taskID_t taskId,event_t eventId);
*
* Sends an event to task specified by taskID.
* Event ID is bit masks. only 16 events per task is supported.
*
* Arguments:
* taskId - ID of receiving task
* eventId - Event ID is bit mask. only 16 events per task is supported.
*
* Return value:
* No return value provided.
*
* Revison history:
* date Author Comments
* ------ ------- --------
* 14092005 LS Created
*****************************************************************************/
void TS_SendEvent(taskID_t taskId,event_t eventId);
/*****************************************************************************
* bool_t TS_PendingEvents(void)
*
* Description:This Function checks for the pending evnts for all the existing tasks.
*
* Arguments
* void
*
* Return value:
* TRUE:If any event is pending for any task.
* FALSE:If No events are pending.
*
* Revison history:
* date Author Comments
* ------ ------- --------
* 14092005 Srinivasar Created
*****************************************************************************/
bool_t TS_PendingEvents(void);
#endif /*_KERNEL_INTERFACE_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -