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

📄 wh.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.    *
 ***************************************************************************/
//**************************************************************************
//  DESCRIPTION: 71M652x POWER METER - Accumulation Routines.
// 
//  AUTHOR:  RGV
//
//  HISTORY: See end of file.
//**************************************************************************
// File: WH.H
//               
// displays a precalculated 6-digit number in watts format
void wh_brownout_to_lcd (uint32_t l);

// convert a 64-bit internal watt hours count to a 6-digit value
// (i.e. this is the routine that precalculates for the above).
uint32_t wh_to_long (uint8x_t *val);

#if DEMAND
uint32_t w_to_long (uint32_t val);
#endif

#if WATT_ELEMENT
void w_lcd  (uint32_t val);
void wh_lcd (uint8x_t *val);

#if VA_ELEMENT || NET_METER || AUTOCAL
void wh_sum_net (uint8x_t *s, int32p_t *w);
#endif
#if ABS_VALUE
void wh_sum_abs (uint8x_t *s, int32p_t *w);
#endif
#if IMPORT
void wh_sum_import (uint8x_t *s, int32p_t *w);
#endif
#if EXPORT
void wh_sum_export (uint8x_t *s, int32p_t *w);
#endif

void wh_accumulate (void);

#endif // WATT_ELEMENT.

/***************************************************************************
 * History
 * $Log: wh.h,v $
 * Revision 1.14  2006/09/13 21:39:13  gmikef
 * *** empty log message ***
 *
 * Revision 1.13  2006/09/10 00:28:59  Michael T. Fischer
 * First version to support DGM0915 LCD.
 *
 * Revision 1.12  2006/09/09 01:15:09  gmikef
 * *** empty log message ***
 *
 * Revision 1.11  2006/09/08 07:38:14  Michael T. Fischer
 * *** empty log message ***
 *
 * Revision 1.10  2006/07/07 01:07:06  tvander
 * Made the brownout LCD format logic non-reentrant, and conditional on a new
 * compile flag, AUTOSLEEP
 *
 * Revision 1.9  2006/06/06 05:15:21  tvander
 * clean build
 *
 * Revision 1.8  2006/05/18 23:18:55  tvander
 * 16K and 32K
 * First cut at new requirements.
 * 32K 6521 is grossly tested.
 * All others have a clean compile with C51 8.02
 *
 * Revision 1.7  2006/04/27 00:06:58  tvander
 * Added tamper resistance, mostly to wh.c; Added a calibration signal to rtc.c
 *
 * Revision 1.6  2006/03/06 03:42:00  Michael T. Fischer
 * More 6530 prep.
 *
 * Revision 1.5  2006/02/10 03:13:22  tvander
 * Fixed VAh calculations and display, date display
 *
 * Revision 1.4  2006/01/10 04:08:53  gmikef
 * Added PDATA support for CE Outputs.
 *
 * Revision 1.2  2005/11/09 02:21:17  tvander
 * Added code to display watt hours from brownout mode.
 * Added code to clear EEPROM (lapie command "EEE")
 *
 * Revision 1.1  2005/10/08 04:41:29  tvander
 * Fixed priority inversion.
 * Rewrote watchdog to work in brownout, but of course it doesn't work.
 * Watchdog can now be defeated by clearing watchdog option to 0.
 * Reorganized watt hour modules (at last!).
 * Disabled reading of STATUS in 6521_cli because the CE's status is always SAG.
 * Tested with 6521_CLI; measurements seem to work.
 * Fixed other builds.
 *
 *
 * 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.         *
 ***************************************************************************/
/* wh.h */

⌨️ 快捷键说明

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