嗨,Graa,
再次感谢您的快速响应!
我跟你说的一样,但是我实现了一个ISR睡眠计时器。
我的代码类似于:
语用中断
空隙率(空隙)
{
//这里我输入了我想在SurrUp产生时做PSoC的代码。
睡眠;
返回;
}
空隙主(空隙)
{
It BITKS=20;
M8CyEnabeLeTimeMe掩码(IntMsK0,In MsK00Sead);
M8CB;
睡眠时间;
睡眠时间启动;
睡眠时间定时器(BICKS);
韦勒(1)
{
M8Cl睡眠;
}
}
这个代码和你告诉我的一样吗?使用ISR睡眠计时器有什么不同?
谢谢你的帮助!
以上来自于百度翻译
以下为原文
Hi Graa,
Thanks for your fast response, again!
I did similar as you told me, but I implemented an ISR SleepTimer.
My code is similar as:
#pragma interrupt_handler SleepISR
void SleepISR(void)
{
//here I putted the code I would like to do the PSoC when the interrup is produced
M8C_ClearWDTAndSleep;
return;
}
void main(void)
{
int bticks=20;
M8C_EnableIntMask(INT_MSK0, INT_MSK0_SLEEP);
M8C_EnableGInt;
SleepTimer_EnableInt;
SleepTimer_Start;
SleepTimer_SetTimer(bticks);
wile(1)
{
M8C_Sleep;
}
}
Does this code do the same as you told me? What's the difference in using the ISR Sleep Timer?
Thanks for your help!
嗨,Graa,
再次感谢您的快速响应!
我跟你说的一样,但是我实现了一个ISR睡眠计时器。
我的代码类似于:
语用中断
空隙率(空隙)
{
//这里我输入了我想在SurrUp产生时做PSoC的代码。
睡眠;
返回;
}
空隙主(空隙)
{
It BITKS=20;
M8CyEnabeLeTimeMe掩码(IntMsK0,In MsK00Sead);
M8CB;
睡眠时间;
睡眠时间启动;
睡眠时间定时器(BICKS);
韦勒(1)
{
M8Cl睡眠;
}
}
这个代码和你告诉我的一样吗?使用ISR睡眠计时器有什么不同?
谢谢你的帮助!
以上来自于百度翻译
以下为原文
Hi Graa,
Thanks for your fast response, again!
I did similar as you told me, but I implemented an ISR SleepTimer.
My code is similar as:
#pragma interrupt_handler SleepISR
void SleepISR(void)
{
//here I putted the code I would like to do the PSoC when the interrup is produced
M8C_ClearWDTAndSleep;
return;
}
void main(void)
{
int bticks=20;
M8C_EnableIntMask(INT_MSK0, INT_MSK0_SLEEP);
M8C_EnableGInt;
SleepTimer_EnableInt;
SleepTimer_Start;
SleepTimer_SetTimer(bticks);
wile(1)
{
M8C_Sleep;
}
}
Does this code do the same as you told me? What's the difference in using the ISR Sleep Timer?
Thanks for your help!
举报