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

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

?? dallas.h

?? avr cpu 庫源代碼 對avr單片機編程很有幫助
?? H
字號:
//*****************************************************************************
// File Name	: dallas.c
// Title		: Dallas 1-Wire Library
// Revision		: 6
// Notes		: 
// Target MCU	: Atmel AVR series
// Editor Tabs	: 4
// 
// Revision History:
// When			Who			Rev		Description of change
// -----------	-----------	-------	-----------------------
// 24-Sep-2003	rwatson		6		Created AddressCheck, WaitUntilDone
// 23-Sep-2003	rwatson		5		Created ReadRAM, WriteRAM, PrintError, PrintROM
// 22-Sep-2003	rwatson		4		Created MatchROM, PrintROM
// 21-Sep-2003	rwatson		3		Created ReadROM, FindDevices, FindNextDevice, CRC
// 20-Sep-2003	rwatson		2		Created ReadBit, WriteBit, ReadByte, WriteByte, Reset
// 20-Sep-2003	rwatson		1		Created the program structure
//*****************************************************************************

#ifndef dallas_h
#define dallas_h

//----- Include Files ---------------------------------------------------------
#include "global.h"

//----- Defines ---------------------------------------------------------------
#define dallas_rev					6

// include configuration
#include "dallasconf.h"

// define the max number devices on
// the bus if it isn't defined yet
#ifndef DALLAS_MAX_DEVICES
#define DALLAS_MAX_DEVICES			20
#endif

// indexes of named bytes in the
// dallas address array
#define DALLAS_FAMILY_IDX			0			// family code
#define DALLAS_A0_IDX				1
#define DALLAS_A1_IDX				2
#define DALLAS_A2_IDX				3
#define DALLAS_A3_IDX				4
#define DALLAS_A4_IDX				5
#define DALLAS_A5_IDX				6
#define DALLAS_CRC_IDX				7			// crc code

// dallas return error codes
#define DALLAS_NO_ERROR				0			// all is well
#define DALLAS_PRESENCE				'h'			// presence was detected
#define DALLAS_NO_PRESENCE			'g'			// presence wasn't detected
#define DALLAS_VERIFY_ERROR			'v'			// setup verification failed
#define DALLAS_ADDRESS_ERROR		'a'			// bad address for command: either wrong family or bad CRC
#define DALLAS_CRC_ERROR			'c'			// data/return value fails CRC check
#define DALLAS_DEVICE_ERROR			'd'			// device not responding
#define DALLAS_NULL_POINTER			'p'			// dallas function passed a NULL pointer
#define DALLAS_ZERO_LEN				'z'			// ReadRAM or WriteRAM asked to read/write zero bytes
#define DALLAS_BUS_ERROR			'b'			// Bus hardware error. (wrong voltage) Possible causes:
													// - lack of pullup Resistor
													// - Other master transmitting (Dallas is not multi-master)
													// - Device failure
// ds2450 and ds18b20 errors
// defined here to work with PrintError
#define DALLAS_RESOLUTION_ERROR		'r'			// invalid resolution specified in Dallas function
#define DALLAS_INVALID_CHANNEL		'i'			// channel outside the range 'A' to 'D'
#define DALLAS_FORMAT_ERROR			'f'			// results are not in a valid format (temp sensor)

// ROM commands
#define DALLAS_READ_ROM				0x33
#define DALLAS_MATCH_ROM			0x55
#define DALLAS_SKIP_ROM				0xCC
#define DALLAS_SEARCH_ROM			0xF0
#define DALLAS_CONDITIONAL_SEARCH	0xEC
#define DALLAS_READ_MEMORY			0xAA
#define DALLAS_WRITE_MEMORY			0x55

//----- Typedefs --------------------------------------------------------------

// typedef for the rom IDs
// done so we can access the entire id or each individual byte
typedef union dallas_rom_id_U
{
	long long id;
	u08 byte[8];
} dallas_rom_id_T;

//----- Functions ---------------------------------------------------------------

// dallasInit()
//     Initializes the Dallas 1-wire Bus
//     Currently this function does nothing
void dallasInit(void);

// dallasReset()
//     performs a reset on the 1-wire bus
//     returns the presence detect (DALLAS_PRESENCE or DALLAS_NO_PRESENCE)
u08  dallasReset(void);

// dallasReadBit()
//     reads a bit from the 1-wire bus and returns this bit
//     note: global interupts are not disabled in this function
//           if using this function, use cli() and sei() before and after
u08  dallasReadBit(void);

// dallasWriteBit()
//     writes the passed in bit to the 1-wire bus
//     note: global interupts are not disabled in this function
//           if using this function, use cli() and sei() before and after
void dallasWriteBit(u08 bit);

// dallasReadByte()
//     reads a byte from the 1-wire bus and returns this byte
//     note: global interupts are disabled in this function
u08  dallasReadByte(void);

// dallasWriteByte()
//     writes the passed in byte to the 1-wire bus
//     note: global interupts are disabled in this function.
void dallasWriteByte(u08 byte);

// dallasReadRAM()
//     reads the RAM from the specified device, at the specified RAM address
//     for the specified length.  Data is stored into data variable
u08  dallasReadRAM(dallas_rom_id_T* rom_id, u16 addr, u08 len, u08 *data);

// dallasWriteRAM()
//     writes the specified data for the specified length to the RAM
//     located at the specified address of the specified device
u08  dallasWriteRAM(dallas_rom_id_T* rom_id, u16 address, u08 len, u08* data);

// dallasWaitUntilDone()
//     waits until the conversion of a dallas device is done
void dallasWaitUntilDone(void);

// dallasReadROM()
//     finds the ROM code of a device if only 1 device is
//     connected to the bus the ROM value is passed by referenced
//     returns any error that occured or DALLAS_NO_ERROR
u08 dallasReadROM(dallas_rom_id_T* rom_id);

// dallasMatchROM()
//     performs a reset on the 1-wire bus and then
//     selects the specified dallas device on the network
//     returns any error that occured or DALLAS_NO_ERROR
u08  dallasMatchROM(dallas_rom_id_T* rom_id);

// dallasPrintROM
//     prints the ROM from MSB to LSB in the format: xx xx xx xx xx xx xx xx
void dallasPrintROM(dallas_rom_id_T* rom_id);

// dallasAddressCheck()
//     checks to make sure that the rom id is in the proper family,
//     and if the crc of the id is correct
//     returns the corresponding error or DALLAS_NO_ERROR
u08  dallasAddressCheck(dallas_rom_id_T* rom_id, u08 family);

// dallasCRC()
//     calculates the CRC from the lookup table
//     returns the new crc value, which is also a global variable
u08  dallasCRC(u08 i);

// dallasFindDevices()
//     finds all the devices on the network, or up to the maximum defined value
//     stores the ids in the given array, and returns the number of devices found
u08  dallasFindDevices(dallas_rom_id_T rom_id[]);

// dallasPrintError()
//     prints the error value as well as an error message if there was an error
//     if DALLAS_NO_ERROR is passed in, nothing is done
void dallasPrintError(u08 error);

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
男女性色大片免费观看一区二区 | 成人永久aaa| 欧美大胆人体bbbb| 国产精品一二一区| 国产人妖乱国产精品人妖| 成人永久aaa| 亚洲一区二区三区四区在线免费观看| 在线视频中文字幕一区二区| 亚洲国产精品人人做人人爽| 666欧美在线视频| 激情小说亚洲一区| 日韩一区在线免费观看| 欧美日韩在线播放三区| 毛片不卡一区二区| 国产精品色在线观看| 欧美在线不卡视频| 蜜桃精品在线观看| 国产精品欧美精品| 欧美视频一区二区三区在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产91精品一区二区麻豆网站| 国产精品视频一二三| 欧美日韩一区在线| 国内精品伊人久久久久av影院| 欧美激情一区二区三区| 欧美日韩一区二区三区视频 | 国产一区二区三区久久悠悠色av | 91成人免费电影| 精品一区二区在线看| 日韩毛片精品高清免费| 日韩一区二区免费在线电影| 成人免费视频app| 日韩高清在线不卡| 综合久久久久综合| 日韩女优制服丝袜电影| 色综合天天性综合| 久久国产日韩欧美精品| 亚洲男人的天堂在线观看| 欧美成人一区二区三区在线观看| www.色精品| 久久er99精品| 亚洲午夜久久久久久久久电影院 | 成人性生交大合| 日韩主播视频在线| 中文字幕在线不卡视频| 精品国产91乱码一区二区三区 | 欧美日韩国产综合一区二区| 丁香六月久久综合狠狠色| 麻豆国产欧美一区二区三区| 亚洲精品成人悠悠色影视| 国产无一区二区| 日韩欧美中文一区二区| 欧美精品日韩一区| 色av成人天堂桃色av| 成人黄动漫网站免费app| 久久精品国内一区二区三区| 日韩国产高清在线| 午夜精品免费在线观看| 亚洲一二三区不卡| 樱花影视一区二区| 亚洲狼人国产精品| 亚洲三级电影网站| 亚洲三级视频在线观看| 亚洲丝袜另类动漫二区| 国产精品成人免费精品自在线观看| 久久久三级国产网站| 精品国产伦一区二区三区观看方式| 欧美精品 日韩| 欧美日韩久久一区| 欧洲精品中文字幕| 91久久精品午夜一区二区| 日本韩国欧美一区二区三区| 色妞www精品视频| 91久久精品一区二区三| 91福利在线导航| 欧美三级电影网站| 7878成人国产在线观看| 7777精品伊人久久久大香线蕉的 | 国产成人亚洲精品狼色在线| 精品在线播放免费| 国产成人亚洲综合a∨婷婷| 国产精品影视网| 北岛玲一区二区三区四区| 不卡的电视剧免费网站有什么| 成人av免费在线播放| 91视频免费播放| 欧洲一区二区av| 91精品国产免费| 久久人人97超碰com| 久久久久亚洲综合| 国产精品成人在线观看| 亚洲黄色小说网站| 男人的天堂久久精品| 国产呦萝稀缺另类资源| 99久久精品情趣| 欧美日韩一区三区| 欧美精品一区二区久久婷婷| 国产精品免费观看视频| 亚洲一区二区三区激情| 久久机这里只有精品| av亚洲精华国产精华| 精品视频在线免费看| 欧美一区二区三区视频在线观看| 久久综合给合久久狠狠狠97色69| 欧美极品aⅴ影院| 亚洲在线视频网站| 精品一区二区三区久久| 波多野结衣在线aⅴ中文字幕不卡| 91免费观看在线| 日韩欧美一级二级三级| 中文字幕亚洲区| 日韩综合小视频| av午夜一区麻豆| 精品美女一区二区| 一区二区三区四区亚洲| 狠狠色狠狠色综合日日91app| 不卡的电视剧免费网站有什么| 在线电影国产精品| 国产精品久99| 久久国产精品色| 欧美日韩一区二区三区高清 | 日韩一区二区三区在线视频| 国产精品国产三级国产aⅴ无密码| 天天综合网 天天综合色| 福利一区在线观看| 日韩情涩欧美日韩视频| 亚洲一区成人在线| 成人三级在线视频| 欧美变态tickling挠脚心| 亚洲小说春色综合另类电影| 国产盗摄女厕一区二区三区| 欧美三级在线播放| 亚洲视频一二区| 国产99久久久久| 日韩精品一区二区三区四区| 一区二区三区精品久久久| 国产成人综合在线| 精品国产乱码久久久久久图片| 亚洲永久免费av| 99久久精品免费看国产免费软件| 精品福利二区三区| 日本欧洲一区二区| 精品1区2区3区| 亚洲一区二区三区在线看| 99精品国产91久久久久久| 国产婷婷一区二区| 狠狠色综合日日| 精品国产欧美一区二区| 美国一区二区三区在线播放| 欧美日本不卡视频| 亚洲va国产va欧美va观看| 91福利视频网站| 亚洲欧美一区二区三区极速播放 | 日韩一区二区三区在线观看| 一区二区三区美女视频| 91麻豆swag| 综合欧美一区二区三区| 99久久国产综合精品麻豆| 久久九九久久九九| 国产精品资源站在线| 久久久久国色av免费看影院| 精品一区二区在线看| 久久综合一区二区| 国产一区二区电影| 久久先锋影音av鲁色资源网| 国产一区二区主播在线| 26uuu精品一区二区在线观看| 麻豆91在线观看| 精品国产免费人成电影在线观看四季 | 日韩精品一区二区三区老鸭窝| 日韩中文字幕区一区有砖一区| 精品视频一区三区九区| 午夜精品一区在线观看| 欧美乱熟臀69xxxxxx| 免费三级欧美电影| 精品国产成人系列| 成人久久视频在线观看| 国产精品成人午夜| 欧美日韩一区二区三区四区五区 | 欧美日韩www| 日本中文字幕一区二区视频| 精品少妇一区二区三区在线播放| 国产最新精品精品你懂的| 亚洲精品一区二区三区福利| 久久成人免费日本黄色| 国产精品麻豆视频| 欧美日韩一级黄| 国产自产v一区二区三区c| 亚洲国产精品成人综合色在线婷婷| 99这里都是精品| 亚洲一区二区三区三| 欧美刺激脚交jootjob| 成人av网址在线| 性感美女久久精品| 国产欧美日韩在线观看| 欧美在线不卡一区| 狠狠色狠狠色综合日日91app| 国产精品久久久久四虎| 欧美日韩第一区日日骚| 国产精品一区专区|