/* Calls a Remote CPU function with 1 optional parameter and an optional return value. */
uint16_t IPCLiteLtoRFunctionCall(uint32_t ulFlag, uint32_t ulAddress, uint32_t ulParam, uint32_t ulStatusFlag)
/* Calls a Remote CPU function with 1 optional parameter and an optional return value. */
uint16_t IPCLiteLtoRFunctionCall(uint32_t ulFlag, uint32_t ulAddress, uint32_t ulParam, uint32_t ulStatusFlag)
{
    uint16_t returnStatus;
    if (IpcRegs.IPCFLG.all & (ulFlag | ulStatusFlag))
    {
        returnStatus = STATUS_FAIL;
    }
    else
    {
        IpcRegs.IPCSENDCOM = IPC_FUNC_CALL;
        IpcRegs.IPCSENDADDR = ulAddress;
        IpcRegs.IPCSENDDATA = ulParam;
        IpcRegs.IPCSET.all |= (ulFlag | ulStatusFlag);
        returnStatus = STATUS_PASS;
    }
    return returnStatus;
}