cmpprg.h

来自「PSOC 电动自行车代码 器件采用CYPRESS新电动自行车器件CY8C245」· C头文件 代码 · 共 70 行

H
70
字号
//*****************************************************************************
//*****************************************************************************
//  FILENAME:  CMPPRG.h
//  Version: 3.3, Updated on 2006/04/28 at 14:39:41
//  Generated by PSoC Designer ver 4.4  b1884 : 14 Jan, 2007
//
//  DESCRIPTION:  CMPPRG User Module C Language interface file for the
//                22/24/27/29xxx PSoC family of devices.
//-----------------------------------------------------------------------------
//      Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
//*****************************************************************************
//*****************************************************************************

#include <M8C.h>

//-------------------------------------------------
// Defines for CMPPRG API's.
//-------------------------------------------------
#define CMPPRG_OFF         0
#define CMPPRG_LOWPOWER    1
#define CMPPRG_MEDPOWER    2
#define CMPPRG_HIGHPOWER   3

#define CMPPRG_REF1_000   0xf0
#define CMPPRG_REF0_937   0xe0
#define CMPPRG_REF0_875   0xd0
#define CMPPRG_REF0_812   0xc0
#define CMPPRG_REF0_750   0xb0
#define CMPPRG_REF0_688   0xa0
#define CMPPRG_REF0_625   0x90
#define CMPPRG_REF0_562   0x80
#define CMPPRG_REF0_500   0x70
#define CMPPRG_REF0_437   0x60
#define CMPPRG_REF0_375   0x50
#define CMPPRG_REF0_312   0x40
#define CMPPRG_REF0_250   0x30
#define CMPPRG_REF0_188   0x20
#define CMPPRG_REF0_125   0x10
#define CMPPRG_REF0_062   0x00
#define CMPPRG_REF0_042   0x14
#define CMPPRG_REF0_021   0x04


#pragma fastcall16 CMPPRG_Start             // Proxy class 2
#pragma fastcall16 CMPPRG_SetPower          // Proxy class 2
#pragma fastcall16 CMPPRG_SetRef            // Proxy class 2
#pragma fastcall16 CMPPRG_Stop              // Proxy class 1

//-------------------------------------------------
// Prototypes of the CMPPRG API.
//-------------------------------------------------
extern void CMPPRG_Start(BYTE bPowerSetting);
extern void CMPPRG_SetPower(BYTE bPowerSetting);
extern void CMPPRG_SetRef(BYTE bRefValue);
extern void CMPPRG_Stop(void);

//-------------------------------------------------
// Hardware Register Definitions
//-------------------------------------------------
#pragma ioport  CMPPRG_COMP_CR0:    0x071
BYTE            CMPPRG_COMP_CR0;
#pragma ioport  CMPPRG_COMP_CR1:    0x072
BYTE            CMPPRG_COMP_CR1;
#pragma ioport  CMPPRG_COMP_CR2:    0x073
BYTE            CMPPRG_COMP_CR2;
#pragma ioport  CMPPRG_COMP_CR3:    0x070
BYTE            CMPPRG_COMP_CR3;

// end of file CMPPRG.h

⌨️ 快捷键说明

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