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

📄 clock.c

📁 用mega8模拟usb做下载线(AVR)
💻 C
字号:
/*
  clock.c - part of USBasp

  Autor..........: Thomas Fischl <tfischl@gmx.de> 
  Description....: Provides functions for timing/waiting
  Licence........: Free under certain conditions. See Documentation.
  Creation Date..: 2005-02-23
  Last change....: 2005-04-20
*/

#include <inttypes.h>
#include <avr/io.h>
#include "clock.h"

/* wait time * 320 us */
void clockWait(uint8_t time) {
  
  uint8_t i;
  for (i = 0; i < time; i++) {
    uint8_t starttime = TIMERVALUE;
    while ((uint8_t) (TIMERVALUE - starttime) < CLOCK_T_320us) {}	
  }
}

⌨️ 快捷键说明

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