/* Reads single word data result of Local to Remote IPC command */
uint16_t IPCLiteLtoRGetResult(void *pvData, uint16_t usLength, uint32_t ulStatusFlag)
/* Reads single word data result of Local to Remote IPC command */
uint16_t IPCLiteLtoRGetResult(void *pvData, uint16_t usLength, uint32_t ulStatusFlag)
{
    uint16_t returnStatus;
    if (IpcRegs.IPCFLG.all & ulStatusFlag)
    {
        returnStatus = STATUS_FAIL;
    }
    else
    {
        if (usLength == IPC_LENGTH_16_BITS)
        {
            *(uint16_t *)pvData = IpcRegs.IPCREMOTEREPLY;
        }
        else if (usLength == IPC_LENGTH_32_BITS)
        {
            *(uint32_t *)pvData =  IpcRegs.IPCREMOTEREPLY;
        }
        returnStatus = STATUS_PASS;
    }
    return returnStatus;
}