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

📄 slave_select.h

📁 SPI主机模式进行串行通信
💻 H
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : slave_select.H
**     Project   : spi_master
**     Processor : 56F8346
**     Beantype  : BitIO
**     Version   : Bean 02.066, Driver 01.14, CPU db: 2.87.097
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 2009-1-16, 8:43
**     Abstract  :
**         This bean "BitIO" implements an one-bit input/output.
**         It uses one bit/pin of a port.
**         Note: This bean is set to work in Output direction only.
**         Methods of this bean are mostly implemented as a macros
**         (if supported by target language and compiler).
**     Settings  :
**         Used pin                    :
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       129           |  GPIOE7_SS0B
**             ----------------------------------------------------
**
**         Port name                   : GPIOE_Low
**
**         Bit number (in port)        : 7
**         Bit mask of the port        : 128
**
**         Initial direction           : Output (direction cannot be changed)
**         Initial output value        : 1
**         Initial pull option         : off
**
**         Port data register          : GPIO_E_DR [62257]
**         Port control register       : GPIO_E_DDR [62258]
**         Port function register      : GPIO_E_PER [62259]
**
**         Optimization for            : speed
**     Contents  :
**         GetDir - bool slave_select_GetDir(void);
**         GetVal - bool slave_select_GetVal(void);
**         PutVal - void slave_select_PutVal(bool Val);
**         ClrVal - void slave_select_ClrVal(void);
**         SetVal - void slave_select_SetVal(void);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2005
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __slave_select_H
#define __slave_select_H

/* MODULE slave_select. */

/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"

#include "Cpu.h"


#define slave_select_PIN_MASK   ((byte)128) /* Pin mask */


/*
** ===================================================================
**     Method      :  slave_select_GetVal (bean BitIO)
**
**     Description :
**         This method returns an input value.
**           a) direction = Input  : reads the input value from the
**                                   pin and returns it
**           b) direction = Output : returns the last written value
**         Note: This bean is set to work in Output direction only.
**     Parameters  : None
**     Returns     :
**         ---             - Input value. Possible values:
**                           FALSE - logical "0" (Low level)
**                           TRUE - logical "1" (High level)

** ===================================================================
*/
#define slave_select_GetVal() ((bool)(getRegBits(GPIO_E_DR,slave_select_PIN_MASK)))

/*
** ===================================================================
**     Method      :  slave_select_PutVal (bean BitIO)
**
**     Description :
**         This method writes the new output value.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Val             - Output value. Possible values:
**                           FALSE - logical "0" (Low level)
**                           TRUE - logical "1" (High level)
**     Returns     : Nothing
** ===================================================================
*/
void slave_select_PutVal(bool Val);

/*
** ===================================================================
**     Method      :  slave_select_GetDir (bean BitIO)
**
**     Description :
**         This method returns direction of the bean.
**     Parameters  : None
**     Returns     :
**         ---        - Direction of the bean (always TRUE, Output only)
**                      FALSE = Input, TRUE = Output
** ===================================================================
*/
#define slave_select_GetDir() ((bool)(getRegBits(GPIO_E_DDR,slave_select_PIN_MASK)))

/*
** ===================================================================
**     Method      :  slave_select_ClrVal (bean BitIO)
**
**     Description :
**         This method clears (sets to zero) the output value.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
#define slave_select_ClrVal() (clrRegBits(GPIO_E_DR,slave_select_PIN_MASK))

/*
** ===================================================================
**     Method      :  slave_select_SetVal (bean BitIO)
**
**     Description :
**         This method sets (sets to one) the output value.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
#define slave_select_SetVal() (setRegBits(GPIO_E_DR,slave_select_PIN_MASK))


/* END slave_select. */

#endif /* __slave_select_H*/
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.97 [03.74]
**     for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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