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

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

?? pmbus

?? pmbus在avr32開發板平臺上tiny24中的實現。
??
?? 第 1 頁 / 共 5 頁
字號:
X    <one line to give the program's name and a brief idea of what it does.>X    Copyright (C) <year>  <name of author>XX    This program is free software: you can redistribute it and/or modifyX    it under the terms of the GNU General Public License as published byX    the Free Software Foundation, either version 3 of the License, orX    (at your option) any later version.XX    This program is distributed in the hope that it will be useful,X    but WITHOUT ANY WARRANTY; without even the implied warranty ofX    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theX    GNU General Public License for more details.XX    You should have received a copy of the GNU General Public LicenseX    along with this program.  If not, see <http://www.gnu.org/licenses/>.XAlso add information on how to contact you by electronic and paper mail.XX  If the program does terminal interaction, make it output a shortnotice like this when it starts in an interactive mode:XX    <program>  Copyright (C) <year>  <name of author>X    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.X    This is free software, and you are welcome to redistribute itX    under certain conditions; type `show c' for details.XThe hypothetical commands `show w' and `show c' should show the appropriateparts of the General Public License.  Of course, your program's commandsmight be different; for a GUI interface, you would use an "about box".XX  You should also get your employer (if you work as a programmer) or school,if any, to sign a "copyright disclaimer" for the program, if necessary.For more information on this, and how to apply and follow the GNU GPL, see<http://www.gnu.org/licenses/>.XX  The GNU General Public License does not permit incorporating your programinto proprietary programs.  If your program is a subroutine library, youmay consider it more useful to permit linking proprietary applications withthe library.  If this is what you want to do, use the GNU Lesser GeneralPublic License instead of this License.  But first, please read<http://www.gnu.org/philosophy/why-not-lgpl.html>.SHAR_EOF  (set 20 08 04 25 10 25 36 'COPYING'; eval "$shar_touch") &&  chmod 0644 'COPYING' ||  $echo 'restore of' 'COPYING' 'failed'  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then    md5sum -c << SHAR_EOF >/dev/null 2>&1 \    || $echo 'COPYING:' 'MD5 check failed'd32239bcb673463ab874e80d47fae504  COPYINGSHAR_EOF  else    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'COPYING'`"    test 35147 -eq "$shar_count" ||    $echo 'COPYING:' 'original size' '35147,' 'current size' "$shar_count!"  fifi# ============= Makefile ==============if test -f 'Makefile' && test "$first_param" != -c; then  $echo 'x -' SKIPPING 'Makefile' '(file already exists)'else  $echo 'x -' extracting 'Makefile' '(text)'  sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&## NOTE that the version of GCC you use might affect whether this code# fits into an ATtiny24 flash (2KB).  Also, the current version relies# on AVR-libc 1.6.x features.## GCC 4.3.0 really shrinks the the USI code, especially IRQ handlers,# but needs some "noinline" function attributes to prevent some bad# inlining choices.  It needs about 5% less space than GCC 4.2.2 given# those options (or an equivalent commandline option).## GCC 4.2.2 (e.g. WinAVR 2007-12-21) works, but wastes much space.## GCC 4.2.1 and older toolchains don't handle ATtinyX4 chips quite# right (ignoring LPMX, MOVW, etc).#XCC =		avr-gccXMCU =		attiny24#MCU =		attiny84XLDFLAGS =	-L/usr/local/avr/libLDFLAGS +=	-mmcu=$(MCU)XCFLAGS =	-I/usr/local/avr/includeCFLAGS +=	-mmcu=$(MCU)XCFLAGS +=	-std=gnu99CFLAGS +=	-OsXCFLAGS +=	-funsigned-bitfieldsCFLAGS +=	-funsigned-charCFLAGS +=	-fpack-structCFLAGS +=	-fshort-enumsXCFLAGS +=	-WallCFLAGS +=	-WextraCFLAGS +=	-Wstrict-prototypes#CFLAGS +=	-pedanticXCFLAGS +=	-DF_CPU=4000000XOBJS =		 main.o pmbus.o usi_i2c_slave.oXIMAGE =		pmbus_slave.elfX$(IMAGE): $(OBJS)X	$(CC) -o $(IMAGE) $(LDFLAGS) $(OBJS)Xclean:X	-$(RM) -f *.o *.elf Log *.shar.bz2XHEADERS =	usi_i2c_slave.h smbus_glue.h prod_misc.hXmain.o: main.c $(HEADERS) Makefilepmbus.o: pmbus.c $(HEADERS) Makefileusi_i2c_slave.o: usi_i2c_slave.c $(HEADERS) MakefileXSHARFILES = README COPYING \X	Makefile $(OBJS:.o=.c) $(HEADERS) \X	pmbus_peek.c \X	$(IMAGE)Xshar: pmbus.shar.bz2Xpmbus.shar.bz2: $(SHARFILES)X	shar $(SHARFILES) | bzip2 > pmbus.shar.bz2XSHAR_EOF  (set 20 08 04 25 10 25 36 'Makefile'; eval "$shar_touch") &&  chmod 0644 'Makefile' ||  $echo 'restore of' 'Makefile' 'failed'  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then    md5sum -c << SHAR_EOF >/dev/null 2>&1 \    || $echo 'Makefile:' 'MD5 check failed'b4453a0a9573fde65b5756fc6795f397  MakefileSHAR_EOF  else    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'Makefile'`"    test 1569 -eq "$shar_count" ||    $echo 'Makefile:' 'original size' '1569,' 'current size' "$shar_count!"  fifi# ============= main.c ==============if test -f 'main.c' && test "$first_param" != -c; then  $echo 'x -' SKIPPING 'main.c' '(file already exists)'else  $echo 'x -' extracting 'main.c' '(text)'  sed 's/^X//' << 'SHAR_EOF' > 'main.c' &&/*X * main.c - main program for AVR8 PMBus slaveX * Part of PMBus device firmwareX *X * Copyright (C) 2008 David BrownellX *X * This program is free software: you can redistribute it and/or modifyX * it under the terms of the GNU General Public License as published byX * the Free Software Foundation, either version 3 of the License, orX * (at your option) any later version.X *X * This program is distributed in the hope that it will be useful,X * but WITHOUT ANY WARRANTY; without even the implied warranty ofX * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theX * GNU General Public License for more details.X *X * You should have received a copy of the GNU General Public LicenseX * along with this program.  If not, see <http://www.gnu.org/licenses/>.X */#include <string.h>X#include <avr/io.h>#include <avr/eeprom.h>#include <avr/interrupt.h>#include <avr/pgmspace.h>#include <avr/sleep.h>#include <avr/wdt.h>X#include "usi_i2c_slave.h"#include "prod_misc.h"XX/*X * This firmware is intended to replace what's found in the NGW100X * ATtiny24 "Board Controller".  The firmware provided by Atmel isX * not PMBus conformant.X *X * If we're using an 8 MHz clock we leave CKDIV8 unprogrammed andX * don't bother updating the prescaler.X *X * Program EESAVE so that it's not easy to lose the serial numberX * and temperature offset stored in eeprom.  Ideally both valuesX * would be set during board manufacture, along with the flash.X * Failing that, AVR studio lets you write to EEPROM "by hand" ifX * you have DebugWire configured (e.g. program with a Dragon).X */X/* avr-libc-1.6-20080228 vs WinAVR-20071221 */#ifndef CKDIV8#define CKDIV8 FUSE_CKDIV8#define EESAVE FUSE_EESAVE#endifX#ifndef HFUSE_DEFAULT#define HFUSE_DEFAULT FUSE_HFUSE_DEFAULT#endifXFUSES = {#if F_CPU == 8000000X	.low		= (u8) (LFUSE_DEFAULT | ~CKDIV8),#elseX	.low		= (u8) LFUSE_DEFAULT,#endifX	.high		= (u8) (HFUSE_DEFAULT & EESAVE),X	.extended	= (u8) EFUSE_DEFAULT,};X/*-------------------------------------------------------------------------*/X/*X * EEPROM layout ... this isn't what Atmel's NGW100 firmware uses.X * You should erase the EEPROM before installing this code; init theX * serial number (from the sticker on the board) by hand.X *X * Temperature offset calibration ... TBD.  Maybe all the EEPROMX * contents should have write-once commands from the host, until aX * manufacturing-based solution is deployed.X */u8 EEMEM ee_serial[10];u16 EEMEM ee_temp_offset;X/*-------------------------------------------------------------------------*/X/*X * Variables exported to PMBus protocol codeX */u8 board_revision;X/*X * Temp sensor accuracy *really* requires using a per-chip calibration;X * and even at that it's not going to be very accurate.  If it mattersX * much, use a better sensor.X *X * Here we simplify the math by assuming that linear sensitivity, atX * 1.12 bits/degree Celsius (typical values, see the ATtinyX4 datasheetX * table 16-2).  So a 12-bit sample with range up to VREF (1.1V) givesX *X *	T = (ADC - offset)/DIVX *X * with DIV as (1024 * 1.1 bit/degree)/1.1V = 1024 ... so we can treatX * the raw ADC output as being in degrees Celcius (modulo an offset),X * no need to multiply or divide.  The big downside:  those LSBs areX * noisy; variability of 2-4 degrees is easy to observe.X *X * In PMBus, we can represent that as a LINEAR (fixed point) value,X * or with a (more expensive) DIRECT format using coefficients:X *	m = 1 (we provide degrees C)X *	b = temp_offsetX *	R = 0X */u16 temp_offset;u16 adc_temp;		/* ADC8 */X/*X * 3V3 voltage divider measurement:X *	= Volts * (10K / (10K + 27K))X *	= Volts * 0.27X *X *   ADC = (measured / 1.1V) * 1024X *	= ((Volts * 0.27) / 1.1V) * 1024X *X *   ADC / 1024 = (Volts * 0.27) / 1.1VX *   (ADC / 1024) * 1.1V = Volts * 0.27X *   (ADC / 1024) * 1.1V / 0.27 = VoltsX *   (ADC / 1024) * 4.074 = VoltsX *   (ADC * 4.074) / 1024 = VoltsX *X * To represent in in direct format:X *   Volts = (ADC * (10^-R) - b) / mX *		b == 0X *   Volts = (ADC * (10^-R)) / mX *	= (ADC * 4.074) / 1024X *	= (ADC * 4.074 * 24.54590) / (1024 * 24.54590)X *	= (ADC * 100) / (1024 * 24.54590)X *		R == -2X *	= (ADC * 100) / 25135X *		m == 25135X */u16 adc_3v3;		/* ADC7 */X// u16 adc_1v8;		/* ADC3 */X/*-------------------------------------------------------------------------*/X/*X * Set up just the hardware, without relying on BSS or initializedX * data ... things go here that "need" to be done ASAP on reset.X */Xvoid tnX4_init(void)X	__attribute__ ((naked))X	__attribute__ ((used))X	__attribute__ ((section(".init3")));Xvoid tnX4_init(void){X	MCUSR = 0;XX	/* in case we didn't get a hard reset... */X	WDTCSR = _BV(WDCE);X	WDTCSR = 0;XX	/* Assume nominal 8 MHz oscillator, with CKDIV8 set unless we'reX	 * using 8 MHz clock.  Don't allow less than 200 KHz, so we canX	 * always cope with at least 100 KHz for I2C.X	 *X	 * Note that there's a fair amount of work going on in some of theX	 * USI interrupts, and that even at 8 MHz some delays in thoseX	 * particular I2C responses are observable.X	 */#if F_CPU == 8000000X	/* we're all set */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品888| 日本不卡不码高清免费观看| 成人高清伦理免费影院在线观看| 久久久久久影视| 成人动漫一区二区| 一区二区三区鲁丝不卡| 欧美一区中文字幕| 国产在线视频精品一区| 国产精品久久久久一区二区三区| 91香蕉视频黄| 亚洲成人动漫在线观看| 26uuu亚洲婷婷狠狠天堂| 成人免费看黄yyy456| 亚洲精品视频自拍| 欧美一级片在线看| 成人免费观看av| 亚洲香肠在线观看| 亚洲精品一线二线三线无人区| 精品一区免费av| 综合久久给合久久狠狠狠97色| 欧美色精品天天在线观看视频| 久久精品国产精品青草| 中文在线资源观看网站视频免费不卡| 91丝袜国产在线播放| 日韩av中文在线观看| 国产亲近乱来精品视频| 欧美精品日韩精品| 国产在线播精品第三| 一区二区三区欧美久久| 久久婷婷成人综合色| 欧洲日韩一区二区三区| 精品制服美女丁香| 亚洲女同ⅹxx女同tv| 精品国内二区三区| 欧美性猛交xxxx乱大交退制版| 国产乱码一区二区三区| 亚洲电影一级片| 国产免费观看久久| 欧美一卡2卡3卡4卡| 色偷偷成人一区二区三区91| 国产一区啦啦啦在线观看| 亚洲亚洲精品在线观看| 国产精品麻豆欧美日韩ww| 日韩一级免费一区| 在线观看一区二区视频| 丁香婷婷综合网| 极品少妇xxxx偷拍精品少妇| 亚洲成人激情av| 亚洲激情中文1区| 国产精品大尺度| 精品国产乱码久久久久久蜜臀 | 成人亚洲精品久久久久软件| 日韩成人dvd| 无码av中文一区二区三区桃花岛| 国产精品视频麻豆| 久久新电视剧免费观看| 日韩免费视频线观看| 欧美男女性生活在线直播观看| 97久久超碰国产精品电影| 国产一区二区视频在线播放| 蜜乳av一区二区| 日本女人一区二区三区| 亚洲成人动漫精品| 午夜精品福利一区二区三区av| 亚洲乱码国产乱码精品精的特点| 国产精品不卡视频| 国产精品久久免费看| 欧美国产激情一区二区三区蜜月| 2020国产精品自拍| 久久婷婷久久一区二区三区| 欧美变态凌虐bdsm| 精品99一区二区| 精品久久久久久久久久久久久久久久久 | 国产精品久久毛片av大全日韩| 久久精品一区二区三区不卡| 久久久99精品久久| 国产三级久久久| 中文字幕av免费专区久久| 国产精品午夜电影| 亚洲人成亚洲人成在线观看图片| 国产精品久久久久久一区二区三区 | 成人性视频网站| www.在线成人| 91啦中文在线观看| 在线看日本不卡| 欧美剧在线免费观看网站| 欧美一区二区三区四区高清| 日韩一级大片在线| 久久久一区二区| 最好看的中文字幕久久| 一区二区三区国产| 日韩在线观看一区二区| 六月丁香婷婷久久| 国产欧美一区二区三区鸳鸯浴 | 依依成人精品视频| 另类小说色综合网站| 成人免费毛片嘿嘿连载视频| 亚洲va欧美va人人爽| 日韩国产一二三区| 紧缚捆绑精品一区二区| 国产成a人亚洲| 欧洲av一区二区嗯嗯嗯啊| 91精品国产福利| 中文字幕不卡在线播放| 亚洲一区二区三区视频在线播放 | 91激情五月电影| 9191精品国产综合久久久久久| 日韩精品一区二区三区在线| 国产日韩欧美亚洲| 亚洲一区二区三区四区在线观看| 青娱乐精品视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩欧美国产三级电影视频| 久久久99精品久久| 亚洲一区二区三区美女| 久久精品国产在热久久| av在线播放一区二区三区| 91精品在线免费观看| 日本一区二区三区电影| 日韩专区中文字幕一区二区| 成人高清免费在线播放| 制服.丝袜.亚洲.中文.综合| 国产精品乱码一区二区三区软件 | 日韩国产欧美一区二区三区| 国产真实乱偷精品视频免| 欧洲国产伦久久久久久久| 国产午夜精品久久久久久免费视 | 制服丝袜在线91| 中文字幕一区二区日韩精品绯色| 日韩精品亚洲专区| 91麻豆国产香蕉久久精品| 亚洲精品一区二区三区影院| 亚洲激情欧美激情| 粉嫩av一区二区三区| 日韩一区二区三区电影在线观看| 亚洲欧美日韩国产综合| 国产成人免费高清| 欧美sm极限捆绑bd| 日韩精品一级中文字幕精品视频免费观看| 高清在线不卡av| 亚洲精品一区二区三区福利| 日韩av电影免费观看高清完整版| 色88888久久久久久影院按摩| 久久久久国产一区二区三区四区| 日韩高清不卡在线| 欧美最新大片在线看| 国产精品卡一卡二卡三| 大桥未久av一区二区三区中文| 日韩视频免费直播| 青草国产精品久久久久久| 欧美色图在线观看| 一区二区三区国产豹纹内裤在线 | 国产黄色精品网站| 26uuu国产日韩综合| 六月丁香婷婷久久| 日韩一级成人av| 久久99九九99精品| 欧美xxxxxxxx| 美女性感视频久久| 日韩三级视频在线观看| 婷婷国产v国产偷v亚洲高清| 欧美视频在线不卡| 亚洲国产精品综合小说图片区| 波多野结衣精品在线| 国产精品久久久久久久第一福利 | av中文字幕在线不卡| 欧美国产在线观看| 不卡一区二区中文字幕| 中文字幕在线不卡视频| 99re在线视频这里只有精品| 国产精品白丝在线| 欧美在线观看18| 五月婷婷激情综合| 在线91免费看| 久久精品国产一区二区三| 久久午夜国产精品| 国产成人av一区二区三区在线| 国产精品美女久久久久久久久| 91麻豆国产香蕉久久精品| 亚洲一区欧美一区| 日韩美女天天操| 国产精品18久久久久久久久 | 欧美午夜片在线观看| 首页国产欧美日韩丝袜| 欧美大度的电影原声| 国产成人综合在线播放| 中文字幕一区二区三| 欧美日韩国产bt| 国产一区二区精品久久99| 国产精品免费视频观看| 欧美亚洲一区二区三区四区| 日韩**一区毛片| 国产精品美日韩| 欧美日韩一区二区三区在线看| 精品在线亚洲视频| 综合婷婷亚洲小说| 91精品国产综合久久久久久| 国产乱子伦视频一区二区三区 | 国产精品 日产精品 欧美精品| 国产精品亲子乱子伦xxxx裸|