/* Reads either a 16- or 32-bit data word from the Local CPU system address */
void IPCLiteRtoLDataRead(uint32_t ulFlag, uint32_t ulStatusFlag)
/* Reads either a 16- or 32-bit data word from the Local CPU system address */
void IPCLiteRtoLDataRead(uint32_t ulFlag, uint32_t ulStatusFlag)
{
    uint32_t* pulRAddress;
    uint16_t* pusRAddress;
    while (!(IpcRegs.IPCSTS.all & ulFlag))
    {
    }
    if (IpcRegs.IPCRECVCOM == IPC_DATA_READ_16)
    {
        pusRAddress = (uint16_t *)IpcRegs.IPCRECVADDR;
        IpcRegs.IPCLOCALREPLY = (uint32_t)(*pusRAddress);
        IpcRegs.IPCACK.all |= (ulStatusFlag | ulFlag);
    }
    else if (IpcRegs.IPCRECVCOM == IPC_DATA_READ_32)
    {
        pulRAddress = (uint32_t *)IpcRegs.IPCRECVADDR;
        IpcRegs.IPCLOCALREPLY = *pulRAddress;
        IpcRegs.IPCACK.all |= (ulStatusFlag | ulFlag);
    }
    else
    {
        IpcRegs.IPCACK.all |= (ulFlag);
    }
}