📄 freescale
字号:
/** ###################################################################
** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : KEY.H
** Project : Smoke_Detector
** Processor : MC9S08JM60CLHE
** Component : KBI
** Version : Component 01.095, Driver 01.20, CPU db: 3.00.046
** Compiler : CodeWarrior HCS08 C Compiler
** Date/Time : 2010-1-25, 17:30
** Abstract :
** This bean "KBI" implements the Freescale Keyboard
** Interrupt Module (KBI/KBD) which allows to catch events
** on choiced external pins. These pins share one KBI/KBD
** interrupt which can be caused by an events on the pins.
** Settings :
** Keyboard : KBI
** Used pins
** Pin 0 : PTG0_KBIP0
** Pull resistor : up
** Generate interrupt on : falling
** Interrupt service : Enabled
** Interrupt : Vkeyboard
** Interrupt Priority :
** Enable in init. code : Yes
** Events enabled in init. : Yes
** Contents :
** GetVal - byte KEY_GetVal(void);
** SetEdge - byte KEY_SetEdge(byte edge);
**
** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**
** http : www.freescale.com
** mail : support@freescale.com
** ###################################################################*/
#ifndef __KEY
#define __KEY
/*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 "PE_Timer.h"
/* MODULE KEY. */
#include "Cpu.h"
/* PUBLISHED CONSTANTS for using together with GetVal method */
#define KEY_NUM_PIN0 0x01 /* Mask of Pin0 */
/* PUBLISHED CONSTANTS for enabled pins */
#define KEY_PIN_SIGNAL0 0x01 /* Mask of Pin0*/
/* Deprecated */
#define PinSignal0 0x01
void KEY_Init(void);
/*
** ===================================================================
** Method : KEY_Init (component KBI)
**
** Description :
** Initializes the associated peripheral(s) and the bean internal
** variables. The method is called automatically as a part of the
** application initialization code.
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
__interrupt void KEY_Interrupt(void);
/*
** ===================================================================
** Method : KEY_Interrupt (component KBI)
**
** Description :
** The method services the interrupt of the selected peripheral(s)
** and eventually invokes event(s) of the bean.
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
#define KEY_GetVal() \
((byte)(PTGD & 0x01))
/*
** ===================================================================
** Method : KEY_GetVal (component KBI)
**
** Description :
** Returns the value of pins
** Parameters : None
** Returns :
** --- - The value of associated pins (bits ordered
** according to the bean list of pins)
** ===================================================================
*/
byte KEY_SetEdge(byte edge);
/*
** ===================================================================
** Method : KEY_SetEdge (component KBI)
**
** Description :
** Sets the sensitive edge. If all selected pins don't have the
** same edge setting possibility, the method allows to set only
** those edges that are common (possible to set for all
** selected pins).
** Parameters :
** NAME - DESCRIPTION
** edge - Edge type:
** 0 - falling edge
** 1 - rising edge
** 2 - both edges
** 3 - low level
** 4 - high level
** Returns :
** --- - Error code, possible codes:
** ERR_OK - OK
** ERR_RANGE - Value is out of range
** ===================================================================
*/
/* END KEY. */
#endif /* ifndef __KEY */
/*
** ###################################################################
**
** 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 + -