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

📄 lib_at91sam7s128_h.html

📁 atmel at91sam7s和7x下
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_DBGU_GetInterruptMaskStatus">AT91F_DBGU_GetInterruptMaskStatus</a></b></font>
<font color=#B22222>//* \brief Return <a href="AT91SAM7S128_DBGU.html#DBGU">DBGU</a> Interrupt Mask Status</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> <a href="#AT91F_DBGU_GetInterruptMaskStatus">AT91F_DBGU_GetInterruptMaskStatus</a>( <font color=#B22222>// \<font color=#0000FF>return</font> <a href="AT91SAM7S128_DBGU.html#DBGU">DBGU</a> Interrupt Mask Status</font>
        <a href="AT91SAM7S128_h.html#AT91PS_DBGU">AT91PS_DBGU</a> pDbgu) <font color=#B22222>// \arg  pointer to a <a href="AT91SAM7S128_DBGU.html#DBGU">DBGU</a> controller</font>
{
        <font color=#0000FF>return</font> pDbgu-><a href="AT91SAM7S128_DBGU.html#DBGU_IMR">DBGU_IMR</a>;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_DBGU_IsInterruptMasked">AT91F_DBGU_IsInterruptMasked</a></b></font>
<font color=#B22222>//* \brief Test <font color=#0000FF>if</font> <a href="AT91SAM7S128_DBGU.html#DBGU">DBGU</a> Interrupt is Masked </font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>int</font> <a href="#AT91F_DBGU_IsInterruptMasked">AT91F_DBGU_IsInterruptMasked</a>(
        <a href="AT91SAM7S128_h.html#AT91PS_DBGU">AT91PS_DBGU</a> pDbgu,   <font color=#B22222>// \arg  pointer to a <a href="AT91SAM7S128_DBGU.html#DBGU">DBGU</a> controller</font>
        <font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> flag) <font color=#B22222>// \arg  flag to be tested</font>
{
        <font color=#0000FF>return</font> (<a href="#AT91F_DBGU_GetInterruptMaskStatus">AT91F_DBGU_GetInterruptMaskStatus</a>(pDbgu) & flag);
}

/* *****************************************************************************
                SOFTWARE API FOR <a href="AT91SAM7S128_PIO.html#PIO">PIO</a>
   ***************************************************************************** */
<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgPeriph">AT91F_PIO_CfgPeriph</a></b></font>
<font color=#B22222>//* \brief Enable pins to be drived by peripheral</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgPeriph">AT91F_PIO_CfgPeriph</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> periphAEnable,  <font color=#B22222>// \arg PERIPH A to enable</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> periphBEnable)  <font color=#B22222>// \arg PERIPH B to enable</font>

{
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_ASR">PIO_ASR</a> = periphAEnable;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_BSR">PIO_BSR</a> = periphBEnable;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_PDR">PIO_PDR</a> = (periphAEnable | periphBEnable); <font color=#B22222>// Set in Periph mode</font>
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgOutput">AT91F_PIO_CfgOutput</a></b></font>
<font color=#B22222>//* \brief Enable <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> in output mode</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgOutput">AT91F_PIO_CfgOutput</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> pioEnable)      <font color=#B22222>// \arg <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> to be enabled</font>
{
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_PER">PIO_PER</a> = pioEnable; <font color=#B22222>// Set in <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> mode</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_OER">PIO_OER</a> = pioEnable; <font color=#B22222>// Configure in Output</font>
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgInput">AT91F_PIO_CfgInput</a></b></font>
<font color=#B22222>//* \brief Enable <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> in input mode</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgInput">AT91F_PIO_CfgInput</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> inputEnable)      <font color=#B22222>// \arg <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> to be enabled</font>
{
	<font color=#B22222>// Disable output</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_ODR">PIO_ODR</a>  = inputEnable;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_PER">PIO_PER</a>  = inputEnable;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgOpendrain">AT91F_PIO_CfgOpendrain</a></b></font>
<font color=#B22222>//* \brief Configure <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> in open drain</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgOpendrain">AT91F_PIO_CfgOpendrain</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> multiDrvEnable) <font color=#B22222>// \arg pio to be configured in open drain</font>
{
	<font color=#B22222>// Configure the multi-drive option</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_MDDR">PIO_MDDR</a> = ~multiDrvEnable;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_MDER">PIO_MDER</a> = multiDrvEnable;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgPullup">AT91F_PIO_CfgPullup</a></b></font>
<font color=#B22222>//* \brief Enable pullup on <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgPullup">AT91F_PIO_CfgPullup</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> pullupEnable)   <font color=#B22222>// \arg enable pullup on <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
{
		<font color=#B22222>// Connect or not Pullup</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_PPUDR">PIO_PPUDR</a> = ~pullupEnable;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_PPUER">PIO_PPUER</a> = pullupEnable;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgDirectDrive">AT91F_PIO_CfgDirectDrive</a></b></font>
<font color=#B22222>//* \brief Enable direct drive on <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgDirectDrive">AT91F_PIO_CfgDirectDrive</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> directDrive)    <font color=#B22222>// \arg <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> to be configured with direct drive</font>

{
	<font color=#B22222>// Configure the Direct Drive</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_OWDR">PIO_OWDR</a>  = ~directDrive;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_OWER">PIO_OWER</a>  = directDrive;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_CfgInputFilter">AT91F_PIO_CfgInputFilter</a></b></font>
<font color=#B22222>//* \brief Enable input filter on input <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_CfgInputFilter">AT91F_PIO_CfgInputFilter</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,             <font color=#B22222>// \arg pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> inputFilter)    <font color=#B22222>// \arg <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> to be configured with input filter</font>

{
	<font color=#B22222>// Configure the Direct Drive</font>
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_IFDR">PIO_IFDR</a>  = ~inputFilter;
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_IFER">PIO_IFER</a>  = inputFilter;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_GetInput">AT91F_PIO_GetInput</a></b></font>
<font color=#B22222>//* \brief Return <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> input value</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> <a href="#AT91F_PIO_GetInput">AT91F_PIO_GetInput</a>( <font color=#B22222>// \<font color=#0000FF>return</font> <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> input</font>
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio) <font color=#B22222>// \arg  pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
{
	<font color=#0000FF>return</font> pPio-><a href="AT91SAM7S128_PIO.html#PIO_PDSR">PIO_PDSR</a>;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_IsInputSet">AT91F_PIO_IsInputSet</a></b></font>
<font color=#B22222>//* \brief Test <font color=#0000FF>if</font> <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> is input flag is active</font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>int</font> <a href="#AT91F_PIO_IsInputSet">AT91F_PIO_IsInputSet</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,   <font color=#B22222>// \arg  pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> flag) <font color=#B22222>// \arg  flag to be tested</font>
{
	<font color=#0000FF>return</font> (<a href="#AT91F_PIO_GetInput">AT91F_PIO_GetInput</a>(pPio) & flag);
}


<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_SetOutput">AT91F_PIO_SetOutput</a></b></font>
<font color=#B22222>//* \brief Set to 1 output <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>
__inline <font color=#0000FF>void</font> <a href="#AT91F_PIO_SetOutput">AT91F_PIO_SetOutput</a>(
	<a href="AT91SAM7S128_h.html#AT91PS_PIO">AT91PS_PIO</a> pPio,   <font color=#B22222>// \arg  pointer to a <a href="AT91SAM7S128_PIO.html#PIO">PIO</a> controller</font>
	<font color=#0000FF>unsigned</font> <font color=#0000FF>int</font> flag) <font color=#B22222>// \arg  output to be set</font>
{
	pPio-><a href="AT91SAM7S128_PIO.html#PIO_SODR">PIO_SODR</a> = flag;
}

<font color=#B22222>//*----------------------------------------------------------------------------</font>
<font color=#B22222>//* \fn    <b><a name="AT91F_PIO_ClearOutput">AT91F_PIO_ClearOutput</a></b></font>
<font color=#B22222>//* \brief Set to 0 output <a href="AT91SAM7S128_PIO.html#PIO">PIO</a></font>
<font color=#B22222>//*----------------------------------------------------------------------------</font>

⌨️ 快捷键说明

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