112 lines
2.7 KiB
C
112 lines
2.7 KiB
C
/**************************************************************************
|
|
Äàííûé ôàéë íåîáõîäèì äëÿ îïðåäåëåíèÿ, êàêóþ ïåðèôåðèþ íàîáõîäèìî áóäåò
|
|
ñèìóëèðîâàòü.
|
|
|
|
**************************************************************************/
|
|
#ifndef _MATLAB_SETUP_H_
|
|
#define _MATLAB_SETUP_H_
|
|
|
|
// DEFINES (UNCOMMENT WHAT YOU WILL SIMULATE)
|
|
// TIMS
|
|
#define USE_TIM1
|
|
//#define USE_TIM2
|
|
#define USE_TIM3
|
|
#define USE_TIM4
|
|
//#define USE_TIM5
|
|
//#define USE_TIM6
|
|
#define USE_TIM7
|
|
//#define USE_TIM8
|
|
//#define USE_TIM9
|
|
//#define USE_TIM10
|
|
//#define USE_TIM11
|
|
#define USE_TIM12
|
|
//#define USE_TIM13
|
|
//#define USE_TIM14
|
|
|
|
// TIM'S HANDLERS
|
|
//#define USE_TIM1_UP_TIM10_HANDLER
|
|
//#define USE_TIM2_HANDLER
|
|
//#define USE_TIM3_HANDLER
|
|
#define USE_TIM4_HANDLER
|
|
//#define USE_TIM5_HANDLER
|
|
//#define USE_TIM6_HANDLER
|
|
#define USE_TIM7_HANDLER
|
|
//#define USE_TIM8_UP_TIM13_HANDLER
|
|
//#define USE_TIM1_BRK_TIM9_HANDLER
|
|
//#define USE_TIM1_TRG_COM_TIM11_HANDLER
|
|
#define USE_TIM8_BRK_TIM12_HANDLER
|
|
//#define USE_TIM8_TRG_COM_TIM14_HANDLER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------//
|
|
/*------------------------------FUNCTIONS--------------------------------*/
|
|
void deInitialize_Periph_Sim(void);
|
|
void deInitialize_MCU(void);
|
|
void Initialize_Periph_Sim(void);
|
|
|
|
|
|
#include "stm32f4xx_matlab_rcc.h"
|
|
#include "stm32f4xx_matlab_gpio.h"
|
|
|
|
|
|
//-----------------------------------------------------------------------//
|
|
/*-------------------------------TIMERS----------------------------------*/
|
|
//#if defined(USE_TIM1) || defined(USE_TIM2) || defined(USE_TIM3) || defined(USE_TIM4) || defined(USE_TIM5) || \
|
|
// defined(USE_TIM6) || defined(USE_TIM7) || defined(USE_TIM8) || defined(USE_TIM9) || defined(USE_TIM10) || \
|
|
// defined(USE_TIM11) || defined(USE_TIM12) || defined(USE_TIM13) || defined(USE_TIM14)
|
|
#include "stm32f4xx_matlab_tim.h"
|
|
|
|
// CODE
|
|
void Init_TIM_SIM(void);
|
|
|
|
#ifdef USE_TIM1
|
|
extern struct TIM_Sim tim1s;
|
|
#endif
|
|
#ifdef USE_TIM2
|
|
extern struct TIM_Sim tim2s;
|
|
#endif
|
|
#ifdef USE_TIM3
|
|
extern struct TIM_Sim tim3s;
|
|
#endif
|
|
#ifdef USE_TIM4
|
|
extern struct TIM_Sim tim4s;
|
|
#endif
|
|
#ifdef USE_TIM5
|
|
extern struct TIM_Sim tim5s;
|
|
#endif
|
|
#ifdef USE_TIM6
|
|
extern struct TIM_Sim tim6s;
|
|
#endif
|
|
#ifdef USE_TIM7
|
|
extern struct TIM_Sim tim7s;
|
|
#endif
|
|
#ifdef USE_TIM8
|
|
extern struct TIM_Sim tim8s;
|
|
#endif
|
|
#ifdef USE_TIM9
|
|
extern struct TIM_Sim tim9s;
|
|
#endif
|
|
#ifdef USE_TIM10
|
|
extern struct TIM_Sim tim10s;
|
|
#endif
|
|
#ifdef USE_TIM11
|
|
extern struct TIM_Sim tim11s;
|
|
#endif
|
|
#ifdef USE_TIM12
|
|
extern struct TIM_Sim tim12s;
|
|
#endif
|
|
#ifdef USE_TIM13
|
|
extern struct TIM_Sim tim13s;
|
|
#endif
|
|
#ifdef USE_TIM14
|
|
extern struct TIM_Sim tim14s;
|
|
#endif
|
|
/*-------------------------------TIMERS----------------------------------*/
|
|
//-----------------------------------------------------------------------//
|
|
|
|
#endif // _MATLAB_SETUP_H_
|