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

📄 ker_api.h

📁 一个完整的rtos源代码.运行在嵌入80186 cpu上.提供4个任务,信号灯,定时器,schedule等.
💻 H
字号:
/* **************************************************************************************
 *  Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
 *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
 *
 *  File: $Workfile: Ker_API.h $             
 *
 * Description:
 * ============
 * kernel prototypes
 * 
 * Log:
 * ====
 * $Revision: 11 $
 * Last Modified by $Author: Nirm $ at $Modtime: 4/06/02 21:12 $ 
 ****************************************************************************************
 * Updates:
 ****************************************************************************************
 * $Log: /I49/H49V/Kernel/Ker_API.h $
 * 
 * 11    4/06/02 21:21 Nirm
 * - ie_send_ex() returns a Boolean success/failure indication.
 * 
 * 10    23/04/02 9:26 Nirm
 * - Added dependency in "Config.h".
 * 
 * 9     27/03/02 13:24 Nirm
 * - Code cleanup
 * 
 * 8     27/03/02 9:17 Nirm
 * - Added definition of KER_TICKS_PER_SECOND.
 * 
 * 7     25/03/02 21:28 Nirm
 * - Added Timers support;
 * - Removed unused functions.
 * 
 * 6     2/17/02 6:03p Tomasp
 * Code clean up.
 * 
 * 5     9/01/02 20:49 Nirm
 * Corrected Include-paths.
 * 
 * 4     9/01/02 10:13 Atai
 * remove C166 define
 * 
 * 3     8/01/02 16:24 Nirm
 * Corrected Include-Paths.
 * 
 * 2     25/12/01 15:34 Atai
 * Code cleaning
 **************************************************************************************** */

#include "Config.h"		// Global Configuration - do not remove!

#ifndef KER_API_H
#define KER_API_H

#include "Include\SysDefs.h"
#include "Kernel\uITRON\rtos.h"
#include "Kernel\Timers\Timers.h"


/////////////////////////////////////////////////////////////////////////////
// Constants and Enumerations

#define KER_TICKS_PER_SECOND	5

/////////////////////////////////////////////////////////////////////////////
// Structrues and Types

typedef unsigned EVENT;
typedef unsigned EVENT_CLASS;


/////////////////////////////////////////////////////////////////////////////
// Macros

#define k_ie_send(uEvent)				ie_send_ex(uEvent, 0)
#define k_ie_send_ex(uEvent, uParam)	ie_send_ex(uEvent, uParam)
#define ie_send(uEvent)					ie_send_ex(uEvent, 0)
#define ie_get(uEventClass)				ie_get_ex(uEventClass, NULL)


/////////////////////////////////////////////////////////////////////////////
// Public Services

void kernel_init(void);

BOOL ie_send_ex(EVENT uEvent, void *Param);
EVENT ie_get_ex(EVENT_CLASS i_uEventClass, void **o_pParamContainer);

void semaphore_set(ID semid);
void semaphore_clear(ID semid);
void sleep(unsigned long sec);
void usleep(unsigned long usec);

#endif // KER_API_H

⌨️ 快捷键说明

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