/*
 * File: Merici_jednotka_main.c
 *
 * Real-Time Workshop code generated for Simulink model Merici_jednotka.
 *
 * Model version                        : 1.194
 * Real-Time Workshop file version      : 7.3  (R2009a)  15-Jan-2009
 * Real-Time Workshop file generated on : Tue May 21 16:17:24 2013
 * TLC version                          : 7.3 (Jan 18 2009)
 * C source code generated on           : Tue May 21 16:17:25 2013
 *--------------------------------------------------------------
 *   Embedded Coder for Microchip dsPIC family.                 |
 *   Generate .c and .h files from your Matlab/simulink model   |
 *   and compile the diagram to .hex and .coff file that can be |
 *   downloaded directly into the microcontroller               |
 *                                                              |
 * Licence Accorded to Ing. Robert Grepl, Ph.D.                 |
 *                     Technical University Brno                |
 *                                                              |
 *   Written by Lubin KERHUEL -  http://www.kerhuel.eu          |
 *  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
 *   Version 3.5                               27-Apr-2011      |
 *   For Matlab 7.8             R2009a                          |
 *--------------------------------------------------------------
 */

#include "Merici_jednotka.h"
#include "Merici_jednotka_private.h"

_FOSC(CSW_FSCM_OFF & FRC_PLL4)
  _FWDT(WDT_OFF)
  _FBORPOR(PBOR_OFF & PWRT_OFF & MCLR_DIS)
  _FGS(CODE_PROT_OFF)
  _FICD( ICS_PGD1 )
  void rt_OneStep()
{
  /* Disable interrupts here */

  /* Save FPU context here (if necessary) */
  /* Re-enable timer or interrupt here */
  Merici_jednotka_step();

  /* Get model outputs here */

  /* Disable interrupts here */
  /* Restore FPU context here (if necessary) */
  /* Enable interrupts here */
}

int main(void)
{
  /* Initialize model */
  Merici_jednotka_initialize(1);
  for (;;) {
    /* Associate rt_OneStep() with a timer that executes at the base rate of the model */
    while (!_T1IF) ;
    _T1IF = 0;
    rt_OneStep();
  }
}

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