|
STM MATLAB Simulator
|
#include "mcu_wrapper_conf.h"
Include dependency graph for mcu_wrapper.c:Functions | |
| int | main (void) |
| Main function of MCU app. | |
| unsigned __stdcall | MCU_App_Thread (void) |
| Thread that run MCU code. | |
| void | MCU_Step_Simulation (SimStruct *S, time_T time) |
| Read from simulink S-Block Inputs and write to MCU I/O ports. | |
| void | MCU_Periph_Simulation (void) |
| Simulate peripheral of MCU. | |
| void | MCU_readInputs (SimStruct *S) |
| Read from simulink S-Block Inputs and write to MCU I/O ports. | |
| void | MCU_writeOutputs (SimStruct *S) |
| Read from MCU I/O ports and write to simulink S-Block Outputs. | |
| void | SIM_writeOutputs (SimStruct *S) |
| Write S-Function Output ports to inputs. | |
| void | SIM_Initialize_Simulation (void) |
| Initialize structures and variables for simulating MCU. | |
| void | SIM_deInitialize_Simulation (void) |
| Deinitialize structures and variables for simulating MCU. | |
Variables | |
| SIM__MCUHandleTypeDef | hmcu |
| extern для видимости переменной во всех файлах | |
| double | SystemClockDouble = 0 |
| double | SystemClock_step = 0 |
| uint64_t | SystemClock |
|
extern |
Main function of MCU app.
Функция с которой начинается выполнение кода МК. Выход из данной функции происходит только в конце симуляции mdlTerminate
| unsigned __stdcall MCU_App_Thread | ( | void | ) |
Thread that run MCU code.
THREAD FOR MCU APP
Поток, который запускает и выполняет код МК (main).
Here is the call graph for this function:| void MCU_Step_Simulation | ( | SimStruct * | S, |
| time_T | time ) |
Read from simulink S-Block Inputs and write to MCU I/O ports.
SIMULATE MCU FOR ONE SIMULATION STEP
| time | - current time of simulation (in second). |
Запускает поток, который выполняет код МК и управляет ходом потока: Если прошел таймаут, поток прерывается, симулируется периферия и на следующем шаге поток возобнавляется.
Here is the call graph for this function:| void MCU_Periph_Simulation | ( | void | ) |
Simulate peripheral of MCU.
SIMULATE MCU PERIPHERAL
Пользовательский код, который симулирует работу периферии МК.
Here is the call graph for this function:| void MCU_readInputs | ( | SimStruct * | S | ) |
Read from simulink S-Block Inputs and write to MCU I/O ports.
READ INPUTS S-FUNCTION TO MCU REGS
| in | - inputs of S-Function. |
Пользовательский код, который записывает в порты ввода-вывода из disc.
Here is the call graph for this function:| void MCU_writeOutputs | ( | SimStruct * | S | ) |
Read from MCU I/O ports and write to simulink S-Block Outputs.
WRITE OUTPUTS BUFFER S-FUNCTION FROM MCU REGS
| disc | - discrete array of S-Function. Outputs would be written from disc. |
Пользовательский код, который записывает в disc порты ввода-вывода.
Here is the call graph for this function:| void SIM_writeOutputs | ( | SimStruct * | S | ) |
Write S-Function Output ports to inputs.
WRITE OUTPUTS OF S-BLOCK
| disc | - discrete array of S-Function. Outputs would be written from disc. |
Пользовательский код, который записывает выходы S-Function.
| void SIM_Initialize_Simulation | ( | void | ) |
Initialize structures and variables for simulating MCU.
MCU WRAPPER DEINITIALIZATION
Пользовательский код, который будет настраивать все структуры для симуляции.
Here is the call graph for this function:| void SIM_deInitialize_Simulation | ( | void | ) |
Deinitialize structures and variables for simulating MCU.
MCU WRAPPER DEINITIALIZATION
Пользовательский код, который будет очищать все структуры после окончания симуляции.
Here is the call graph for this function:extern для видимости переменной во всех файлах
| double SystemClockDouble = 0 |
| double SystemClock_step = 0 |
| uint64_t SystemClock |