/*
 * File: ISR_functions.c
 *
 * Real-Time Workshop code generated for Simulink model Test_1.
 *
 * Model version                        : 1.29
 * Real-Time Workshop file version      : 6.3  (R14SP3)  26-Jul-2005
 * Real-Time Workshop file generated on : Thu Sep 25 20:48:24 2008
 * TLC version                          : 6.3 (Aug  5 2005)
 * C source code generated on           : Thu Sep 25 20:48:24 2008
 */

#include "RAppID_Blockset.h"

/* ISR processing of ESCI Transmit Data*/
void irq_DMA_eSCI_A_TX_handler(void)
{
  uint32_t buff_start_addr, num_items;

  update_tail_idx(&tx_buffers[esci_mod_A]);
  num_items = get_num_items_to_send(&tx_buffers[esci_mod_A]);

  /* There is more data to send */
  if (num_items > 0)
  {
    buff_start_addr = get_data_start_address(&tx_buffers[esci_mod_A]);
    if(!esci_check_9bit_fnc(esci_mod_A))
    {
      esci_dma_data_update_fcn(esci_mod_A,num_items, buff_start_addr);
    }
    else
    {
      esci_dma_9bit_data_update_fcn(esci_mod_A,num_items, buff_start_addr);
    }
  }
  else
  {
    clear_dma_esci_interrupt_flag_fnc(1);
    tx_in_progress_flags[esci_mod_A] = 0;
  }
}

/* File trailer for Real-Time Workshop generated code.
 *
 * [EOF]
 */
