main.c

来自「Embedded C 这本书的范例光碟程式」· C语言 代码 · 共 51 行

C
51
字号
/*------------------------------------------------------------------*-

   Main.c (v1.00)

  ------------------------------------------------------------------

   Demonstration of sEOS running dummy task.

   (This version uses T0 for timing)

   COPYRIGHT
   ---------

   This code is associated with the book:

   EMBEDDED C by Michael J. Pont 
   [Pearson Education, 2002: ISBN: 0-201-79523-X].

   This code is copyright (c) 2001 by Michael J. Pont.
 
   See book for copyright details and other information.

-*------------------------------------------------------------------*/

#include "Main.H"
#include "Port.H"
#include "Simple_EOS.H"

#include "X.H"

/* --------------------------------------------------------------- */

void main(void)
   {
   // Prepare for dummy task
   X_Init();

   // Set up simple EOS (60 ms tick interval)
   sEOS_Init_Timer0(60);   
   
   while(1) // Super Loop
      {
      // Enter idle mode to save power
      sEOS_Go_To_Sleep();  
      }
   }

/*------------------------------------------------------------------*-
  ---- END OF FILE -------------------------------------------------
-*------------------------------------------------------------------*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?