Defines | Functions

IpcHost.h File Reference


Detailed Description

This file contains APIs and defines that are used by applications only on the host-side of the device.

Remarks:
The typical flow for an IPC-using application is to first load the processor (typically via slaveloader or the ProcMgr APIs), and then use the Ipc_control() API to attach/detach from the running slave.
Example:
      // invoke the SysLink load callback
      remoteProcId = MultiProc_getId("DSP");
      status = Ipc_control(remoteProcId, Ipc_CONTROLCMD_LOADCALLBACK, NULL);

      // invoke the SysLink start callback
      status = Ipc_control(remoteProcId, Ipc_CONTROLCMD_STARTCALLBACK, NULL);

      // IPC is established, app-specific code is here

      // invoke the SysLink stop callback
      status = Ipc_control(remoteProcId, Ipc_CONTROLCMD_STOPCALLBACK, NULL);

Go to the source code of this file.

Defines

#define Ipc_CONTROLCMD_LOADCALLBACK   (0xBABE0000)
 Control command ID for load callback.
#define Ipc_CONTROLCMD_STARTCALLBACK   (0xBABE0001)
 Control command ID for start callback.
#define Ipc_CONTROLCMD_STOPCALLBACK   (0xBABE0002)
 Control command ID for stop callback.

Functions

Int Ipc_control (UInt16 procId, Int32 cmdId, Ptr arg)
 Perform IPC-related control operations with a specific slave.

Define Documentation

#define Ipc_CONTROLCMD_LOADCALLBACK   (0xBABE0000)

Control command ID for load callback.

Remarks:
This command must be sent (via Ipc_control()) before using IPC with the slave, and after loading the slave.
This call ensures resources (e.g. Shared Region 0) are visible to the slave (for example, by enabling the slave-side MMU). This call then typically enables the slave-side call to Ipc_start() to succeed.
When ProcMgr is used to load the slave (the typical case), the arg passed to Ipc_control() should be NULL.
When ProcMgr is not used to load the slave (supported, but not the typical case), the arg passed to Ipc_control() must be the slave-side address of the _Ipc_ResetVector symbol. This is often obtained by inspecting the slave-side executable's .map file.
See also:
Ipc_control()
#define Ipc_CONTROLCMD_STARTCALLBACK   (0xBABE0001)

Control command ID for start callback.

Remarks:
This command must be sent (via Ipc_control()) before using IPC with the slave, and after sending the Ipc_CONTROLCMD_LOADCALLBACK command.
This call performs a handshake with the slave processor, typically enabling the slave-side call to Ipc_attach() to succeed.
When sending this command, the arg passed to Ipc_control() should be NULL.
See also:
Ipc_control()
#define Ipc_CONTROLCMD_STOPCALLBACK   (0xBABE0002)

Control command ID for stop callback.

Remarks:
This command must be sent (via Ipc_control()) to detach from an attached slave.
This call first performs a handshake with the slave processor, typically enabling the slave-side calls to Ipc_detach() and Ipc_stop() to succeed. It then may make resources (e.g. Shared Region 0) inaccessible to the slave (for example by disabling the slave's MMU).
When ProcMgr is used to load the slave (the typical case), the arg passed to Ipc_control() should be NULL.
When ProcMgr is not used to load the slave (supported, but not the typical case), the arg passed to Ipc_control() must be the slave-side address of the _Ipc_ResetVector symbol. This is often obtained by inspecting the slave-side executable's .map file.
See also:
Ipc_control()

Function Documentation

Int Ipc_control ( UInt16  procId,
Int32  cmdId,
Ptr  arg 
)

Perform IPC-related control operations with a specific slave.

Parameters:
[in]procIdRemote processor ID
[in]cmdIdCommand ID
[in]argArgument. The value of arg depends on the command being sent in cmdId.
Remarks:
Each specific cmdId describes its usage of the arg param.
See also:
Ipc_CONTROLCMD_LOADCALLBACK
Ipc_CONTROLCMD_STARTCALLBACK
Ipc_CONTROLCMD_STOPCALLBACK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated