freescale
来自「Freescale 系列单片机常用模块与综合系统设计」· 代码 · 共 212 行
TXT
212 行
/** ###################################################################
** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : KEY_LINE.H
** Project : digital_timer
** Processor : MC9S08JM60CLHE
** Component : BitsIO
** Version : Component 02.102, Driver 03.22, CPU db: 3.00.046
** Compiler : CodeWarrior HCS08 C Compiler
** Date/Time : 2010-1-11, 19:29
** Abstract :
** This bean "BitsIO" implements a multi-bit input/output.
** It uses selected pins of one 1-bit to 8-bit port.
** Note: This bean is set to work in Output direction only.
** Settings :
** Port name : PTD
**
** Bit mask of the port : $000F
** Number of bits/pins : 4
** Single bit numbers : 0 to 3
** Values range : 0 to 15
**
** Initial direction : Output (direction cannot be changed)
** Initial output value : 0 = 000H
** Initial pull option : off
**
** Port data register : PTDD [$0006]
** Port control register : PTDDD [$0007]
**
** ----------------------------------------------------
** Bit | Pin | Name
** ----------------------------------------------------
** 0 | 42 | PTD0_ADP8_ACMPPLUS
** 1 | 43 | PTD1_ADP9_ACMPMINUS
** 2 | 48 | PTD2_KBIP2_ACMPO
** 3 | 49 | PTD3_KBIP3_ADP10
** ----------------------------------------------------
**
** Optimization for : speed
** Contents :
** GetDir - bool KEY_LINE_GetDir(void);
** GetVal - byte KEY_LINE_GetVal(void);
** PutVal - void KEY_LINE_PutVal(byte Val);
** GetBit - bool KEY_LINE_GetBit(byte Bit);
** PutBit - void KEY_LINE_PutBit(byte Bit, bool Val);
** SetBit - void KEY_LINE_SetBit(byte Bit);
** ClrBit - void KEY_LINE_ClrBit(byte Bit);
** NegBit - void KEY_LINE_NegBit(byte Bit);
**
** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**
** http : www.freescale.com
** mail : support@freescale.com
** ###################################################################*/
#ifndef KEY_LINE_H_
#define KEY_LINE_H_
/* MODULE KEY_LINE. */
/* 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 : KEY_LINE_GetVal (component BitsIO)
**
** Description :
** This method returns an input value.
** a) direction = Input : reads the input value from the
** pins 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 (0 to 15)
** ===================================================================
*/
byte KEY_LINE_GetVal(void);
/*
** ===================================================================
** Method : KEY_LINE_PutVal (component BitsIO)
**
** Description :
** This method writes the new output value.
** Parameters :
** NAME - DESCRIPTION
** Val - Output value (0 to 15)
** Returns : Nothing
** ===================================================================
*/
void KEY_LINE_PutVal(byte Val);
/*
** ===================================================================
** Method : KEY_LINE_GetBit (component BitsIO)
**
** Description :
** This method returns the specified bit of the input value.
** a) direction = Input : reads the input value from pins
** and returns the specified bit
** b) direction = Output : returns the specified bit
** of the last written value
** Note: This bean is set to work in Output direction only.
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to read (0 to 3)
** Returns :
** --- - Value of the specified bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** ===================================================================
*/
bool KEY_LINE_GetBit(byte Bit);
/*
** ===================================================================
** Method : KEY_LINE_PutBit (component BitsIO)
**
** Description :
** This method writes the new value to the specified bit
** of the output value.
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit (0 to 3)
** Val - New value of the bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** Returns : Nothing
** ===================================================================
*/
void KEY_LINE_PutBit(byte Bit, bool Val);
/*
** ===================================================================
** Method : KEY_LINE_ClrBit (component BitsIO)
**
** Description :
** This method clears (sets to zero) the specified bit
** of the output value.
** [ It is the same as "PutBit(Bit,FALSE);" ]
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to clear (0 to 3)
** Returns : Nothing
** ===================================================================
*/
void KEY_LINE_ClrBit(byte Bit);
/*
** ===================================================================
** Method : KEY_LINE_SetBit (component BitsIO)
**
** Description :
** This method sets (sets to one) the specified bit of the
** output value.
** [ It is the same as "PutBit(Bit,TRUE);" ]
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to set (0 to 3)
** Returns : Nothing
** ===================================================================
*/
void KEY_LINE_SetBit(byte Bit);
/*
** ===================================================================
** Method : KEY_LINE_NegBit (component BitsIO)
**
** Description :
** This method negates (inverts) the specified bit of the
** output value.
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to invert (0 to 31)
** Returns : Nothing
** ===================================================================
*/
void KEY_LINE_NegBit(byte Bit);
/*
** ===================================================================
** Method : KEY_LINE_GetDir (component BitsIO)
**
** Description :
** This method returns direction of the bean.
** Parameters : None
** Returns :
** --- - Direction of the bean (always TRUE, Output only)
** FALSE = Input, TRUE = Output
** ===================================================================
*/
#define KEY_LINE_GetDir() ( \
(bool)1 /* Pins are fixed to GPO mode */ \
)
/* END KEY_LINE. */
#endif /* #ifndef __KEY_LINE_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 + =
减小字号Ctrl + -
显示快捷键?