• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Commit MetaInfo

Révision14dd6f892a5cb009b3582f997a2c07a0e25d3c1f (tree)
l'heure2013-06-11 05:38:50
AuteurK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Message de Log

[IDLE] Enable idle-mode before kicking tmr0.

Change Summary

Modification

--- a/idle.c
+++ b/idle.c
@@ -30,6 +30,11 @@ void idle(unsigned int initial)
3030 unsigned char osccon;
3131 unsigned char contword;
3232
33+ /* Enable IDLE */
34+ osccon = OSCCON;
35+ osccon = osccon | _IDLEN | _SCS1 | _SCS0;
36+ OSCCON = osccon;
37+
3338 /* Set TMR0 for interrupt*/
3439 /* Pre-scaler: 1/16, PSA=0(ON), TOSE=0, T0CS=0(INTERNAL), T08BIT=1(8bit), TMR0ON=1(START) */
3540 contword = _T0PS0 | _T0PS1 | _T08BIT | _TMR0ON; // _T0PS2
@@ -37,8 +42,5 @@ void idle(unsigned int initial)
3742 TMR0L = initial & 0xff;
3843 T0CON = contword;
3944
40- osccon = OSCCON;
41- osccon = osccon | _IDLEN | _SCS1 | _SCS0;
42- OSCCON = osccon;
4345 Sleep();
4446 }