📄 dwtdenoising_main.c
字号:
/*
* File: dwtdenoising_main.c
*
* Real-Time Workshop code generated for Simulink model dwtdenoising.
*
* Model version : 1.17
* Real-Time Workshop file version : 6.6 (R2007a) 01-Feb-2007
* Real-Time Workshop file generated on : Mon Dec 10 11:23:11 2007
* TLC version : 6.6 (Jan 16 2007)
* C source code generated on : Mon Dec 10 11:23:12 2007
*/
#include "dwtdenoising.h"
#include "dwtdenoising_private.h"
#include "dwtdenoisingcfg.h"
#include "rtwtypes.h"
#include "MW_c6xxx_csl.h"
#include "c6000_main.h"
#include <stdio.h>
/* Function: exitprocessing ----------------------------------
*
* Abstract:
* Perform various tasks at program exit.
*/
void exitprocessing()
{
disable_DMA();
disable_interrupts();
UTL_halt();
}
extern void TSK_prolog(TSK_Handle hTask);
extern void TSK_epilog(TSK_Handle hTask);
//
// TSK prolog/epilog functions.
//
void TSK_prolog(TSK_Handle hTask)
{
#ifdef ENET_SOCKET_CALLS
fdOpenSession( hTask );
#endif
}
void TSK_epilog(TSK_Handle hTask)
{
#ifdef ENET_SOCKET_CALLS
fdCloseSession( hTask );
#endif
}
//
// This task is run at the highest priority. It is used to
// initialize the model and also to monitor stopping conditions.
// OS executes this task immidiatey after falling out of main().
//
void initTerminateTSK_fcn(void)
{
int_T i;
dwtdenoising_initialize(1);
enable_interrupts();
configureTimers();
/* Un-block free-running and triggered task blocks */
for (i = 0; i < NUM_TSK_BLOCKS; i++) {
SEM_post(&startSEM);
}
/* Wait for a stopping condition. */
SEM_pend(&stopSEM, SYS_FOREVER);
/* We have acquired the STOP semaphore. Perform model termination. */
/* Suspend syncronous tasks */
{
TSK_epilog( &tBaseRateTSK );
TSK_setpri( &tBaseRateTSK, -1 );
}
LOG_printf(&LOG_MW1, "**stopping the model**");
/* Disable rt_OneStep() here */
/* Terminate model */
dwtdenoising_terminate();
targetTerminate();
}
void tBaseRateTSK_fcn(void)
{
volatile boolean_T noErr;
TSK_prolog( TSK_self() );
noErr =
rtmGetErrorStatus(dwtdenoising_M) == NULL;
while (noErr ) {
/* Wait for the next timer interrupt */
SEM_pend(&rtClockSEM, SYS_FOREVER);
dwtdenoising_step();
noErr =
rtmGetErrorStatus(dwtdenoising_M) == NULL;
} /* while */
SEM_post(&stopSEM);
}
void main(void)
{
turnOn_L2Cache();
LOG_printf(&LOG_MW1, "**starting the model**");
/* Drop out of main() and enter DSP/BIOS Kernel */
}
/* File trailer for Real-Time Workshop generated code.
*
* [EOF]
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -