os_types.h

来自「是一个手机功能的模拟程序」· C头文件 代码 · 共 78 行

H
78
字号
/* 
+------------------------------------------------------------------------------
|  File:       os_types.h
+------------------------------------------------------------------------------
|  Copyright 2002 Texas Instruments Berlin, AG 
|                 All rights reserved. 
| 
|                 This file is confidential and a trade secret of Texas 
|                 Instruments Berlin, AG 
|                 The receipt of or possession of this file does not convey 
|                 any rights to reproduce or disclose its contents or to 
|                 manufacture, use, or sell anything it may describe, in 
|                 whole, or in part, without the specific written consent of 
|                 Texas Instruments Berlin, AG. 
+----------------------------------------------------------------------------- 
|  Purpose :  Definitions for the Nucleus OS adaptation layer
+----------------------------------------------------------------------------- 
*/ 

#ifndef OS_TYPES_H
#define OS_TYPES_H

/*==== INCLUDES =============================================================*/

#include "nucleus.h"

/*==== CONSTANTS ============================================================*/

/*==== TYPES ================================================================*/
 
#define OS_TASK_TABLE_ENTRY_SIZE     (NU_TASK_SIZE + 7)
#define OS_COM_TABLE_ENTRY_SIZE      ((2*NU_SEMAPHORE_SIZE) + (3*OS_MAX_PRIORITY) + 10)
#define OS_TIM_TABLE_ENTRY_SIZE      (8)
#define OS_SEM_TABLE_ENTRY_SIZE      (NU_SEMAPHORE_SIZE + 2)
#define OS_PCB_TABLE_ENTRY_SIZE      (NU_PARTITION_POOL_SIZE)

typedef enum 
{ 
  SYSTEM_TICK_TDMA_FRAME = 1,
  SYSTEM_TICK_10_MS
} T_OS_SYSTEM_TICK;

#ifndef CONFIG_MODULE

#include "os_ctrl.h" 

#else

typedef struct
{
  ULONG Entry [ OS_TASK_TABLE_ENTRY_SIZE ];
} T_OS_TASK_TABLE_ENTRY;

typedef struct
{
  ULONG Entry [ OS_COM_TABLE_ENTRY_SIZE ];
} T_OS_COM_TABLE_ENTRY;

typedef struct
{
  ULONG next_t_handle;
  ULONG Entry [ OS_TIM_TABLE_ENTRY_SIZE ];
} T_OS_TIMER_ENTRY;

typedef struct
{
  ULONG Entry [ OS_SEM_TABLE_ENTRY_SIZE ];
} T_OS_SEM_TABLE_ENTRY;

typedef struct
{
  ULONG Entry [ OS_PCB_TABLE_ENTRY_SIZE ];
} T_OS_PCB_TABLE_ENTRY;

#endif

#endif

⌨️ 快捷键说明

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