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

📄 ce65xx.h

📁 TDK 6521 SOC 芯片 DEMO程序
💻 H
字号:
/***************************************************************************
 * This code and information is provided "as is" without warranty of any   *
 * kind, either expressed or implied, including but not limited to the     *
 * implied warranties of merchantability and/or fitness for a particular   *
 * purpose.                                                                *
 *                                                                         *
 * Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.    *
 * this program is fully protected by the United States copyright          *
 * laws and is the property of Teridian Semiconductor Corporation.         *
 ***************************************************************************/
//**************************************************************************
//  DESCRIPTION: 71M65xx POWER METER - Compute Engine Program/Data.
// 
//  AUTHOR:  MTF
//
//  HISTORY: See end of file
//**************************************************************************
// File: CE65xx.H
//               
#ifndef _CE65xx
#define _CE65xx

// Copy single 8-bit byte MPU <= XRAM ======================================//
#define MEMCPY_MX  *pDst = *pSrc;
#define NEXT_MX    pDst++; pSrc++;
#define NEXT_MCE   pDst++; pSrc++;

// Copy single 32-bit word MPU <= CE.
#define MEMCPY_MCE \
    BEGIN_CE_CRITICAL_SECTION;              	\
    CLK_STRETCH;    MEMCPY_MX;  NEXT_MX;    	\
    CLK_RELAX;      MEMCPY_MX;  NEXT_MX;    	\
                    MEMCPY_MX;  NEXT_MX;    	\
                    MEMCPY_MX;              	\
    END_CE_CRITICAL_SECTION;
    
#define MEMCPY_XM  *pDst = *pSrc;
#define NEXT_XM    pDst++; pSrc++;
#define NEXT_CEM   pDst++; pSrc++;

// Copy single 32-bit word CE <= MPU.
#define MEMCPY_CEM \
    BEGIN_CE_CRITICAL_SECTION;              \
                    MEMCPY_XM;  NEXT_XM;    \
                    MEMCPY_XM;  NEXT_XM;    \
                    MEMCPY_XM;  NEXT_XM;    \
    CLK_STRETCH;    MEMCPY_XM;  CLK_RELAX;  \
    END_CE_CRITICAL_SECTION;

void memcpy_cer (int32x_t *pDst, int32r_t *pSrc, uint8_t len);

#if CONSTANTS_DBG || FLAG
void memcpy_xce (int32x_t *pDst, int32x_t *pSrc, uint8_t len) small reentrant;
#endif

#if FLAG
void memcpy_cex (int32x_t *pDst, int32x_t *pSrc, uint8_t len) small reentrant;
#endif

#if CONSTANTS_DBG
void get_ce_constants (void); // reads the meter configuration
extern volatile struct Constants_t  xdata CE_Constants _at_ (CE_DATA_BASE + (0x08 << 2));
#endif

#if FREQUENCY || MAIN_EDGE_COUNT || CAL_SAVE || VOLTAGE_PHASES || SHUNTS || PULSE_SOFT
// Get value from the CE.
int32_t memget_ce (int32x_t *pSrc) small reentrant;
#endif

#if CAL_SAVE || PULSE_SOURCE
// Set CE to value.
void memset_ce (int32x_t *pDst, int32_t src) small reentrant;
#endif


void ce_init (void);

#define UNITY 0x4000L

/****************************************************************************
 * History:
 * $Log: ce65xx.h,v $
 * Revision 1.5  2006/09/09 01:13:45  gmikef
 * *** empty log message ***
 *
 * Revision 1.4  2006/06/06 04:00:15  tvander
 * Updated for new calibration compile constants
 *
 * Revision 1.3  2006/03/06 03:38:14  Michael T. Fischer
 * More 6530 prep.
 *
 * Revision 1.2  2006/02/08 03:43:25  tvander
 * Made "import" the default power measurement mode, rather than net-metering
 *
 * Revision 1.1  2006/01/13 01:28:50  gmikef
 * *** empty log message ***
 *

 *
 * Copyright (C) 2005 Teridian Semiconductor Corp. All Rights Reserved.    *
 * this program is fully protected by the United States copyright          *
 * laws and is the property of Teridian Semiconductor Corporation.         *
 ***************************************************************************/
#endif

⌨️ 快捷键说明

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