智能车制作
标题:
128 pe编程谁会啊?问一下函数里空的是怎么回事
[打印本页]
作者:
apoani
时间:
2013-11-11 18:38
标题:
128 pe编程谁会啊?问一下函数里空的是怎么回事
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : Bits1.C
** Project : pe
** Processor : MC9S12XS128CAL
** Beantype : BitsIO
** Version : Bean 02.098, Driver 03.11, CPU db: 3.00.003
** Compiler : CodeWarrior HCS12X C Compiler
** Date/Time : 2013/11/11, 17:32
** Abstract :
** This bean "BitsIO" implements a multi-bit input/output.
** It uses selected pins of one 1-bit to 8-bit port.
** Settings :
** Port name : A
**
** Bit mask of the port : 7
** Number of bits/pins : 3
** Single bit numbers : 0 to 2
** Values range : 0 to 7
**
** Initial direction : Output (direction can be changed)
** Safe mode : yes
** Initial output value : 0 = 000H
** Initial pull option : off
**
** Port data register : PORTA [0]
** Port control register : DDRA [2]
**
** ----------------------------------------------------
** Bit | Pin | Name
** ----------------------------------------------------
** 0 | 57 | PA0
** 1 | 58 | PA1
** 2 | 59 | PA2
** ----------------------------------------------------
**
** Optimization for : speed
** Contents :
** GetDir - bool Bits1_GetDir(void);
** SetDir - void Bits1_SetDir(bool Dir);
** GetVal - byte Bits1_GetVal(void);
** PutVal - void Bits1_PutVal(byte Val);
** GetBit - bool Bits1_GetBit(byte Bit);
** PutBit - void Bits1_PutBit(byte Bit, bool Val);
** SetBit - void Bits1_SetBit(byte Bit);
** ClrBit - void Bits1_ClrBit(byte Bit);
** NegBit - void Bits1_NegBit(byte Bit);
**
** (c) Copyright UNIS, a.s. 1997-2008
** UNIS, a.s.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
/* MODULE Bits1. */
#include "Bits1.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"
#pragma DATA_SEG Bits1_DATA
#pragma CODE_SEG Bits1_CODE
#pragma CONST_SEG Bits1_CONST /* Constant section for this module */
/*
** ===================================================================
** Method : Bits1_GetMsk (bean BitsIO)
**
** Description :
** The method returns a bit mask which corresponds to the
** required bit position.
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
static const byte Bits1_Table[3] = { /* Table of mask constants */
1, 2, 4
};
static byte Bits1_GetMsk (byte PinIndex)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_GetVal (bean 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
** Parameters : None
** Returns :
** --- - Input value (0 to 7)
** ===================================================================
*/
byte Bits1_GetVal(void)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_PutVal (bean BitsIO)
**
** 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 7)
** Returns : Nothing
** ===================================================================
*/
void Bits1_PutVal(byte Val)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_GetBit (bean 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
** Parameters :
** NAME - DESCRIPTION
** Bit - Number of the bit to read (0 to 2)
** Returns :
** --- - Value of the specified bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** ===================================================================
*/
bool Bits1_GetBit(byte Bit)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_PutBit (bean BitsIO)
**
** 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 2)
** Val - New value of the bit (FALSE or TRUE)
** FALSE = "0" or "Low", TRUE = "1" or "High"
** Returns : Nothing
** ===================================================================
*/
void Bits1_PutBit(byte Bit, bool Val)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_ClrBit (bean BitsIO)
**
** 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 2)
** Returns : Nothing
** ===================================================================
*/
void Bits1_ClrBit(byte Bit)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_SetBit (bean BitsIO)
**
** 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 2)
** Returns : Nothing
** ===================================================================
*/
void Bits1_SetBit(byte Bit)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_NegBit (bean BitsIO)
**
** 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 31)
** Returns : Nothing
** ===================================================================
*/
void Bits1_NegBit(byte Bit)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/*
** ===================================================================
** Method : Bits1_GetDir (bean BitsIO)
**
** Description :
** This method returns direction of the bean.
** Parameters : None
** Returns :
** --- - Direction of the bean (FALSE or TRUE)
** FALSE = Input, TRUE = Output
** ===================================================================
*/
/*
bool Bits1_GetDir(void)
** This method is implemented as a macro. See Bits1.h file. **
*/
/*
** ===================================================================
** Method : Bits1_SetDir (bean BitsIO)
**
** 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 Bits1_SetDir(bool Dir)
{
/*
##### Here will be code if you have a full registered version #####
*/
}
/* END Bits1. */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 3.00 [04.12]
** for the Freescale HCS12X series of microcontrollers.
**
** ###################################################################
*/
复制代码
作者:
酷酷羊
时间:
2013-11-12 16:28
你没设当然是空的了。
作者:
apoani
时间:
2013-11-12 23:03
酷酷羊 发表于 2013-11-12 16:28
你没设当然是空的了。
哦 ,有没有教程给下,在此谢过
欢迎光临 智能车制作 (http://dns.znczz.com/)
Powered by Discuz! X3.2