📄 byte1.h
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : Byte1.H
** Project : EEPROM
** Processor : MC9S12DG128BCPV
** Beantype : ByteIO
** Version : Bean 02.053, Driver 03.07, CPU db: 2.87.280
** Compiler : Metrowerks HC12 C Compiler
** Date/Time : 2008-3-3, 下午 09:51
** Abstract :
** This bean "ByteIO" implements an one-byte input/output.
** It uses one 8-bit port.
** Note: This bean is set to work in Input direction only.
** Methods of this bean are mostly implemented as a macros
** (if supported by target langauage and compiler).
** Settings :
** Port name : M
**
** Initial direction : Input (direction cannot be changed)
** Initial output value : 0 = 000H
** Initial pull option : down
**
** 8-bit data register : PTM [592]
** 8-bit control register : DDRM [594]
**
** ----------------------------------------------------
** Bit | Pin | Name
** ----------------------------------------------------
** 0 | 105 | PM0_RxCAN0
** 1 | 104 | PM1_TxCAN0
** 2 | 103 | PM2_RxCAN0_MISO0
** 3 | 102 | PM3_TxCAN0_SS0
** 4 | 101 | PM4_RxCAN0_RxCAN4_MOSI0
** 5 | 100 | PM5_TxCAN0_TxCAN4_SCK0
** 6 | 88 | PM6_RxCAN4
** 7 | 87 | PM7_TxCAN4
** ----------------------------------------------------
** Contents :
** GetDir - bool Byte1_GetDir(void);
** GetVal - byte Byte1_GetVal(void);
** GetBit - bool Byte1_GetBit(byte Bit);
**
** (c) Copyright UNIS, spol. s r.o. 1997-2005
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
#ifndef Byte1_H_
#define Byte1_H_
/* MODULE Byte1. */
/* 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 CODE_SEG Byte1_CODE
/*
** ===================================================================
** Method : Byte1_GetVal (bean 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
** Note: This bean is set to work in Input direction only.
** Parameters : None
** Returns :
** --- - Input value (0 to 255)
** ===================================================================
*/
#define Byte1_GetVal() ( \
getReg8(PTM) /* Evaluate to port data */ \
)
/*
** ===================================================================
** Method : Byte1_GetBit (bean 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
** Note: This bean is set to work in Input direction only.
** 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 Byte1_GetBit(byte Bit);
/*
** ===================================================================
** Method : Byte1_GetDir (bean ByteIO)
**
** Description :
** This method returns direction of the bean.
** Parameters : None
** Returns :
** --- - Direction of the bean (always FALSE, Input only)
** FALSE = Input, TRUE = Output
** ===================================================================
*/
#define Byte1_GetDir() ( \
0 /* Port is fixed to GPI mode */ \
)
#pragma CODE_SEG DEFAULT
/* END Byte1. */
#endif /* #ifndef __Byte1_H_ */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 2.96 [03.76]
** for the Freescale HCS12 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -