📄 freescale
字号:
/** ###################################################################
** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : Key3.H
** Project : handheld_ultrasonic_rangefinder
** Processor : MC9S08JM60CLHE
** Component : BitIO
** Version : Component 02.075, Driver 03.21, CPU db: 3.00.046
** Compiler : CodeWarrior HCS08 C Compiler
** Date/Time : 2010-1-19, 22:39
** 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 Input 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
** ----------------------------------------------------
** 49 | PTD3_KBIP3_ADP10
** ----------------------------------------------------
**
** Port name : PTD
**
** Bit number (in port) : 3
** Bit mask of the port : $0008
**
** Initial direction : Input (direction cannot be changed)
** Initial output value : 0
** Initial pull option : up
**
** Port data register : PTDD [$0006]
** Port control register : PTDDD [$0007]
**
** Optimization for : speed
** Contents :
** GetVal - bool Key3_GetVal(void);
**
** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**
** http : www.freescale.com
** mail : support@freescale.com
** ###################################################################*/
#ifndef Key3_H_
#define Key3_H_
/* MODULE Key3. */
/* Including shared modules, which are used in the whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cpu.h"
/*
** ===================================================================
** Method : Key3_GetVal (component 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 Input direction only.
** Parameters : None
** Returns :
** --- - Input value. Possible values:
** FALSE - logical "0" (Low level)
** TRUE - logical "1" (High level)
** ===================================================================
*/
#define Key3_GetVal() ( \
(bool)((getReg8(PTDD) & 0x08)) /* Return port data */ \
)
/* END Key3. */
#endif /* #ifndef __Key3_H_ */
/*
** ###################################################################
**
** This file was created by Processor Expert 3.07 [04.34]
** for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -