serial_os.h
2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
*********************************************************************************************************
* SERIAL (BYTE) COMMUNICATION
*
* (c) Copyright 2007-2009; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international copyright laws.
* Knowledge of the source code may NOT be used to develop a similar product.
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* SERIAL (BYTE) COMMUNICATION
*
* OPERATING SYSTEM LAYER
*
* Filename : serial_os.h
* Version : V2.00
* Programmer(s) : FGK
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
void SerialOS_Init (SERIAL_ERR *perr); /* Initialize OS layer. */
void *SerialOS_SemCreate (CPU_INT16U cnt); /* Create semaphore. */
void SerialOS_SemDel (void *psem); /* Delete semaphore. */
CPU_BOOLEAN SerialOS_SemTryLock(void *psem); /* Try to acquire semaphore if available. */
void SerialOS_SemWait (void *psem, /* Wait for semaphore to become available. */
CPU_INT32U timeout_ms,
SERIAL_ERR *perr);
CPU_BOOLEAN SerialOS_SemSignal (void *psem); /* Signal semaphore. */