co_pdo1.c

来自「在pic单片机上实现canopen协议通讯」· C语言 代码 · 共 168 行

C
168
字号


// The communications conducted in this object incorporates 
// one transmit and one receive endpoint


									// Global definitions
#include	"CO_TYPES.H"			// Data types
#include	"CO_DICT.H"				
#include	"CO_COMM.H"				// Communications
#include	"CO_PDO.H"				// PDO functions



rom unsigned long uRPDOMap1 = 0x02292312L;
rom unsigned long uRPDOMap2 = 0x38947928L;
rom unsigned long uRPDOMap3 = 0x02292312L;
rom unsigned long uRPDOMap4 = 0x38947928L;


// Process access events to the COB ID
void _CO_COMM_RPDO1_COBIDAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}


// Process access events to the transmission type
void _CO_COMM_RPDO1_TypeAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}






// Process access events to the COB ID
void _CO_COMM_TPDO1_COBIDAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}


// Process access events to the transmission type
void _CO_COMM_TPDO1_TypeAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}


// Process access events to the inhibit time
void _CO_COMM_TPDO1_ITimeAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}


// Process access events to the event timer
void _CO_COMM_TPDO1_ETimeAccessEvent(void)
{
	switch (mCO_DictGetCmd())
	{
		case DICT_OBJ_INFO:		// Get information about the object
			// The application should use this to load the 
			// structure with legth, access, and mapping.
			break;

		case DICT_OBJ_READ: 	// Read the object
			// The application should use this to load the buffer 
			// with the requested data.
			break;

		case DICT_OBJ_WRITE: 	// Write the object
			// The application should use this to write the object  
			// with the specified data.
			break;
	}	
}







⌨️ 快捷键说明

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