Philips Bluetooth QuickStart Kit GPS Receiver User Manual


 
Bluetooth QuickStart Kit Version 1.0 - User’s Guide Page 32
Copyright 2004-2005 © Embedded Artists AB
Returns:
TRUE if semaphore was taken and FALSE if timeout or error.
Possible error situations (what can be identified in an error code):
OS_OK - The function completed successfully.
OS_ERROR_ISR - The function was called from an interrupt
service routine.
OS_ERROR_NULL - A NULL pointer was supplied to the
function where it was not allowed.
B.1.4 osSemGive
void osSemGive( tCntSem* pSem )
This function gives a counting semaphore, i.e. increases the semaphore counter. If there
are one or more processes waiting for the semaphore the process with highest priority is
made ready to run.
Parameters:
[in] pSem - A pointer to an initialized semaphore structure.
Possible error situations (what can be identified in an error code):
OS_OK - The function completed successfully.
OS_ERROR_NULL - A NULL pointer was supplied to the
function where it was not allowed.
B.1.5 osSemTryTake
tU8 osSemTryTake( tCntSem* pSem )
This function tries to take a counting semaphore. If the semaphore cannot be taken the
function immediately returns instead of blocking. This function can be used from an ISR
(interrupt service routine).
Parameters:
[in] pSem - A pointer to an initialized semaphore structure.
Returns:
0 if the semaphore was taken, else 1.
Possible error situations (what can be identified in an error code):
OS_OK - The function completed successfully.
OS_ERROR_NULL - A NULL pointer was supplied to the
function where it was not allowed.
B.1.6 osSleep
void osSleep( tU32 ticks )
This function puts a process to sleep for the specified number of ticks.
Parameters:
[in] ticks - The number of ticks to put the process to sleep.