?? pcnt.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 - Pulse counting.
// Note that TDK electric power metering ICs have memory-mapped registers
// that provide the same data as the pulses. Use of this module is
// deprecated because the counting interrupts can add a substantial
// real time burden, especially at high pulse rates. It is provided
// because several customers requested it.
//
// AUTHOR: RGV
//
// HISTORY: See end of file.
//**************************************************************************
// File: pcnt.h
//
#ifndef PCNT_H
#define PCNT_H 1
void pcnt_accumulate (void) small reentrant; // called in RTC interrupt to add them up on time.
// counts pulses for a count of seconds; if seconds is <= 0, counts forever
// The trick is that the "read" logic of the DIO pin can "see" the
// output of the pulse logic.
void pcnt_init (void); // for starting continuous pulse counting at reset.
void pcnt_start (int16_t seconds);
void pcnt_update (void); // updates the pulse counts
void pulse_cnt_lcd (uint8_t select_phase, uint8_t select_interval);
extern int32_t pcnt_w_mod;
extern int32_t pcnt_r_mod;
#if PULSE_SOFT // software pulse outputs exist
extern int32_t pcnt_3_mod;
extern int32_t pcnt_4_mod;
#endif
/***************************************************************************
* History
* $Log: pcnt.h,v $
* Revision 1.9 2006/09/09 01:14:30 gmikef
* *** empty log message ***
*
* Revision 1.8 2006/07/25 18:07:48 tvander
* Fixed the pulse counting interrupts
*
* Revision 1.7 2006/03/06 03:40:04 Michael T. Fischer
* More 6530 prep.
*
* Revision 1.6 2006/01/04 04:47:53 gmikef
* Switched RMS and VA calculations to use floating point. (and Calibration).
*
* Revision 1.6 2005/12/31 00:13:36 gmikef
* Switched to floating point arithmetic. Decided it is high even precision.
* It is faster and no more code space.
*
* Revision 1.4 2005/10/08 04:41:26 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.
*
* Revision 1.3 2005/09/22 23:45:18 tvander
* Clean build all models and unit tests, updated copyright to be fore Teridian
*
* Revision 1.2 2005/08/30 18:18:52 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 /* pcnt.h */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -