DSMCC
15.3.1
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00024 // pre-processor mechanism so multiple inclusions don't cause compilation error 00025 #ifndef _STB_OS_H 00026 #define _STB_OS_H 00027 00028 #include "techtype.h" 00029 00030 //---Constant and macro definitions for public use----------------------------- 00031 00032 // timeouts for queues, semaphores etc 00033 #define TIMEOUT_NOW 0 00034 #define TIMEOUT_NEVER 0xffff 00035 00036 //---Enumerations for public use----------------------------------------------- 00037 00038 //---Global type defs for public use------------------------------------------- 00039 00040 //---Global Function prototypes for public use--------------------------------- 00041 00046 U32BIT STB_OSGetClockMilliseconds(void); 00047 00060 void* STB_OSCreateTask(void (*function)(void *), void *param, U32BIT stack, U8BIT priority, U8BIT *name); 00061 00066 void STB_OSTaskDelay(U16BIT timeout); 00067 00072 void STB_OSDestroyTask(void *task); 00073 00080 void* STB_OSCreateQueue(U16BIT msg_size, U16BIT msg_max); 00081 00090 BOOLEAN STB_OSReadQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout); 00091 00100 BOOLEAN STB_OSWriteQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout); 00101 00107 BOOLEAN STB_OSDestroyQueue(void *queue); 00108 00113 void* STB_OSCreateSemaphore(void); 00114 00120 void* STB_OSCreateCountSemaphore(U32BIT value); 00121 00127 void STB_OSSemaphoreWait(void *semaphore); 00128 00133 void STB_OSSemaphoreSignal(void *semaphore); 00134 00141 BOOLEAN STB_OSSemaphoreWaitTimeout(void *semaphore, U16BIT timeout); 00142 00148 void STB_OSDeleteSemaphore(void *semaphore); 00149 00154 void* STB_OSCreateMutex(void); 00155 00160 void STB_OSMutexLock(void *mutex); 00161 00166 void STB_OSMutexUnlock(void *mutex); 00167 00172 void STB_OSDeleteMutex(void *mutex); 00173 00174 #endif // _PM_OS_H 00175