/*
 * File: Master.h
 *
 * Real-Time Workshop code generated for Simulink model Master.
 *
 * Model version                        : 1.257
 * Real-Time Workshop file version      : 7.3  (R2009a)  15-Jan-2009
 * Real-Time Workshop file generated on : Tue May 21 16:11:30 2013
 * TLC version                          : 7.3 (Jan 18 2009)
 * C source code generated on           : Tue May 21 16:11:31 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                          |
 *--------------------------------------------------------------
 */

#ifndef RTW_HEADER_Master_h_
#define RTW_HEADER_Master_h_
#ifndef Master_COMMON_INCLUDES_
# define Master_COMMON_INCLUDES_
#include <math.h>
#include <string.h>
#include "rtwtypes.h"
#endif                                 /* Master_COMMON_INCLUDES_ */

#include "Master_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((void*) 0)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((void) 0)
#endif

#ifndef rtmGetStopRequested
# define rtmGetStopRequested(rtm)      ((void*) 0)
#endif

/* Block signals (auto storage) */
typedef struct {
  uint8_T RxInput4;                    /* '<Root>/Rx Input4' */
  uint8_T DataTypeConversion3;         /* '<Root>/Data Type Conversion3' */
  uint8_T RxInput;                     /* '<Root>/Rx Input' */
  uint8_T Tx;                          /* '<Root>/Embedded MATLAB Function3' */
  boolean_T D;                         /* '<Root>/Relatko' */
  boolean_T D_g;                       /* '<Root>/RS-485' */
  boolean_T D_l;                       /* '<Root>/Chart' */
} BlockIO_Master;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint8_T is_active_c1_Master;         /* '<Root>/Relatko' */
  uint8_T is_c1_Master;                /* '<Root>/Relatko' */
  uint8_T is_active_c2_Master;         /* '<Root>/RS-485' */
  uint8_T is_c2_Master;                /* '<Root>/RS-485' */
  uint8_T temporalCounter_i1;          /* '<Root>/RS-485' */
  uint8_T is_active_c3_Master;         /* '<Root>/Chart' */
  uint8_T is_c3_Master;                /* '<Root>/Chart' */
  uint8_T temporalCounter_i1_b;        /* '<Root>/Chart' */
} D_Work_Master;

/* Parameters (auto storage) */
struct Parameters_Master_ {
  uint8_T Constant_Value;              /* Computed Parameter: Value
                                        * '<Root>/Constant'
                                        */
  uint8_T Constant1_Value;             /* Computed Parameter: Value
                                        * '<Root>/Constant1'
                                        */
};

/* Block parameters (auto storage) */
extern Parameters_Master Master_P;

/* Block signals (auto storage) */
extern BlockIO_Master Master_B;

/* Block states (auto storage) */
extern D_Work_Master Master_DWork;

/* Model entry point functions */
extern void Master_initialize(boolean_T firstTime);
extern void Master_step(void);

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : Master
 * '<S1>'   : Master/Chart
 * '<S2>'   : Master/Embedded MATLAB Function1
 * '<S3>'   : Master/Embedded MATLAB Function2
 * '<S4>'   : Master/Embedded MATLAB Function3
 * '<S5>'   : Master/RS-485
 * '<S6>'   : Master/Relatko
 * '<S7>'   : Master/Simulink Configuration
 * '<S8>'   : Master/Tx USB
 */
#endif                                 /* RTW_HEADER_Master_h_ */

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