?? ticktimersim.c
字號:
#include <hidef.h> /* for EnableInterrupts macro */
#include <MC9S08GT60.h> /* include peripheral declarations */
#include "TickTimerSim.h"
#include "FreeRTOS.h" /* The one and only FreeRTOS.h */
/*
*******************************************************************************
*
*
*
*******************************************************************************
*/
unsigned char TickTimer_Enable (void)
{
return 0;
}
/*
*******************************************************************************
*
*
*
*******************************************************************************
*/
signed char TickTimer_SetFreqHz (short Freq)
{
return 0;
}
/*
*******************************************************************************
*
*
*
*******************************************************************************
*/
void TickTimer_Init(void)
{
CTimer.TimerReg = 0x1FFF;
CTimer.Control = 0x01;
}
/*
*******************************************************************************
*
*
*
*******************************************************************************
*/
#pragma TRAP_PROC SAVE_NO_REGS
__interrupt 10 void TickTimer_Interrupt (void)
{
CTimer.Status |= 0x80;
__asm ( "nop" );
#if configUSE_PREEMPTION == 1
{
/* A context switch might happen so save the context. */
portSAVE_CONTEXT();
/* Increment the tick ... */
vTaskIncrementTick();
/* ... then see if the new tick value has necessitated a
context switch. */
vTaskSwitchContext();
/* Restore the context of a task - which may be a different task
to that interrupted. */
portRESTORE_CONTEXT();
}
#else
{
vTaskIncrementTick();
}
#endif
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -