freescale

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

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


/* Including needed modules to compile this module/procedure */
#include "Cpu.h"
#include "Events.h"
#include "Timer_1ms.h"
#include "IRQ.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 "taximeter.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.                    ***/
  System_Initialize();                           // Configure system

  /* Write your code here */
  for(;;) {
      switch(current_state)               // current_state is changed in each state
        {
                case FREE:        Free();
                                    break;
                case SERVICE:     Service();
                                    break;
                case PAY:         Pay();
                                    break;
                case EXTRAS:      Extras();
                                    break;
                case FARES:       Fares();
                                    break;
                case CLOCK:       Clock();
                                    break;                                                                                                                                            
                case SPEEDOMETER: Speedometer();                                                                                                
                                    break;                
                case PULSES:      Pulses();
                                    break;
                case INFO:        Info();
                                    break;
                                  
                case OFF:         Off();
                                    break;                                              
                default:          current_state = FREE;
                                    break;
        }
   } 
}
/* END taxi_meter */
/*
** ###################################################################
**
**     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 + -
显示快捷键?