?? leds.h
字號:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : LEDS.H
** Project : le4
** Processor : MC9RS08LE4CPC
** Beantype : BitIO
** Version : Bean 02.072, Driver 03.09, CPU db: 3.00.000
** Compiler : CodeWarrior RS08 C Compiler
** Date/Time : 19/2/2009, 18:17
** 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
** ----------------------------------------------------
** 8 | PTC1_XTAL
** ----------------------------------------------------
**
** Port name : PTC
**
** Bit number (in port) : 1
** Bit mask of the port : $0002
**
** Initial direction : Output (direction cannot be changed)
** Initial output value : 0
** Initial pull option : off
**
** Port data register : PTCD [$004A]
** Port control register : PTCDD [$004B]
**
** Optimization for : speed
** Contents :
** GetVal - bool LEDS_GetVal(void);
** PutVal - void LEDS_PutVal(bool Val);
** ClrVal - void LEDS_ClrVal(void);
** SetVal - void LEDS_SetVal(void);
** NegVal - void LEDS_NegVal(void);
**
** (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
** ###################################################################*/
#ifndef LEDS_H_
#define LEDS_H_
/* MODULE LEDS. */
/* 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 : LEDS_GetVal (bean 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)
** ===================================================================
*/
#define LEDS_GetVal() ( \
(bool)((getReg8(PTCD) & 0x02)) /* Return port data */ \
)
/*
** ===================================================================
** Method : LEDS_PutVal (bean 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 LEDS_PutVal(bool Val);
/*
** ===================================================================
** Method : LEDS_ClrVal (bean BitIO)
**
** Description :
** This method clears (sets to zero) the output value.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define LEDS_ClrVal() ( \
(void)clrReg8Bits(PTCD, 0x02) /* PTCD1=0x00 */ \
)
/*
** ===================================================================
** Method : LEDS_SetVal (bean BitIO)
**
** Description :
** This method sets (sets to one) the output value.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define LEDS_SetVal() ( \
(void)setReg8Bits(PTCD, 0x02) /* PTCD1=0x01 */ \
)
/*
** ===================================================================
** Method : LEDS_NegVal (bean BitIO)
**
** Description :
** This method negates (inverts) the output value.
** Parameters : None
** Returns : Nothing
** ===================================================================
*/
#define LEDS_NegVal() ( \
(void)invertReg8Bits(PTCD, 0x02) /* PTCD1=invert */ \
)
/* END LEDS. */
#endif /* #ifndef __LEDS_H_ */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 3.04 [04.19]
** for the Freescale RS08 series of microcontrollers.
**
** ###################################################################
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -