atmel_spi_ioctl.h

来自「Windows CE documentation and examples fr」· C头文件 代码 · 共 60 行

H
60
字号
//-----------------------------------------------------------------------------
//! \addtogroup	SPI
//! @{
//!
//  All rights reserved ADENEO SAS 2005
//!
//-----------------------------------------------------------------------------
//! \file		atmel_spi_ioctl.h
//!
//! \brief		Custom SPI IOCTLs declaration file
//!
//! \if subversion
//!   $URL: http://centaure/svn/interne-ce_bsp_atmel/BRANCHES/CE60/RReflect/PLATFORM/COMMON/SRC/SOC/ATMEL/COMMON/INC/IOCTL/atmel_spi_ioctl.h $
//!   $Author: ltourlonias $
//!   $Revision: 1309 $
//!   $Date: 2007-08-20 23:41:14 -0700 (Mon, 20 Aug 2007) $
//! \endif
//!
//! IOControl used by application for interaction and transaction with the SPI driver
//-----------------------------------------------------------------------------


#ifndef __AT91SAM926X_SPI_IOCTL_H__
#define __AT91SAM926X_SPI_IOCTL_H__


//! \struct T_SPI_TRANSACTION_PARAM
//! \brief this strcuture is used to pass parameters to SPI_IOControl
typedef struct {
	PVOID pRxBuffer;	/*! < \brief location of the destination data */
	PVOID pTxBuffer;	/*! < \brief location of the source data */
	DWORD dwSize;		/*! < \brief size of the buffer*/	
} T_SPI_TRANSACTION_ELEMENT_PARAM;


// Functions
#define SPI_TRANSACTION_CMD			(2048 + 1)
#define SPI_STOP_LOOPBACK_CMD		(2048 + 2)
#define SPI_START_LOOPBACK_CMD		(2048 + 3)

/*! \def IOCTL_SPI_TRANSACTION	
	\brief Command code for performing a SPI transaction
*/

#define IOCTL_SPI_TRANSACTION	CTL_CODE(FILE_DEVICE_SERIAL_PORT, SPI_TRANSACTION_CMD, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_POST_STOP_LOOPBACK	CTL_CODE(FILE_DEVICE_SERIAL_PORT, SPI_STOP_LOOPBACK_CMD, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_POST_START_LOOPBACK	CTL_CODE(FILE_DEVICE_SERIAL_PORT, SPI_START_LOOPBACK_CMD, METHOD_BUFFERED, FILE_ANY_ACCESS)



#endif // #ifndef __AT91SAM926X_SPI_IOCTL_H__


// End of Doxygen group SPI
//! @}
//-----------------------------------------------------------------------------
// End of $URL: http://centaure/svn/interne-ce_bsp_atmel/BRANCHES/CE60/RReflect/PLATFORM/COMMON/SRC/SOC/ATMEL/COMMON/INC/IOCTL/atmel_spi_ioctl.h $
//-----------------------------------------------------------------------------
//

⌨️ 快捷键说明

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