亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? delay.h

?? 利用AVR單片機的A/D功能來實現LED的亮滅
?? H
字號:
/* Copyright (c) 2002, Marek Michalkiewicz
   Copyright (c) 2004,2005 Joerg Wunsch
   All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are met:

   * Redistributions of source code must retain the above copyright
     notice, this list of conditions and the following disclaimer.

   * Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in
     the documentation and/or other materials provided with the
     distribution.

   * Neither the name of the copyright holders nor the names of
     contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE. */

/* $Id: delay.h,v 1.1.2.1 2005/12/12 23:19:49 joerg_wunsch Exp $ */

#ifndef _UTIL_DELAY_H_
#define _UTIL_DELAY_H_ 1

#include <inttypes.h>

/** \defgroup util_delay <util/delay.h>: Busy-wait delay loops
    \code
    #define F_CPU 1000000UL  // 1 MHz
    //#define F_CPU 14.7456E6
    #include <util/delay.h>
    \endcode

    \note As an alternative method, it is possible to pass the
    F_CPU macro down to the compiler from the Makefile.
    Obviously, in that case, no \c \#define statement should be
    used.

    The functions in this header file implement simple delay loops
    that perform a busy-waiting.  They are typically used to
    facilitate short delays in the program execution.  They are
    implemented as count-down loops with a well-known CPU cycle
    count per loop iteration.  As such, no other processing can
    occur simultaneously.  It should be kept in mind that the
    functions described here do not disable interrupts.

    In general, for long delays, the use of hardware timers is
    much preferrable, as they free the CPU, and allow for
    concurrent processing of other events while the timer is
    running.  However, in particular for very short delays, the
    overhead of setting up a hardware timer is too much compared
    to the overall delay time.

    Two inline functions are provided for the actual delay algorithms.

    Two wrapper functions allow the specification of microsecond, and
    millisecond delays directly, using the application-supplied macro
    F_CPU as the CPU clock frequency (in Hertz).  These functions
    operate on double typed arguments, however when optimization is
    turned on, the entire floating-point calculation will be done at
    compile-time.

    \note When using _delay_us() and _delay_ms(), the expressions
    passed as arguments to these functions shall be compile-time
    constants, otherwise the floating-point calculations to setup the
    loops will be done at run-time, thereby drastically increasing
    both the resulting code size, as well as the time required to
    setup the loops.
*/

#if !defined(__DOXYGEN__)
static inline void _delay_loop_1(uint8_t __count) __attribute__((always_inline));
static inline void _delay_loop_2(uint16_t __count) __attribute__((always_inline));
static inline void _delay_us(double __us) __attribute__((always_inline));
static inline void _delay_ms(double __ms) __attribute__((always_inline));
#endif

/** \ingroup util_delay

    Delay loop using an 8-bit counter \c __count, so up to 256
    iterations are possible.  (The value 256 would have to be passed
    as 0.)  The loop executes three CPU cycles per iteration, not
    including the overhead the compiler needs to setup the counter
    register.

    Thus, at a CPU speed of 1 MHz, delays of up to 768 microseconds
    can be achieved.
*/
void
_delay_loop_1(uint8_t __count)
{
	__asm__ volatile (
		"1: dec %0" "\n\t"
		"brne 1b"
		: "=r" (__count)
		: "0" (__count)
	);
}

/** \ingroup util_delay

    Delay loop using a 16-bit counter \c __count, so up to 65536
    iterations are possible.  (The value 65536 would have to be
    passed as 0.)  The loop executes four CPU cycles per iteration,
    not including the overhead the compiler requires to setup the
    counter register pair.

    Thus, at a CPU speed of 1 MHz, delays of up to about 262.1
    milliseconds can be achieved.
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
		"1: sbiw %0,1" "\n\t"
		"brne 1b"
		: "=w" (__count)
		: "0" (__count)
	);
}

#ifndef F_CPU
/* prevent compiler error by supplying a default */
# warning "F_CPU not defined for <util/delay.h>"
# define F_CPU 1000000UL
#endif

/**
   \ingroup util_delay

   Perform a delay of \c __us microseconds, using _delay_loop_1().

   The macro F_CPU is supposed to be defined to a
   constant defining the CPU clock frequency (in Hertz).

   The maximal possible delay is 768 us / F_CPU in MHz.
 */
void
_delay_us(double __us)
{
	uint8_t __ticks;
	double __tmp = ((F_CPU) / 3e6) * __us;
	if (__tmp < 1.0)
		__ticks = 1;
	else if (__tmp > 255)
		__ticks = 0;	/* i.e. 256 */
	else
		__ticks = (uint8_t)__tmp;
	_delay_loop_1(__ticks);
}


/**
   \ingroup util_delay

   Perform a delay of \c __ms milliseconds, using _delay_loop_2().

   The macro F_CPU is supposed to be defined to a
   constant defining the CPU clock frequency (in Hertz).

   The maximal possible delay is 262.14 ms / F_CPU in MHz.
 */
void
_delay_ms(double __ms)
{
	uint16_t __ticks;
	double __tmp = ((F_CPU) / 4e3) * __ms;
	if (__tmp < 1.0)
		__ticks = 1;
	else if (__tmp > 65535)
		__ticks = 0;	/* i.e. 65536 */
	else
		__ticks = (uint16_t)__tmp;
	_delay_loop_2(__ticks);
}

#endif /* _UTIL_DELAY_H_ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产经典视频| 天堂资源在线中文精品| 老司机午夜精品| 欧美日韩你懂得| 亚洲综合免费观看高清在线观看| 成人影视亚洲图片在线| 2023国产精品视频| 韩国av一区二区三区在线观看| 91精品国产乱码久久蜜臀| 亚洲高清三级视频| 欧美精选一区二区| 免费看精品久久片| 精品成人私密视频| 国内精品嫩模私拍在线| 久久久久久免费| 成人黄色片在线观看| 17c精品麻豆一区二区免费| aa级大片欧美| 久久精品国产久精国产爱| 欧美怡红院视频| 精品久久久久一区二区国产| 国产不卡视频在线播放| 久久午夜老司机| 国产精品原创巨作av| 久久精子c满五个校花| 国产99久久久国产精品潘金网站| 欧美激情艳妇裸体舞| 99久久夜色精品国产网站| 夜夜精品浪潮av一区二区三区| 欧美亚洲国产一卡| 青青青伊人色综合久久| www精品美女久久久tv| 丰满岳乱妇一区二区三区| 亚洲欧美国产77777| 床上的激情91.| 欧美性猛交xxxx乱大交退制版| 亚洲成人激情av| 精品国产乱码久久久久久牛牛| 国产91精品免费| 亚洲夂夂婷婷色拍ww47| 欧美成人性战久久| 欧美aaa在线| 91精品蜜臀在线一区尤物| 国产综合一区二区| 亚洲视频电影在线| 日韩一区二区免费视频| 粉嫩蜜臀av国产精品网站| 亚洲一区二区欧美| 久久久亚洲综合| 欧美在线免费观看亚洲| 国产一区福利在线| 亚洲成人一区二区| 日本一区二区三区免费乱视频| 日本韩国欧美在线| 国模冰冰炮一区二区| 一区二区三区四区视频精品免费| 日韩一区二区三区在线观看| 波多野结衣中文字幕一区二区三区 | 91在线高清观看| 美女一区二区三区在线观看| 亚洲午夜在线电影| 久久视频一区二区| 欧美喷水一区二区| av亚洲精华国产精华精华| 日韩国产成人精品| 一区二区三区高清在线| 欧美激情资源网| 精品蜜桃在线看| 欧美日韩aaaaa| 一本到三区不卡视频| 国产v日产∨综合v精品视频| 琪琪一区二区三区| 亚洲成人免费在线| 亚洲欧美视频一区| 亚洲欧洲日韩综合一区二区| 久久久欧美精品sm网站| 91麻豆精品国产91久久久更新时间| 99综合影院在线| 国产suv精品一区二区883| 久久国产视频网| 午夜日韩在线电影| 亚洲一区二区不卡免费| 亚洲欧美日韩国产成人精品影院| 欧美激情一区二区三区四区| 久久欧美中文字幕| 日韩女优视频免费观看| 日韩一区二区电影在线| 欧美精品在线观看播放| 欧美猛男男办公室激情| 欧美在线观看视频一区二区三区| 色婷婷综合久久久| 一本色道久久综合狠狠躁的推荐| av激情综合网| 91丨九色丨尤物| 91蝌蚪porny九色| 91丨九色丨蝌蚪富婆spa| 99在线精品免费| 91啪亚洲精品| 91豆麻精品91久久久久久| 色综合天天性综合| 欧美亚洲动漫制服丝袜| 欧美日韩一区二区三区四区五区 | 成人欧美一区二区三区黑人麻豆 | 中文字幕乱码日本亚洲一区二区| 国产欧美1区2区3区| 国产丝袜欧美中文另类| 中文字幕巨乱亚洲| 亚洲精品国产一区二区精华液 | 日本韩国一区二区三区视频| 在线精品亚洲一区二区不卡| 欧美色图免费看| 欧美一区二区免费视频| 欧美成人vps| 亚洲国产精品黑人久久久| 国产精品你懂的在线欣赏| 亚洲色图制服丝袜| 一区二区三区不卡视频| 日韩精品91亚洲二区在线观看| 男女激情视频一区| 成人国产免费视频| 欧美在线|欧美| 欧美大片一区二区| 国产精品美女一区二区三区 | 欧美性猛片aaaaaaa做受| 国产日产欧美一区二区视频| 国产欧美日韩三区| 中文字幕一区二区在线播放| 亚洲国产婷婷综合在线精品| 蜜臀av性久久久久蜜臀aⅴ | 国产曰批免费观看久久久| av在线不卡电影| 欧美一区二区三区四区久久 | 亚洲一级不卡视频| 激情都市一区二区| 99riav久久精品riav| 欧美日韩一区二区三区视频| 精品国产乱码久久久久久牛牛| 国产精品高潮久久久久无| 亚洲福利视频一区二区| 国产精品综合网| 欧美日韩综合色| 国产欧美一区二区精品婷婷| 亚洲国产精品久久一线不卡| 国产酒店精品激情| 欧美日韩亚洲高清一区二区| 亚洲国产精品精华液2区45| 亚洲成人av资源| www.成人网.com| 亚洲精品一线二线三线| 一区二区三区成人| 国产成人免费视频网站| 6080日韩午夜伦伦午夜伦| 中文字幕亚洲电影| 国产专区综合网| 欧美肥胖老妇做爰| 亚洲柠檬福利资源导航| 国产伦理精品不卡| 日韩一区二区不卡| 亚洲高清一区二区三区| 91色在线porny| 国产精品色噜噜| 国产麻豆成人传媒免费观看| 欧美裸体bbwbbwbbw| 亚洲乱码中文字幕| 成人激情校园春色| 国产色综合一区| 精品一区二区三区免费毛片爱| 精品视频免费在线| 亚洲欧美国产77777| 不卡视频免费播放| 国产日韩亚洲欧美综合| 国产一区美女在线| www激情久久| 麻豆精品一区二区| 6080午夜不卡| 日韩av一二三| 在线播放视频一区| 日韩精品五月天| 欧美高清hd18日本| 午夜激情久久久| 欧美区一区二区三区| 午夜精品福利久久久| 欧美日韩精品一区二区三区蜜桃| 亚洲精品免费在线| 在线亚洲精品福利网址导航| 日韩理论电影院| 色婷婷久久一区二区三区麻豆| 亚洲色图欧洲色图| 欧美性色综合网| 日韩中文字幕av电影| 91精品久久久久久久99蜜桃| 日韩精品91亚洲二区在线观看 | 777奇米四色成人影色区| 午夜av电影一区| 欧美一区欧美二区| 精品一区二区三区视频在线观看| 精品国产髙清在线看国产毛片| 久久66热偷产精品| 国产欧美一区二区精品婷婷 | 日韩免费观看高清完整版|