⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jtimerdef.h

📁 在Freescale16位单片机MC9s12dp256上移植了J1939源码和操作系统(ucOSII)。
💻 H
字号:
/*--------------------------------------------------------------------
       TIMERDEF.H
  --------------------------------------------------------------------
       Copyright (C) 1998-2004 Vector Informatik GmbH, Stuttgart

       Function: Timer functions header
  --------------------------------------------------------------------*/

#ifndef _TIMERDEF_H_
#define _TIMERDEF_H_

#define ucOS


/*--------------------------------------------------------------------*/
/*  constants definitions                                             */
/*--------------------------------------------------------------------*/
/*!
  \def TIME_FROM_OS
  Switch timer source from hardware timer to operating system.
  - 0 timer source is hardware timer.
  - 1 timer source is operating system.
  - 2 timer source is ucOS
*/

#ifdef WIN32
# define TIME_FROM_OS 1  /* 0 or 1 ,2 */
#endif
#ifdef ucOS
# define TIME_FROM_OS 2  /* 0 or 1,2 */
#else
# define TIME_FROM_OS 0  /* 0 or 1,2 */
#endif

/*! The basic time in ms, typical 5 */
#define BASIC_TIME 5
#define TIM_BASE 1

/*! The generic timer handler is executed every given ms, typical 10 */
#define COMM_TIMER_CYCLE 10

/* Check timing values */
#if BASIC_TIME > COMM_TIMER_CYCLE
# error "Basic time quantum exceeds communication cycle time !"
#endif



/*--------------------------------------------------------------------*/
/*  function prototypes                                               */
/*--------------------------------------------------------------------*/
void Tim_InitTimer(WORD);
unsigned char Tim_StartTimer(void);
unsigned char Tim_StopTimer(void);
WORD Tim_GetCurrentTime(void);

#endif /* _TIMERDEF_H_ */



/*--------------------------------------------------------------------*/
/*  documentation                                                     */
/*--------------------------------------------------------------------*/

/*!
  \file
  \brief Timer functions header.
*/

⌨️ 快捷键说明

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