?? freescale
字號(hào):
/** ###################################################################
** THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : Transmiter.C
** 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:51
** 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
** ----------------------------------------------------
** 51 | PTD5
** ----------------------------------------------------
**
** Port name : PTD
**
** Bit number (in port) : 5
** Bit mask of the port : $0020
**
** Initial direction : Output (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 Transmiter_GetVal(void);
** PutVal - void Transmiter_PutVal(bool Val);
** ClrVal - void Transmiter_ClrVal(void);
** SetVal - void Transmiter_SetVal(void);
**
** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**
** http : www.freescale.com
** mail : support@freescale.com
** ###################################################################*/
/* MODULE Transmiter. */
#include "Transmiter.h"
/* 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 : Transmiter_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 Output direction only.
** Parameters : None
** Returns :
** --- - Input value. Possible values:
** FALSE - logical "0" (Low level)
** TRUE - logical "1" (High level)
** ===================================================================
*/
/*
bool Transmiter_GetVal(void)
** This method is implemented as a macro. See Transmiter.h file. **
*/
/*
** ===================================================================
** Method : Transmiter_PutVal (component 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 Transmiter_PutVal(bool Val)
{
if (Val) {
setReg8Bits(PTDD, 0x20); /* PTDD5=0x01 */
} else { /* !Val */
clrReg8Bits(PTDD, 0x20); /* PTDD5=0x00 */
} /* !Val */
}
/*
** ===================================================================
** Method : Transmiter_ClrVal (component BitIO)
**
** Description :
** This method clears (sets to zero) the output value.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void Transmiter_ClrVal(void)
** This method is implemented as a macro. See Transmiter.h file. **
*/
/*
** ===================================================================
** Method : Transmiter_SetVal (component BitIO)
**
** Description :
** This method sets (sets to one) the output value.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
/*
void Transmiter_SetVal(void)
** This method is implemented as a macro. See Transmiter.h file. **
*/
/* END Transmiter. */
/*
** ###################################################################
**
** This file was created by Processor Expert 3.07 [04.34]
** for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -