📄 freescale
字号:
/** ###################################################################
** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : LCD_Data.H
** Project : Power_Monitor
** Processor : MC9S08JM60CLHE
** Component : ByteIO
** Version : Component 02.058, Driver 03.20, CPU db: 3.00.046
** Compiler : CodeWarrior HCS08 C Compiler
** Date/Time : 2010-1-23, 15:45
** Abstract :
** This bean "ByteIO" implements an one-byte input/output.
** It uses one 8-bit port.
** Methods of this bean are mostly implemented as a macros
** (if supported by target langauage and compiler).
** Settings :
** Port name : PTD
**
** Initial direction : Output (direction can be changed)
** Safe mode : yes
** Initial output value : 0 = 000H
** Initial pull option : up
**
** 8-bit data register : PTDD [$0006]
** 8-bit 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
** 4 | 50 | PTD4_ADP11
** 5 | 51 | PTD5
** 6 | 52 | PTD6
** 7 | 53 | PTD7
** ----------------------------------------------------
** Contents :
** GetDir - bool LCD_Data_GetDir(void);
** SetDir - void LCD_Data_SetDir(bool Dir);
** GetVal - byte LCD_Data_GetVal(void);
** PutVal - void LCD_Data_PutVal(byte Val);
** GetBit - bool LCD_Data_GetBit(byte Bit);
** PutBit - void LCD_Data_PutBit(byte Bit, bool Val);
** SetBit - void LCD_Data_SetBit(byte Bit);
** ClrBit - void LCD_Data_ClrBit(byte Bit);
** NegBit - void LCD_Data_NegBit(byte Bit);
**
** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**
** http : www.freescale.com
** mail : support@freescale.com
** ###################################################################*/
#ifndef LCD_Data_H_
#define LCD_Data_H_
/* MODULE LCD_Data. */
/* 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 : LCD_Data_GetVal (component ByteIO)
**
** 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
** Parameters : None
** Returns :
** --- - Input value (0 to 255)
** ===================================================================
*/
#define LCD_Data_GetVal() ( \
getReg8(PTDD) /* Evaluate to port data */ \
)
/*
** ===================================================================
** Method : LCD_Data_PutVal (component ByteIO)
**
** Description :
** This method writes the new output value.
** a) direction = Input : sets the new output value;
** this operation will be shown on
** output after the direction has
** been switched to output
** (SetDir(TRUE);)
** b) direction = Output : directly writes the value to the
** appropriate pins
** Parameters :
** NAME - DESCRIPTION
** Val - Output value (0 to 255)
** Returns : Nothing
** ===================================================================
*/
#define LCD_Data_PutVal(Val) ( \
(void)setReg8(PTDD, Val) /* PTDD0-PTDD7=Val[bits 0-7] */, \
Shadow_PTD = (Val) /* Set-up shadow variable */ \
)
/*
** ===================================================================
** Method : LCD_Data_GetBit (component ByteIO)
**
** 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
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to read (0 to 7)
** Returns :
** --- - Value of the specified bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** ===================================================================
*/
bool LCD_Data_GetBit(byte Bit);
/*
** ===================================================================
** Method : LCD_Data_PutBit (component ByteIO)
**
** Description :
** This method writes the new value to the specified bit
** of the output value.
** a) direction = Input : sets the value of the specified
** bit; this operation will be
** shown on output after the
** direction has been switched to
** output (SetDir(TRUE);)
** b) direction = Output : directly writes the value of the
** bit to the appropriate pin
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit (0 to 7)
** Val - New value of the bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** Returns : Nothing
** ===================================================================
*/
void LCD_Data_PutBit(byte Bit, bool Val);
/*
** ===================================================================
** Method : LCD_Data_SetBit (component ByteIO)
**
** Description :
** This method sets (sets to one) the specified bit of the
** output value.
** [ It is the same as "PutBit(Bit,TRUE);" ]
** a) direction = Input : sets the specified bit to "1";
** this operation will be shown on
** output after the direction has
** been switched to output
** (SetDir(TRUE);)
** b) direction = Output : directly writes "1" to the
** appropriate pin
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to set (0 to 7)
** Returns : Nothing
** ===================================================================
*/
void LCD_Data_SetBit(byte Bit);
/*
** ===================================================================
** Method : LCD_Data_ClrBit (component ByteIO)
**
** Description :
** This method clears (sets to zero) the specified bit
** of the output value.
** [ It is the same as "PutBit(Bit,FALSE);" ]
** a) direction = Input : sets the specified bit to "0";
** this operation will be shown on
** output after the direction has
** beenswitched to output
** (SetDir(TRUE);)
** b) direction = Output : directly writes "0" to the
** appropriate pin
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to clear (0 to 7)
** Returns : Nothing
** ===================================================================
*/
void LCD_Data_ClrBit(byte Bit);
/*
** ===================================================================
** Method : LCD_Data_NegBit (component ByteIO)
**
** Description :
** This method negates (inverts) the specified bit of the
** output value.
** a) direction = Input : inverts the specified bit;
** this operation will be shown on
** output after the direction has
** been switched to output
** (SetDir(TRUE);)
** b) direction = Output : directly inverts the value
** of the appropriate pin
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to invert (0 to 7)
** Returns : Nothing
** ===================================================================
*/
void LCD_Data_NegBit(byte Bit);
/*
** ===================================================================
** Method : LCD_Data_GetDir (component ByteIO)
**
** Description :
** This method returns direction of the bean.
** Parameters : None
** Returns :
** --- - Direction of the bean (FALSE or TRUE)
** FALSE = Input, TRUE = Output
** ===================================================================
*/
#define LCD_Data_GetDir() ( \
(bool)(getReg8(PTDDD)) /* Return port direction, 0==GPI, nonzero==GPO */ \
)
/*
** ===================================================================
** Method : LCD_Data_SetDir (component ByteIO)
**
** Description :
** This method sets direction of the bean.
** Parameters :
** NAME - DESCRIPTION
** Dir - Direction to set (FALSE or TRUE)
** FALSE = Input, TRUE = Output
** Returns : Nothing
** ===================================================================
*/
void LCD_Data_SetDir(bool Dir);
/* END LCD_Data. */
#endif /* #ifndef __LCD_Data_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 + -