module ti.sdo.ipc.family.f28m35x.NotifyDriverCirc

Shared memory driver using circular buffer for F28M35x devices

This is a ti.sdo.ipc.Notify driver that utilizes shared memory and inter-processor hardware interrupts for notification between cores. [ more ... ]
C synopsis target-domain sourced in ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.xdc
#include <ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.h>
Functions
Void
SizeT 
Functions common to all INotifyDriver modules
Void 
Void 
Void 
Void 
Void 
Int 
NotifyDriverCirc_sendEvent// Send a signal to an event(NotifyDriverCirc_Handle handle, UInt32 eventId, UInt32 payload, Bool waitClear);
Void 
Functions common to all target instances
Functions common to all target modules
Typedefs
typedef struct
typedef struct
typedef struct
Constants
extern const Assert_Id 
 
DETAILS
This is a ti.sdo.ipc.Notify driver that utilizes shared memory and inter-processor hardware interrupts for notification between cores.
This driver is designed to work with only F28M35x family of devices. This module needs to be plugged with an appropriate module that implements the ti.sdo.ipc.notifyDrivers.IInterrupt interface for a given device.
The driver utilizes shared memory in the manner indicated by the following diagram.
  
  NOTE: Processor '0' corresponds to the M3 and '1' corresponds to the C28

 sharedAddr -> --------------------------- bytes
               |  eventEntry0  (0)       | 8  
               |  eventEntry1  (0)       | 8
               |  ...                    | 
               |  eventEntry15 (0)       | 8
               |                         |
               |-------------------------|
               |  eventEntry16 (0)       | 8
               |  eventEntry17 (0)       | 8
               |  ...                    | 
               |  eventEntry31 (0)       | 8
               |                         |
               |-------------------------|
               |  putWriteIndex (0)      | 4
               |                         |
               |-------------------------|
               |  getReadIndex (1)       | 4
               |                         |
               |-------------------------|
               |  eventEntry0  (1)       | 8  
               |  eventEntry1  (1)       | 8
               |  ...                    | 
               |  eventEntry15 (1)       | 8
               |                         |
               |-------------------------|
               |  eventEntry16 (1)       | 8
               |  eventEntry17 (1)       | 8
               |  ...                    | 
               |  eventEntry31 (1)       | 8
               |                         |
               |-------------------------|
               |  putWriteIndex (1)      | 4
               |                         |
               |-------------------------|
               |  getReadIndex (0)       | 4
               |                         |
               |-------------------------|


  Legend:
  (0), (1) : belongs to the respective processor

 
config NotifyDriverCirc_A_notSupported  // module-wide

Assert raised when trying to use Notify_[enable/disable]Event with NotifyDriverCirc

C synopsis target-domain
extern const Assert_Id NotifyDriverCirc_A_notSupported;
 
 
NotifyDriverCirc_sharedMemReq()  // module-wide

Amount of shared memory required for creation of each instance

C synopsis target-domain
SizeT NotifyDriverCirc_sharedMemReq(NotifyDriverCirc_Params *params);
 
ARGUMENTS
params — Pointer to parameters that will be used in the create
RETURNS
Number of MAUs in shared memory needed to create the instance.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId NotifyDriverCirc_Module_id();
// Get this module's unique id
 
Bool NotifyDriverCirc_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle NotifyDriverCirc_Module_heap();
// The heap from which this module allocates memory
 
Bool NotifyDriverCirc_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 NotifyDriverCirc_Module_getMask();
// Returns the diagnostics mask for this module
 
Void NotifyDriverCirc_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct NotifyDriverCirc_Object NotifyDriverCirc_Object;
// Opaque internal representation of an instance object
 
typedef NotifyDriverCirc_Object *NotifyDriverCirc_Handle;
// Client reference to an instance object
 
typedef struct NotifyDriverCirc_Struct NotifyDriverCirc_Struct;
// Opaque client structure large enough to hold an instance object
 
NotifyDriverCirc_Handle NotifyDriverCirc_handle(NotifyDriverCirc_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
NotifyDriverCirc_Struct *NotifyDriverCirc_struct(NotifyDriverCirc_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct NotifyDriverCirc_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
    Ptr readAddr;
    // Address in shared memory where buffer is placed
    Ptr writeAddr;
    // Address in shared memory where buffer is placed
} NotifyDriverCirc_Params;
 
Void NotifyDriverCirc_Params_init(NotifyDriverCirc_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
 
config NotifyDriverCirc_readAddr  // instance

Address in shared memory where buffer is placed

C synopsis target-domain
      ...
    Ptr readAddr;
 
DETAILS
Use sharedMemReq to determine the amount of shared memory required.
 
config NotifyDriverCirc_writeAddr  // instance

Address in shared memory where buffer is placed

C synopsis target-domain
      ...
    Ptr writeAddr;
 
DETAILS
Use sharedMemReq to determine the amount of shared memory required.
 
NotifyDriverCirc_disable()  // instance

Disable a NotifyDriver instance

C synopsis target-domain
Void NotifyDriverCirc_disable(NotifyDriverCirc_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
DETAILS
Disables the ability of a Notify driver to receive events for a given processor. This interface function is called by the Notify_disable function. Refer to its documentation for more details.
 
NotifyDriverCirc_disableEvent()  // instance

Disable an event

C synopsis target-domain
Void NotifyDriverCirc_disableEvent(NotifyDriverCirc_Handle handle, UInt32 eventId);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
eventId — Number of event to disable
DETAILS
This interface function is called by the Notify_disableEvent function. Refer to its documentation for more details.
The Notify module does validation of the eventId. The Notify module enters calls this function within the Notify module gate.
 
NotifyDriverCirc_enable()  // instance

Enable a NotifyDriver instance

C synopsis target-domain
Void NotifyDriverCirc_enable(NotifyDriverCirc_Handle handle);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
DETAILS
Enables the ability of a Notify driver to receive events for a given processor. This interface function is called by the Notify_restore function. Refer to its documentation for more details.
 
NotifyDriverCirc_enableEvent()  // instance

Enable an event

C synopsis target-domain
Void NotifyDriverCirc_enableEvent(NotifyDriverCirc_Handle handle, UInt32 eventId);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
eventId — Number of event to enable
DETAILS
This interface function is called by the Notify_disableEvent function. Refer to its documentation for more details.
The Notify module does validation of the eventId. The Notify module enters calls this function within the Notify module gate.
 
NotifyDriverCirc_registerEvent()  // instance

Register a callback to an event

C synopsis target-domain
Void NotifyDriverCirc_registerEvent(NotifyDriverCirc_Handle handle, UInt32 eventId);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
eventId — Number of event that is being registered
DETAILS
This driver function is called by the Notify_registerEvent function within the Notify module gate. Refer to its documentation for more details.
 
NotifyDriverCirc_sendEvent()  // instance

Send a signal to an event

C synopsis target-domain
Int NotifyDriverCirc_sendEvent(NotifyDriverCirc_Handle handle, UInt32 eventId, UInt32 payload, Bool waitClear);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
eventId — Number of event to signal
payload — Payload (optional) to pass to callback function
waitClear — If TRUE, have the NotifyDriver wait for acknowledgement back from the destination processor.
RETURNS
Notify status
DETAILS
This interface function is called by the Notify_sendEvent function. Notify_sendEvent does not provide any context protection for INotifyDriver_sendEvent, so appropriate measures must be taken within the driver itself.
 
NotifyDriverCirc_unregisterEvent()  // instance

Remove an event listener from an event

C synopsis target-domain
Void NotifyDriverCirc_unregisterEvent(NotifyDriverCirc_Handle handle, UInt32 eventId);
 
ARGUMENTS
handle — handle of a previously-created NotifyDriverCirc instance object
eventId — Number of event that is being unregistered
DETAILS
This driver function is called by the Notify_unregisterEvent function within the Notify module gate. Refer to it for more details.
Instance Convertors

C synopsis target-domain
INotifyDriver_Handle NotifyDriverCirc_Handle_upCast(NotifyDriverCirc_Handle handle);
// unconditionally move one level up the inheritance hierarchy
 
NotifyDriverCirc_Handle NotifyDriverCirc_Handle_downCast(INotifyDriver_Handle handle);
// conditionally move one level down the inheritance hierarchy; NULL upon failure
Instance Built-Ins

C synopsis target-domain
Int NotifyDriverCirc_Object_count();
// The number of statically-created instance objects
 
NotifyDriverCirc_Handle NotifyDriverCirc_Object_get(NotifyDriverCirc_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
NotifyDriverCirc_Handle NotifyDriverCirc_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
NotifyDriverCirc_Handle NotifyDriverCirc_Object_next(NotifyDriverCirc_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle NotifyDriverCirc_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *NotifyDriverCirc_Handle_label(NotifyDriverCirc_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String NotifyDriverCirc_Handle_name(NotifyDriverCirc_Handle handle);
// The name of this instance object
 
XDCscript usage meta-domain sourced in ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.xdc
var NotifyDriverCirc = xdc.useModule('ti.sdo.ipc.family.f28m35x.NotifyDriverCirc');
module-wide config parameters
        msg: "A_notSupported: [enable/disable]Event not supported by NotifyDriverCirc"
    };
 
per-instance config parameters
    var params = new NotifyDriverCirc.Params// Instance config-params object;
 
 
config NotifyDriverCirc.A_notSupported  // module-wide

Assert raised when trying to use Notify_[enable/disable]Event with NotifyDriverCirc

XDCscript usage meta-domain
NotifyDriverCirc.A_notSupported = Assert.Desc {
    msg: "A_notSupported: [enable/disable]Event not supported by NotifyDriverCirc"
};
 
C SYNOPSIS
 
metaonly config NotifyDriverCirc.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
NotifyDriverCirc.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config NotifyDriverCirc.rovViewInfo  // module-wide
XDCscript usage meta-domain
NotifyDriverCirc.rovViewInfo = ViewInfo.Instance ViewInfo.create;
 
Instance Config Parameters

XDCscript usage meta-domain
var params = new NotifyDriverCirc.Params;
// Instance config-params object
    params.readAddr = Ptr null;
    // Address in shared memory where buffer is placed
    params.writeAddr = Ptr null;
    // Address in shared memory where buffer is placed
 
config NotifyDriverCirc.readAddr  // instance

Address in shared memory where buffer is placed

XDCscript usage meta-domain
var params = new NotifyDriverCirc.Params;
  ...
params.readAddr = Ptr null;
 
DETAILS
Use sharedMemReq to determine the amount of shared memory required.
C SYNOPSIS
 
config NotifyDriverCirc.writeAddr  // instance

Address in shared memory where buffer is placed

XDCscript usage meta-domain
var params = new NotifyDriverCirc.Params;
  ...
params.writeAddr = Ptr null;
 
DETAILS
Use sharedMemReq to determine the amount of shared memory required.
C SYNOPSIS
generated on Sat, 11 Feb 2012 00:37:52 GMT