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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? conn6.c

?? microchip公司的DeviceNet協(xié)議桟源碼
?? C
字號(hào):
/*****************************************************************************
 *
 * Microchip DeviceNet Stack (Unconnected Explicit Messaging Connection Object Source)
 *
 *****************************************************************************
 * FileName:        conn6.c
 * Dependencies:    
 * Processor:       PIC18F with CAN
 * Compiler:       	C18 02.20.00 or higher
 * Linker:          MPLINK 03.40.00 or higher
 * Company:         Microchip Technology Incorporated
 *
 * Software License Agreement
 *
 * The software supplied herewith by Microchip Technology Incorporated
 * (the "Company") is intended and supplied to you, the Company's
 * customer, for use solely and exclusively with products manufactured
 * by the Company. 
 *
 * The software is owned by the Company and/or its supplier, and is 
 * protected under applicable copyright laws. All rights are reserved. 
 * Any use in violation of the foregoing restrictions may subject the 
 * user to criminal sanctions under applicable laws, as well as to 
 * civil liability for the breach of the terms and conditions of this 
 * license.
 *
 * THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, 
 * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED 
 * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
 * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, 
 * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR 
 * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 *
 *
 * This file contains firmware to handle Unconnected Explicit Messaging within
 * the Connection Object. The code in this object is much simpler than I/O
 * and Explicit Objects because the requirements defined in the specification
 * are significantly less.
 * 
 *
 *
 * Author               Date        Comment
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Ross Fosler			04/28/03	...	
 * 
 *****************************************************************************/

#include	"dnet.def"			// Global definitions file
#include 	"typedefs.h"

#include	"conn.h"			// Connection prototypes and symbols

#include	"services.h"		// Service codes
#include	"errors.h"			// Error codes
#include	"class.h"			// Class codes

#include	"route.h"			// Global symbols defined by the router
#include	"dnet.h"			// DeviceNet prototypes and symbols
#include	"CAN.h"


#pragma	udata
/*********************************************************************
 * Connection related variables
 ********************************************************************/
CONN_PRIV	 	uConn6;

unsigned char	uConn6RxBuffer[8];
unsigned char	uConn6TxBuffer[8];



/*********************************************************************
 * Function:        unsigned char _Conn6Create(void)
 *
 * PreCondition:    The CAN (or other) driver must be prepared to 
 *					accept some filter settings.
 *
 * Input:       	none	
 *                  
 * Output:      	unsigned char handle to the connection	
 *
 * Side Effects:    none
 *
 * Overview:        This function creates a connection 
 *					in the predefined set and returns a 
 *					handle to the connection. 
 *
 * Note:            This function is not called directly by 
 *					application code.
 ********************************************************************/
unsigned char _Conn6Create(void)
{
	unsigned int test;
	
	// Setup the pointers to the buffers
	uConn6.rx.pMsg = uConn6RxBuffer;
	uConn6.tx.pMsg = uConn6TxBuffer;

	// Setup the maximum length of the buffers
   	uConn6.rx.lenMax = uConn6.tx.lenMax = 8;
	
	// Setup the produced and consummed CID	
	uConn6.attrib.consumed_cid.bytes.LSB = 0xC0;
	uConn6.attrib.produced_cid.bytes.LSB = 0x60;
	uConn6.attrib.consumed_cid.bytes.MSB = uConn6.attrib.produced_cid.bytes.MSB = uDNet.MACID | 0x80;
//	uConn6.attrib.consumed_cid.word = uConn6.attrib.produced_cid.word = 1024 | (uDNet.MACID << 3) | 6;
			
	//Issue a request to the driver to start receiving the CID	
	CANSetFilter(uConn6.attrib.consumed_cid.word);
	return (6);
}


/*********************************************************************
 * Function:        unsigned char _Conn6Close()
 *
 * PreCondition:    The connection should have already been open.
 *
 * Input:       	none
 *                  
 * Output:      	unsigned char instance that closed
 *
 * Side Effects:    none
 *
 * Overview:        Closes the specified connection. 
 *
 * Note:            none
 ********************************************************************/
unsigned char _Conn6Close()
{
	CANClrFilter(uConn6.attrib.consumed_cid.word);

	return(1);
}



/*********************************************************************
 * Function:        void _Conn6RxEvent(void)
 *
 * PreCondition:    none
 *
 * Input:       	none
 *                  
 * Output:      	none
 *
 * Side Effects:    none
 *
 * Overview:        Process received data for this connection.
 *
 * Note:            This event occures when data has been received
 *					for this connection instance.
 ********************************************************************/
void _Conn6RxEvent(void)
{
	BYTE header, classId, service;
	unsigned char *pRxData;
	
	// Get the pointer to the received data
	pRxData = CANGetRxDataPtr();

	// Extract the header, service, and class information
	header.byte = *pRxData;
	service.byte = *(pRxData + 1);
	classId.byte = *(pRxData + 2);


	if (((header.byte ^ uDNet.AllocInfo.MasterMACID & 0x3F) == 0) ||
		(uDNet.AllocInfo.MasterMACID == 0xFF) ||
		((classId.byte == CLASS_DEVICENET) && (service.byte == SRVS_RELEASE_CONN)))
	{

		// Get the length of the message
		uConn6.rx.len = CANGetRxCnt();

		// Copy the message to the connection buffer
		CANGetRxDataTyp0(uConn6RxBuffer);
				
		// Indicate a complete section of data has been received
		_rxFlag.bits.uexpl = 1;
	}

	// Release the hardware
	CANRead();
}




/*********************************************************************
 * Function:        void _Conn6TxOpenEvent(void)
 *
 * PreCondition:    A transmit request must have been made.
 *
 * Input:       	none	
 *                  
 * Output:      	none
 *
 * Side Effects:    none
 *
 * Overview:        Process open transmit que event
 *
 * Note:            This event occurs when the buffer is available 
 *					for this connection instance to transmit. A 
 *					transmit request must have been made to enter 
 *					this function.
 ********************************************************************/
void _Conn6TxOpenEvent(void)
{
	// Copy the message to the hardware buffer
	CANPutTxDataTyp0(uConn6TxBuffer);
   	
   	// Set the produced CID
   	CANPutTxCID(uConn6.attrib.produced_cid.word);

  	// Set the length of the message
   	CANPutTxCnt(uConn6.tx.len);

   	// Request the hardware to queue the message to send
   	CANSend(6);

	// Clear the transmit flag to open access to the write buffer
	_txFlag.bits.uexpl = 0;
}


/*********************************************************************
 * Function:        void _Conn6TxEvent(void)
 *
 * PreCondition:    Data must have been queued to transmit.
 *
 * Input:       	none	
 *                  
 * Output:      	none
 *
 * Side Effects:    none
 *
 * Overview:        Process data for this connection.
 *
 * Note:            This event occurs when the buffer has successfully
 *					placed the requested data on the bus.
 ********************************************************************/
void _Conn6TxEvent(void)
{
	// Set flag indicating data has been placed on the bus
	_txFinFlags.bits.uexpl = 1;
	
	// This particular connection does nothing with this event
}









?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国偷自产一区二区三区成为亚洲经典 | 91色porny蝌蚪| 国产精品久久久久久一区二区三区| 国产夫妻精品视频| 中文字幕五月欧美| 欧美日韩中文一区| 老色鬼精品视频在线观看播放| 精品美女在线观看| 成人少妇影院yyyy| 亚洲自拍偷拍图区| 欧美大片免费久久精品三p| 国产精品99久久不卡二区| 中文字幕一区二区三区四区不卡| 欧美亚洲一区三区| 麻豆传媒一区二区三区| 欧美韩日一区二区三区四区| 色综合久久久久| 日本成人在线一区| 国产精品三级av| 欧美丝袜自拍制服另类| 国产一区二区日韩精品| 成人免费一区二区三区视频 | 日韩伦理免费电影| 欧美日韩综合色| 国产美女主播视频一区| 一区二区在线观看免费视频播放| 欧美一区二区在线观看| 国产不卡视频在线观看| 午夜精品爽啪视频| 国产精品麻豆一区二区| 欧美一区二区三区思思人| 成人黄色网址在线观看| 日韩高清在线电影| 亚洲视频在线一区观看| 欧美电影免费观看高清完整版| 91亚洲午夜精品久久久久久| 久久精品国产色蜜蜜麻豆| 亚洲欧美激情在线| 精品入口麻豆88视频| 欧美又粗又大又爽| 成人免费av资源| 奇米在线7777在线精品| 亚洲综合一区二区三区| 欧美激情艳妇裸体舞| 欧美一区二区三区在线观看| 色噜噜夜夜夜综合网| 国产精品自在在线| 喷水一区二区三区| 亚洲国产精品影院| 亚洲欧美日韩中文播放| 国产欧美日韩麻豆91| 日韩你懂的在线观看| 欧美日韩一区三区| 91精品1区2区| 91丨九色丨蝌蚪富婆spa| 国产成人精品1024| 国产一区二区日韩精品| 美国毛片一区二区| 五月激情六月综合| 亚洲成人av免费| 亚洲自拍另类综合| 一区二区视频免费在线观看| 国产精品美女www爽爽爽| 国产午夜精品福利| 国产亚洲综合在线| 久久品道一品道久久精品| 精品国产一区a| 精品久久久久久最新网址| 91麻豆精品国产自产在线| 欧美日韩国产大片| 欧美日韩国产色站一区二区三区| 91福利国产精品| 在线免费精品视频| 欧美四级电影在线观看| 欧美亚洲综合一区| 欧美伦理影视网| 欧美日韩免费一区二区三区视频| 欧美日韩视频专区在线播放| 欧洲国产伦久久久久久久| 91成人在线观看喷潮| 欧美最新大片在线看 | 精品欧美一区二区在线观看| 日韩精品一区二区在线观看| 精品国产不卡一区二区三区| 精品国产三级电影在线观看| 久久人人超碰精品| 欧美国产在线观看| 国产精品黄色在线观看| 亚洲欧美日韩小说| 亚洲va欧美va国产va天堂影院| 午夜不卡在线视频| 久久99久久精品| 国产成人精品三级| 91电影在线观看| 欧美一区中文字幕| 国产人成亚洲第一网站在线播放| 中文字幕在线不卡国产视频| 一二三四社区欧美黄| 日韩制服丝袜先锋影音| 韩国精品一区二区| 91在线云播放| 777欧美精品| 国产视频一区二区在线| 亚洲男同性恋视频| 日本欧美在线观看| 豆国产96在线|亚洲| 欧美羞羞免费网站| 精品国产91久久久久久久妲己 | 一区二区免费看| 久久国产人妖系列| 97se狠狠狠综合亚洲狠狠| 91麻豆精品久久久久蜜臀| 久久九九久精品国产免费直播| 亚洲免费观看高清完整版在线观看熊| 视频一区视频二区中文| 国产99久久久国产精品潘金网站| 91黄色激情网站| 国产三级精品视频| 性久久久久久久| 成人性生交大片免费看在线播放 | 91在线观看高清| 日韩欧美www| 亚洲精品乱码久久久久久黑人| 美女精品一区二区| 色偷偷久久一区二区三区| 欧美va亚洲va香蕉在线| 亚洲一区二区三区美女| 国产乱码精品1区2区3区| 精品视频123区在线观看| 国产欧美日韩精品一区| 老司机精品视频在线| 欧美在线|欧美| 国产精品美女久久久久久久久久久 | 亚洲福利一二三区| 久久99精品国产.久久久久| 99这里都是精品| 欧美一区二区三区视频在线| 亚洲美女在线一区| 国产精品99久久不卡二区| 91精品国产麻豆| 亚洲一区二区三区四区在线观看 | 亚洲国产精品一区二区尤物区| 成人永久免费视频| 精品日韩av一区二区| 亚洲成人一区在线| 国产乱人伦精品一区二区在线观看| 欧美又粗又大又爽| 国产精品美女一区二区三区| 国产又粗又猛又爽又黄91精品| 91精品国产综合久久久蜜臀图片| ...xxx性欧美| 成人黄色国产精品网站大全在线免费观看 | 欧美a一区二区| 欧美群妇大交群中文字幕| 亚洲日本电影在线| 成人免费毛片片v| 国产亚洲精品精华液| 国产曰批免费观看久久久| 精品国产亚洲一区二区三区在线观看| 日韩av一区二| 正在播放一区二区| 日韩中文字幕亚洲一区二区va在线 | 精品99一区二区三区| 美女被吸乳得到大胸91| 欧美一级艳片视频免费观看| 天天做天天摸天天爽国产一区 | 国产亚洲一区二区三区四区| 国产美女精品一区二区三区| 久久综合九色综合欧美亚洲| 久久er精品视频| 亚洲精品一区二区三区蜜桃下载| 精品一区二区三区影院在线午夜| 日韩精品中文字幕在线一区| 美国av一区二区| 久久综合九色综合久久久精品综合| 国产一区二区三区高清播放| 欧美经典三级视频一区二区三区| 国产aⅴ精品一区二区三区色成熟| 中文字幕不卡一区| 色先锋资源久久综合| 亚洲成人综合视频| 欧美电影免费观看完整版| 国产乱一区二区| √…a在线天堂一区| 欧美日韩综合在线免费观看| 麻豆精品在线看| 久久精品在线观看| 色综合久久久久综合99| 午夜精品在线视频一区| 精品国产成人在线影院| 成人国产免费视频| 亚洲午夜免费电影| 日韩欧美的一区二区| 成人性视频网站| 亚洲国产成人av| 久久久亚洲国产美女国产盗摄 | 91麻豆swag| 久久精品久久99精品久久| 国产精品免费视频观看| 欧美日韩国产片|