⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c2812pwmtest.h

📁 由MATLAB生成的PWM的源代码
💻 H
字号:
/*
 * File: c2812pwmtest.h
 *
 * Real-Time Workshop code generated for Simulink model c2812pwmtest.
 *
 * Model version                        : 1.102
 * Real-Time Workshop file version      : 6.3  (R14SP3)  26-Jul-2005
 * Real-Time Workshop file generated on : Sat Dec 13 20:42:50 2008
 * TLC version                          : 6.3 (Aug  5 2005)
 * C source code generated on           : Sat Dec 13 20:42:51 2008
 */

#ifndef _RTW_HEADER_c2812pwmtest_h_
#define _RTW_HEADER_c2812pwmtest_h_

#ifndef _c2812pwmtest_COMMON_INCLUDES_
# define _c2812pwmtest_COMMON_INCLUDES_
#include <math.h>
#include <float.h>
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "DSP281x_Device.h"
#include "rt_nonfinite.h"
#endif                                  /* _c2812pwmtest_COMMON_INCLUDES_ */

#include "c2812pwmtest_types.h"

/* Macros for accessing real-time model data structure  */

#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
#endif

/* Block states (auto storage) for system: '<Root>' */
typedef struct {
  int32_T clockTickCounter;             /* '<S2>/Pulse Generator' */
} D_Work_c2812pwmtest;

/* Parameters (auto storage) */
struct _Parameters_c2812pwmtest {
  real_T PulseGenerator_Amp;            /* Expression: 16000
                                         * '<S2>/Pulse Generator'
                                         */
  real_T PulseGenerator_Period;         /* Expression: 4000
                                         * '<S2>/Pulse Generator'
                                         */
  real_T PulseGenerator_Duty;           /* Expression: 2000
                                         * '<S2>/Pulse Generator'
                                         */
  uint16_T Constant_Value;              /* Computed Parameter: Value
                                         * '<S2>/Constant'
                                         */
  uint16_T PulseWidthSource_Value;      /* Computed Parameter: Value
                                         * '<Root>/Pulse Width Source'
                                         */
};

/* Real-time Model Data Structure */
struct RT_MODEL_c2812pwmtest {
  const char_T *errorStatus;
};

/* Block parameters (auto storage) */
extern Parameters_c2812pwmtest c2812pwmtest_P;

/* Block states (auto storage) */
extern D_Work_c2812pwmtest c2812pwmtest_DWork;

/* Model entry point functions */
extern void c2812pwmtest_initialize(boolean_T firstTime);
extern void c2812pwmtest_step(void);
extern void c2812pwmtest_terminate(void);

/* Real-time Model object */
extern RT_MODEL_c2812pwmtest *c2812pwmtest_M;

/* 
 * 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>' : c2812pwmtest
 * '<S1>'   : c2812pwmtest/F2812 eZdsp
 * '<S2>'   : c2812pwmtest/Pulse Period Source
 * '<S3>'   : c2812pwmtest/Subsystem
 */

#endif                                  /* _RTW_HEADER_c2812pwmtest_h_ */

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -