Project

General

Profile

RE: unable to compiled and download to ESP32 » project01.h

Sunphong Thanok, 16 Oct 2020 12:31

 
1
//
2
// Academic License - for use in teaching, academic research, and meeting
3
// course requirements at degree granting institutions only.  Not for
4
// government, commercial, or other organizational use.
5
//
6
// File: project01.h
7
//
8
// Code generated with Waijung 2 ESP32 Target Blockset,
9
// for Simulink model 'project01'.
10
//
11
// Model version                  : 1.5
12
// Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
13
// C/C++ source code generated on : Thu Oct 15 20:51:39 2020
14
//
15
// Target selection: esp32.tlc
16
// Embedded hardware selection: Cadence Design Systems (Tensilica)->Xtensa? single-/dual-core 32-bit LX6 microprocessor
17
// Code generation objectives: Unspecified
18
// Validation result: Not run
19
//
20
#ifndef RTW_HEADER_project01_h_
21
#define RTW_HEADER_project01_h_
22
#include <stddef.h>
23
#include "waijung2_hwdrvlib.h"
24
#include "rtwtypes.h"
25
#include "project01_types.h"
26

    
27
// Macros for accessing real-time model data structure
28
#ifndef rtmGetErrorStatus
29
#define rtmGetErrorStatus(rtm)         ((rtm)->errorStatus)
30
#endif
31

    
32
#ifndef rtmSetErrorStatus
33
#define rtmSetErrorStatus(rtm, val)    ((rtm)->errorStatus = (val))
34
#endif
35

    
36
// Class declaration for model project01
37
class project01ModelClass {
38
  // public data and function members
39
 public:
40
  // Block signals (default storage)
41
  typedef struct {
42
    real_T PulseGenerator;             // '<Root>/Pulse Generator'
43
  } B_project01_T;
44

    
45
  // Block states (default storage) for system '<Root>'
46
  typedef struct {
47
    int32_T clockTickCounter;          // '<Root>/Pulse Generator'
48
  } DW_project01_T;
49

    
50
  // Real-time Model Data Structure
51
  struct RT_MODEL_project01_T {
52
    const char_T * volatile errorStatus;
53
  };
54

    
55
  // model initialize function
56
  void initialize();
57

    
58
  // model step function
59
  void step();
60

    
61
  // model terminate function
62
  void terminate();
63

    
64
  // Constructor
65
  project01ModelClass();
66

    
67
  // Destructor
68
  ~project01ModelClass();
69

    
70
  // Real-Time Model get method
71
  project01ModelClass::RT_MODEL_project01_T * getRTM();
72

    
73
  // private data and function members
74
 private:
75
  // Block signals
76
  B_project01_T project01_B;
77

    
78
  // Block states
79
  DW_project01_T project01_DW;
80

    
81
  // Real-Time Model
82
  RT_MODEL_project01_T project01_M;
83
};
84

    
85
//-
86
//  The generated code includes comments that allow you to trace directly
87
//  back to the appropriate location in the model.  The basic format
88
//  is <system>/block_name, where system is the system number (uniquely
89
//  assigned by Simulink) and block_name is the name of the block.
90
//
91
//  Use the MATLAB hilite_system command to trace the generated code back
92
//  to the model.  For example,
93
//
94
//  hilite_system('<S3>')    - opens system 3
95
//  hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
96
//
97
//  Here is the system hierarchy for this model
98
//
99
//  '<Root>' : 'project01'
100

    
101
#endif                                 // RTW_HEADER_project01_h_
102

    
103
// [EOF]
(1-1/2)