Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
osp.h
Package: ST_5105DTV.rar [view]
Upload User: fy98168
Upload Date: 2015-06-26
Package Size: 13771k
Code Size: 2k
Category:
DVD
Development Platform:
C/C++
- #ifndef __OSP_H__
- #define __OSP_H__
- #include "gendef.h"
- typedef enum
- {
- Ret_OK,
- Ret_NoMem,
- Ret_ParErr,
- Ret_Timeout,
- Ret_Fail
- }KB_OSPRet;
- typedef enum
- {
- KB_Wait,
- KD_NoWait
- }KB_OSPWaitMode;
- typedef enum
- {
- J_OSP_WAIT_FIFO,
- J_OSP_WAIT_PRIO
- }KB_OSPQueMode;
- typedef struct
- {
- UINT32 Word1;
- UINT32 Word2;
- UINT32 Word3;
- UINT32 Word4;
- }KB_OSPMsgNode;
- typedef struct T_TaskInfo_st OSP_TaskInfo;
- struct T_TaskInfo_st
- {
- task_t *pTask;
- tdesc_t *pTaskDesc;
- UINT8 *pTaskStack;
- OSP_TaskInfo *pNext;
- };
- typedef struct T_QueueInfo_st T_OSP_QueueInfo;
- struct T_QueueInfo_st
- {
- message_queue_t *pQueueId;
- void *pQueueBuf;
- T_OSP_QueueInfo *pNext;
- };
- #ifdef ST_OS21
- #define MS_TO_TICKS(X) ((X)*(time_ticks_per_sec()/1000))
- #else
- #define MS_TO_TICKS(X) ((X)*(ST_GetClocksPerSecond()/1000))
- #endif
- KB_OSPRet KB_OSPInit(void);
- KB_OSPRet KB_OSPTaskInit(const char* pName,UINT32 dStackSize,void (*entryPoint)(void*),
- INT32 dPriority,void *pPara,UINT32 *pTaskId);
- KB_OSPRet KB_OSPTaskDel(UINT32 dTaskId);
- KB_OSPRet KB_OSPTaskSetPri(UINT32 dTaskId, INT32 dPriority);
- UINT32 KB_OSPTaskGetID(void);
- KB_OSPRet KB_OSPTaskDelay(UINT32 dMilliSeconds);
- KB_OSPRet KB_OSPTaskSus(UINT32 dTaskId);
- KB_OSPRet KB_OSPTaskRes(UINT32 dTaskId);
- KB_OSPRet KB_OSPQueInit(const char* pName,UINT32 dMaxMessages,UINT32 *pQueueId);
- KB_OSPRet KB_OSPSemDel(UINT32 nSemId);
- KB_OSPRet KB_OSPQueDel(UINT32 nQueID);
- KB_OSPRet KB_OSPMsgSend(UINT32 nQueID,KB_OSPMsgNode *pMsgNode);
- KB_OSPRet KB_OSPSemSet(UINT32 nSemId);
- KB_OSPRet KB_OSPMsgGet(UINT32 nQueID,KB_OSPWaitMode nWaitMode,UINT32 nTime,KB_OSPMsgNode *pMsgNode);
- KB_OSPRet KB_OSPSemInit(const char* pName,UINT32 nSemMax,KB_OSPQueMode nQueMode,UINT32 *pSemID);
- KB_OSPRet KB_OSPSemGet(UINT32 nSemId,KB_OSPWaitMode nWaitMode,UINT32 nTime);
- void* KB_OSPMalloc(UINT32 dSize);
- KB_OSPRet KB_OSPFree(void *pFree);
- void InserQueueNode(T_OSP_QueueInfo *node);
- #endif
- /*EOF*/