Philips Bluetooth QuickStart Kit GPS Receiver User Manual


 
Bluetooth QuickStart Kit Version 1.0 - User’s Guide Page 36
Copyright 2004-2005 © Embedded Artists AB
Parameters:
[in] pSem - A pointer to an initialized semaphore structure.
[in] timeout - After timeout ticks the operation will timeout. If a timeout of zero is
specified the function will never timeout.
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.19 osBinSemGive
void osBinSemGive( tBinSem* pSem )
This function gives (releases) a binary semaphore. If another process is waiting for the
semaphore it is inserted into the ready list. If more than one process is waiting for the
semaphore the one with the highest priority is inserted.
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_SEM_OVERRUN - The semaphore is already given.
OS_ERROR_NULL - A NULL pointer was supplied to the function where it was
not allowed.
B.1.20 osBinSemTryTake
tU8 osBinSemTryTake( tBinSem* pSem )
This function tries to take a binary semaphore. If the semaphore cannot be taken the
function immediately returns without 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_ERROR_NULL - A NULL pointer was supplied to the function where it was
not allowed.
B.1.21 m_os_ena_int