% var moduleName = "rtdma2"
% var module = system.modules['/driverlib/' + moduleName + '.js'];
% let Common = system.getScript("/driverlib/Common.js");
//*****************************************************************************
//
// RTDMA2 Configurations
//
//*****************************************************************************
%   if (Common.isContextCPU1())
%   {
void RTDMA2_global_init();
%   }
%if (module != null)
%{
% var stat = module.$static
% for(var i = 0; i < module.$instances.length; i++) {
    % var instance = module.$instances[i];
        % if (instance.srcAddressInputMode == "MANUAL") {
#define `instance.$name`_SRCADDRESS `instance.srcAddressManual` 
        % } if (instance.destAddressInputMode == "MANUAL") {
#define `instance.$name`_DESTADDRESS `instance.destAddressManual` 
        % }
        % if (instance.srcAddressInputMode == "VARIABLE") {
extern const void *`instance.srcAddressVariable`;
        % } if (instance.destAddressInputMode == "VARIABLE") {
extern const void *`instance.destAddressVariable`;
        % }
#define `instance.$name`_BASE `instance.chBase`
#define `instance.$name`_BURSTSIZE `instance.burstSize`U
#define `instance.$name`_TRANSFERSIZE `instance.transferSize`U
void `instance.$name`_init();

    % }
% }