TCPIP_MAC_RES TCPIP_MAC_Process(TCPIP_MAC_HANDLE hMac) { if (OSAL_SEM_Pend(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore, OSAL_WAIT_FOREVER) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } TCPIP_MAC_RES res = (*((const TCPIP_MAC_DCPT*)hMac)->pObj->TCPIP_MAC_Process)(hMac); if (OSAL_SEM_Post(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } return res; }
TCPIP_MAC_RES TCPIP_MAC_PacketTx(TCPIP_MAC_HANDLE hMac, TCPIP_MAC_PACKET * ptrPacket) { if (OSAL_SEM_Pend(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore, OSAL_WAIT_FOREVER) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } TCPIP_MAC_RES res = (*((const TCPIP_MAC_DCPT*)hMac)->pObj->TCPIP_MAC_PacketTx)(hMac, ptrPacket); if (OSAL_SEM_Post(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } return res; }
TCPIP_MAC_PACKET* TCPIP_MAC_PacketRx(TCPIP_MAC_HANDLE hMac, TCPIP_MAC_RES* pRes, const TCPIP_MAC_PACKET_RX_STAT** ppPktStat) { if (OSAL_SEM_Pend(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore, OSAL_WAIT_FOREVER) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } TCPIP_MAC_PACKET* res = (*((const TCPIP_MAC_DCPT*)hMac)->pObj->TCPIP_MAC_PacketRx)(hMac, pRes, ppPktStat); if (OSAL_SEM_Post(((const TCPIP_MAC_DCPT*)hMac)->pObj->semaphore) != OSAL_RESULT_TRUE) { // SYS_DEBUG message } return res; }
void WDRV_SemGive(OSAL_SEM_HANDLE_TYPE *SemID) { OSAL_SEM_Post(SemID); }
// unlocks access to shared resources static __inline__ void __attribute__((always_inline)) _UserGblUnlock(void) { // Shared Data unlock OSAL_SEM_Post(&sSysTmrObject.userSem); }