⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nap.h

📁 Linux Kernel 2.6.9 for OMAP1710
💻 H
字号:
/****************************************************************************//* *	nap.h -- Marconi/NAP support. * * 	(C) Copyright 2001, SnapGear (www.snapgear.com)  *//****************************************************************************/#ifndef	nap_h#define	nap_h/****************************************************************************/#include <linux/config.h>/****************************************************************************/#ifdef CONFIG_MARCONINAP/****************************************************************************/#ifdef CONFIG_COLDFIRE#include <asm/coldfire.h>#include <asm/mcfsim.h>#endif/* *	Command to support selecting RS232 or RS422 mode on the *	second COM port. */#define	TIOCSET422	0x4d01		/* Set port mode 232 or 422 */#define	TIOCGET422	0x4d02		/* Get current port mode *//* *	Low level control of the RS232/422 enable. */#define	MCFPP_PA11	0x0800#ifndef __ASSEMBLY__/* *	RS232/422 control is via the single PA11 line. Low is the RS422 *	enable, high is RS232 mode. */static __inline__ unsigned int mcf_getpa(void){	volatile unsigned short *pp;	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);	return((unsigned int) *pp);}static __inline__ void mcf_setpa(unsigned int mask, unsigned int bits){	volatile unsigned short *pp;	unsigned long		flags;	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);	save_flags(flags); cli();	*pp = (*pp & ~mask) | bits;	restore_flags(flags);}#endif /* __ASSEMBLY__ *//****************************************************************************/#if defined(CONFIG_M5272)/* *	Marconi/NAP based hardware. DTR/DCD lines are wired to GPB lines. */#define	MCFPP_DCD0	0x0080#define	MCFPP_DCD1	0x0020#define	MCFPP_DTR0	0x0040#define	MCFPP_DTR1	0x0010#ifndef __ASSEMBLY__/* *	These functions defined to give quasi generic access to the *	PPIO bits used for DTR/DCD. */static __inline__ unsigned int mcf_getppdata(void){	volatile unsigned short *pp;	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);	return((unsigned int) *pp);}static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits){	volatile unsigned short *pp;	pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);	*pp = (*pp & ~mask) | bits;}#endif /* __ASSEMBLY__ */#endif /* CONFIG_M5272 *//****************************************************************************/#endif /* CONFIG_MARCONINAP *//****************************************************************************/#endif	/* nap_h */

⌨️ 快捷键说明

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