📄 ad2.h
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : AD2.H
** Project : che_free
** Processor : MC9S12DG128BCPV
** Beantype : ADC
** Version : Bean 01.354, Driver 01.09, CPU db: 2.87.280
** Compiler : Metrowerks HC12 C Compiler
** Date/Time : 2008-3-16, 上午 09:57
** Abstract :
** This device "ADC" implements an A/D converter,
** its control methods and interrupt/event handling procedure.
** Settings :
** AD control register : ATD0CTL2 [130]
** AD control register : ATD0CTL3 [131]
** AD control register : ATD0CTL4 [132]
** AD control register : ATD0CTL5 [133]
** AD control register : ATD0STAT0 [134]
** AD control register : ATD0STAT1 [139]
** AD control register : ATD0CTL23 [130]
** AD control register : ATD0CTL45 [132]
** AD control register : ATD0TEST1 [137]
** AD control register : ATD0DIEN [141]
** AD result register : ATD0DR0 [144]
** AD result register : ATD0DR1 [146]
** AD result register : ATD0DR2 [148]
** AD result register : ATD0DR3 [150]
** AD result register : ATD0DR4 [152]
** AD result register : ATD0DR5 [154]
** AD result register : ATD0DR6 [156]
** AD result register : ATD0DR7 [158]
** Interrupt name : Vatd0
** Interrupt enable reg. : ATD0CTL2 [130]
** Priority : 1
** User handling procedure : AD2_OnEnd
** Number of conversions : 1
** AD resolution : 8-bit
**
** Input pins
**
** Port name : AD0
** Bit number (in port) : 0
** Bit mask of the port : 1
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 1
** Bit mask of the port : 2
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 2
** Bit mask of the port : 4
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 3
** Bit mask of the port : 8
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 4
** Bit mask of the port : 16
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 5
** Bit mask of the port : 32
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 6
** Bit mask of the port : 64
** Port data register : PORTAD0 [143]
**
** Port name : AD0
** Bit number (in port) : 7
** Bit mask of the port : 128
** Port data register : PORTAD0 [143]
**
** Initialization:
** Conversion : Enabled
** Event : Enabled
** High speed mode
** Prescaler : divide-by-30
** Contents :
** Enable - byte AD2_Enable(void);
** Disable - byte AD2_Disable(void);
** Start - byte AD2_Start(void);
** Stop - byte AD2_Stop(void);
** Measure - byte AD2_Measure(bool WaitForResult);
** GetValue8 - byte AD2_GetValue8(byte *Values);
** GetChanValue8 - byte AD2_GetChanValue8(byte Channel,byte *Value);
**
** (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 __AD2
#define __AD2
/* MODULE AD2. */
/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "PE_Timer.h"
#include "Cpu.h"
#pragma DATA_SEG AD2_DATA
#pragma CODE_SEG AD2_CODE
#define AD2_EnableTrigger AD2_EnableExtChanTrigger
/*
** ===================================================================
** The EnableTrigger method has been renamed to
** the EnableExtChanTrigger.
** This macro is here to keep project backward compatibility.
** ===================================================================
*/
#define AD2_DisableTrigger AD2_Stop
/*
** ===================================================================
** Now, the Stop method is used for disabling the trigger mode
** instead of the DisableTrigger.
** This macro is here to keep project backward compatibility.
** ===================================================================
*/
#pragma CODE_SEG __NEAR_SEG NON_BANKED
__interrupt void AD2_Interrupt(void);
#pragma CODE_SEG AD2_CODE
/*
** ===================================================================
** Method : AD2_Interrupt (bean ADC)
**
** Description :
** The method services the interrupt of the selected peripheral(s)
** and eventually invokes of the bean event(s).
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
byte AD2_Enable(void);
/*
** ===================================================================
** Method : AD2_Enable (bean ADC)
**
** Description :
** Enables A/D converter bean. <Events> may be generated
** (<DisableEvent>/<EnableEvent>). If possible, this method
** switches on A/D converter device, voltage reference, etc.
** Parameters : None
** Returns :
** --- - Error code, possible codes:
** ERR_OK - OK
** ERR_SPEED - This device does not work in
** the active speed mode
** ===================================================================
*/
byte AD2_Disable(void);
/*
** ===================================================================
** Method : AD2_Disable (bean ADC)
**
** Description :
** Disables A/D converter bean. No <events> will be
** generated. If possible, this method switches off A/D
** converter device, voltage reference, etc.
** Parameters : None
** Returns :
** --- - Error code, possible codes:
** ERR_OK - OK
** ERR_SPEED - This device does not work in
** the active speed mode
** ===================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -