timeoutl.h
来自「keil C51 L—Test事例」· C头文件 代码 · 共 49 行
H
49 行
/*------------------------------------------------------------------*-
TimeoutL.H (v1.00)
------------------------------------------------------------------
Simple software (loop) timeout delays for the 8051 family.
* THESE VALUES ARE NOT PRECISE - YOU MUST ADAPT TO YOUR SYSTEM *
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.
-*------------------------------------------------------------------*/
#ifndef _TIMEOUTL_H
#define _TIMEOUTL_H
// ------ Public constants -----------------------------------------
// Vary this value to change the loop duration
// THESE ARE APPROX VALUES FOR VARIOUS TIMEOUT DELAYS
// ON 8051, 12 MHz, 12 Osc / cycle
// *** MUST BE FINE TUNED FOR YOUR APPLICATION ***
// *** Timings vary with compiler optimisation settings ***
#define LOOP_TIMEOUT_INIT_001ms 65435
#define LOOP_TIMEOUT_INIT_010ms 64535
#define LOOP_TIMEOUT_INIT_500ms 0
#define LOOP_TIMEOUT_INIT_10000ms 4294795000
#endif
/*------------------------------------------------------------------*-
---- END OF FILE -------------------------------------------------
-*------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?