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

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

?? dallas.h

?? 國外牛人公開的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一区二区三区免费野_久草精品视频
欧美电影精品一区二区| 国产精品全国免费观看高清 | 2014亚洲片线观看视频免费| 免费成人av资源网| 精品乱人伦一区二区三区| 激情av综合网| 国产亚洲精品aa午夜观看| 99久久精品免费看国产| 亚洲欧美日韩系列| 欧美精品 日韩| 国产精品99久久久久久宅男| 亚洲老司机在线| 日韩精品一区二区三区中文精品| 成人性生交大片免费看中文| 亚洲成av人在线观看| 国产日韩av一区二区| 欧美撒尿777hd撒尿| 国产一区二区三区四区五区入口 | 日本福利一区二区| 久久av中文字幕片| 一区二区三区在线看| 26uuu国产在线精品一区二区| 色狠狠综合天天综合综合| 久久国产精品99精品国产| 一级做a爱片久久| 欧美激情中文字幕| 日韩欧美一卡二卡| 欧美日韩三级一区二区| 9色porny自拍视频一区二区| 麻豆精品在线看| 夜夜亚洲天天久久| 中文一区在线播放| 2024国产精品| 在线综合视频播放| 日本电影欧美片| 99综合影院在线| 国产suv一区二区三区88区| 久久99热99| 日日欢夜夜爽一区| 亚洲香蕉伊在人在线观| 中文字幕中文在线不卡住| www成人在线观看| 26uuu国产在线精品一区二区| 欧美精品九九99久久| 91成人免费在线视频| 成人不卡免费av| 成人精品gif动图一区| 国产高清精品在线| 国产尤物一区二区在线| 国产在线视频精品一区| 久久精品99国产精品日本| 亚洲a一区二区| 亚洲福利国产精品| 亚洲成人激情综合网| 亚洲高清视频的网址| 亚洲成av人片一区二区梦乃| 视频一区二区中文字幕| 蜜芽一区二区三区| 视频一区视频二区中文| 日韩不卡在线观看日韩不卡视频| 婷婷久久综合九色综合伊人色| 五月激情综合网| 久久国产欧美日韩精品| 国产精品88av| 99久久99久久综合| 欧美伊人久久大香线蕉综合69| 欧美自拍偷拍午夜视频| 91精品国产综合久久久久 | 偷拍自拍另类欧美| 日韩黄色片在线观看| 日本系列欧美系列| 韩国成人福利片在线播放| 成人小视频免费观看| 色哟哟精品一区| 在线不卡一区二区| 久久综合九色综合97婷婷女人 | 亚洲丝袜美腿综合| 亚洲成人tv网| 精品一区二区三区视频在线观看| 国产精品996| 欧美综合亚洲图片综合区| 精品少妇一区二区三区免费观看| 久久九九久久九九| 亚洲免费观看高清在线观看| 免费看精品久久片| 99久久99久久免费精品蜜臀| 91精品国产综合久久蜜臀| 久久久国产精品不卡| 亚洲成人免费观看| 岛国av在线一区| 欧美绝品在线观看成人午夜影视 | 国产一区欧美一区| 99久久久久久99| 日韩欧美123| 亚洲欧洲三级电影| 丝袜亚洲精品中文字幕一区| 国产福利一区在线| 欧美性色黄大片手机版| 国产清纯美女被跳蛋高潮一区二区久久w| 亚洲欧美日韩久久| 国产在线一区二区综合免费视频| 色综合天天性综合| 久久综合狠狠综合久久综合88 | 欧美精品 日韩| 国产精品国产成人国产三级| 天天免费综合色| 91麻豆国产福利精品| 精品国产一区二区三区不卡| 亚洲精品久久久蜜桃| 国产美女主播视频一区| 欧美精品视频www在线观看| 国产精品乱人伦| 看片网站欧美日韩| 欧美日韩精品一区二区三区| 国产精品久久网站| 国产精品一卡二卡| 日韩欧美综合在线| 亚洲午夜免费视频| 一本大道久久a久久精二百| 久久久久久97三级| 国产美女一区二区三区| 欧美哺乳videos| 日韩激情av在线| 欧美日韩精品电影| 亚洲自拍偷拍图区| 91色综合久久久久婷婷| 欧美国产日韩在线观看| 国产乱妇无码大片在线观看| 欧美一区二区三区人| 日韩综合小视频| 欧美三区在线观看| 午夜视频在线观看一区二区| 色久优优欧美色久优优| 夜夜嗨av一区二区三区四季av| 91丝袜呻吟高潮美腿白嫩在线观看| 久久久久久麻豆| 国产一二三精品| 欧美韩国日本一区| 国产电影一区在线| 成人欧美一区二区三区白人| 成人avav影音| 亚洲精品中文在线| 欧美午夜一区二区| 日韩精品91亚洲二区在线观看| 666欧美在线视频| 另类小说欧美激情| 精品久久久久久久人人人人传媒| 精品一区二区三区视频| 精品福利一区二区三区| 国产一区 二区| 亚洲欧美国产三级| 欧美三级日韩三级国产三级| 日韩在线播放一区二区| 精品国产一区二区三区久久久蜜月| 国产精品一区二区在线看| 日本一区二区三区电影| 91色porny在线视频| 亚洲成年人影院| 久久夜色精品一区| 91亚洲永久精品| 日韩精品一二三四| 国产人成一区二区三区影院| 91玉足脚交白嫩脚丫在线播放| 一区二区三区中文字幕电影 | 日一区二区三区| 欧美国产国产综合| 91精品久久久久久久99蜜桃| 国产成人免费高清| 亚洲成a人片在线不卡一二三区| 精品国产三级电影在线观看| 不卡一卡二卡三乱码免费网站| 亚洲成人激情综合网| 久久久国际精品| 欧美老女人在线| 成人一区二区三区视频| 亚洲一二三四区| 国产无人区一区二区三区| 色综合咪咪久久| 久久99精品国产.久久久久久 | 亚洲人成网站精品片在线观看| 欧美夫妻性生活| 懂色av中文字幕一区二区三区| 亚洲3atv精品一区二区三区| 国产精品免费久久久久| 日韩一区二区电影在线| 色吧成人激情小说| 国产精一区二区三区| 午夜久久久久久久久久一区二区| 中文字幕欧美国产| 欧美一区二区播放| 欧美伊人久久久久久午夜久久久久| 国产传媒久久文化传媒| 日韩在线观看一区二区| 一区二区三区欧美| 国产精品萝li| 欧美精品一区二区三区四区 | 精品黑人一区二区三区久久| 91国产福利在线| 91免费国产视频网站| 国产精品123|