% var moduleName = "fsitx"
% var module = system.modules['/driverlib/' + moduleName + '.js'];
%if (module != null)
%{
//*****************************************************************************
//
// FSITX Configurations
//
//*****************************************************************************
    % for(var i = 0; i < module.$instances.length; i++) {
        % var instance = module.$instances[i];
        % let modInst  = instance[moduleName];
        % let solution    = modInst.$solution;
        %let peripheral  = system.deviceData.peripherals[solution.peripheralName];
//
// Tx Defines
// Pointer to be declared in example code before use
//
#define `instance.$name`_BASE `peripheral.name`_BASE
#define `instance.$name`_PRESCALER_VAL `instance.clkPres`
#define `instance.$name`_nWords `instance.softwareFrameSize`
    % if (instance.useDMATX) {
#define `instance.fsiTXDMAData.$name`_TRIGGER DMA_TRIGGER_`peripheral.name`
#define `instance.fsiTXDMAInfo.$name`_TRIGGER DMA_TRIGGER_`peripheral.name`  
#define `instance.fsiTXDMAData.destAddressLinked` ((uint16_t *)(`peripheral.name`_BASE + FSI_O_TX_BUF_BASE(0)))
#define `instance.fsiTXDMAInfo.destAddressLinked` ((uint16_t *)(`peripheral.name`_BASE + FSI_O_TX_FRAME_TAG_UDATA))
    % }
void `instance.$name`_init();
    % }
%}