main.c

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

C
54
字号
/*------------------------------------------------------------------*-

   Main.c (v1.01)

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

   Robot example (see Chapter 9).


   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 "Simple_EOS.H"

#include "PC_IO_T1.h"
#include "Stepper.H"

/* ............................................................... */
/* ............................................................... */

void main(void)
   {
   // Set baud rate to 9600: generic 8051 version
   PC_LINK_IO_Init_T1(9600);

   // Set up steppers
   STEPPER_Init();

   // Set up sEOS (5ms tick)
   sEOS_Init_Timer2(5);   

   while(1) // Super Loop
      {
	  // Enter idle mode to save power
      sEOS_Go_To_Sleep();  
      }
   }

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

⌨️ 快捷键说明

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