freescale

来自「Freescale 系列单片机常用模块与综合系统设计」· 代码 · 共 65 行

TXT
65
字号
/** ###################################################################
**     Filename  : line_following_car.C
**     Project   : line_following_car
**     Processor : MC9S08JM60CLHE
**     Version   : Driver 01.11
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 2010-1-19, 13:11
**     Abstract  :
**         Main module.
**         This module contains user's application code.
**     Settings  :
**     Contents  :
**         No public methods
**
** ###################################################################*/
/* MODULE line_following_car */


/* Including needed modules to compile this module/procedure */
#include "Cpu.h"
#include "Events.h"
#include "Sensor.h"
#include "Turning.h"
#include "PWM_5mS.h"
#include "Timer_10uS.h"
/* Include shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Variables.h"
#include "Sensor_Check.h"

/* User includes (#include below this line is not maintained by Processor Expert) */

void main(void)
{
  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/
   sensor_timer = 0;
   car_state = stop;
   sensor_state = right;
   go_timer = 0;               

   Turning_PutVal(0x00);   //No power to motor circuitry
       
  /* Write your code here */
  for(;;) 
  { 
    sensor_check();
  } 
}
/* END line_following_car */
/*
** ###################################################################
**
**     This file was created by Processor Expert 3.07 [04.34]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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