⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pga_adc.h

📁 测量脉搏的源码 Cypress公司使用 CY27443 完成相关的功能
💻 H
字号:
//*****************************************************************************
//*****************************************************************************
//  FILENAME:  PGA_ADC.h  ( PGA )
//  Version: 3.0, Updated on 2003/08/27 at 14:03:13
//  Generated by PSoC Designer ver 4.0 b865 : 27 August, 2003
//
//  DESCRIPTION:  PGA User Module C Language interface file for the
//                22/24/27xxx PSoC family of devices.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress MicroSystems 2001-2003. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************
#include <M8C.h>

//-------------------------------------------------
// Constants for PGA_ADC API's.
//-------------------------------------------------
#define PGA_ADC_OFF         0
#define PGA_ADC_LOWPOWER    1
#define PGA_ADC_MEDPOWER    2
#define PGA_ADC_HIGHPOWER   3

#define PGA_ADC_G48_0    0x0C
#define PGA_ADC_G24_0    0x1C

#define PGA_ADC_G16_0    0x08
#define PGA_ADC_G8_00    0x18
#define PGA_ADC_G5_33    0x28
#define PGA_ADC_G4_00    0x38
#define PGA_ADC_G3_20    0x48
#define PGA_ADC_G2_67    0x58
#define PGA_ADC_G2_27    0x68
#define PGA_ADC_G2_00    0x78
#define PGA_ADC_G1_78    0x88
#define PGA_ADC_G1_60    0x98
#define PGA_ADC_G1_46    0xA8
#define PGA_ADC_G1_33    0xB8
#define PGA_ADC_G1_23    0xC8
#define PGA_ADC_G1_14    0xD8
#define PGA_ADC_G1_06    0xE8
#define PGA_ADC_G1_00    0xF8
#define PGA_ADC_G0_93    0xE0
#define PGA_ADC_G0_87    0xD0
#define PGA_ADC_G0_81    0xC0
#define PGA_ADC_G0_75    0xB0
#define PGA_ADC_G0_68    0xA0
#define PGA_ADC_G0_62    0x90
#define PGA_ADC_G0_56    0x80
#define PGA_ADC_G0_50    0x70
#define PGA_ADC_G0_43    0x60
#define PGA_ADC_G0_37    0x50
#define PGA_ADC_G0_31    0x40
#define PGA_ADC_G0_25    0x30
#define PGA_ADC_G0_18    0x20
#define PGA_ADC_G0_12    0x10
#define PGA_ADC_G0_06    0x00



#pragma fastcall PGA_ADC_Start
#pragma fastcall PGA_ADC_SetPower
#pragma fastcall PGA_ADC_SetGain
#pragma fastcall PGA_ADC_Stop

//-------------------------------------------------
// Prototypes of the PGA_ADC API.
//-------------------------------------------------
extern void PGA_ADC_Start(BYTE bPowerSetting);
extern void PGA_ADC_SetPower(BYTE bPowerSetting);
extern void PGA_ADC_SetGain(BYTE bGainSetting);
extern void PGA_ADC_Stop(void);

//-------------------------------------------------
// Register Addresses for PGA_ADC
//-------------------------------------------------

#pragma ioport  PGA_ADC_GAIN_CR0:   0x079
BYTE            PGA_ADC_GAIN_CR0;
#pragma ioport  PGA_ADC_GAIN_CR1:   0x07a
BYTE            PGA_ADC_GAIN_CR1;
#pragma ioport  PGA_ADC_GAIN_CR2:   0x07b
BYTE            PGA_ADC_GAIN_CR2;
#pragma ioport  PGA_ADC_GAIN_CR3:   0x078
BYTE            PGA_ADC_GAIN_CR3;


// end of file PGA_ADC.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -