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

📄 defaults.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, Corporation.
 * All Rights Reserved.
 *                                             
 ***************************************************************************/
//**************************************************************************
//  DESCRIPTION: 71M652x POWER METER - Default values include. 
// 
//  AUTHOR:  MTF
//
//  HISTORY: See end of file.
//**************************************************************************
// File:  DEFAULTS.H
//               
#ifndef DEFAULTS_H
#define DEFAULTS_H

#define SEVEN_BIT     0x20
#define ECHO          0x10
#define PARITY_NONE   0x08
#define PARITY_ODD    0x04
#define STOP_BIT2     0x02
#define XON_XOFF      0x01

/*** Public functions declared within this module ***/
void set_defaults (void);

/*** Public variables declared within this module ***/
extern uint8_t xdata select_total, select_phase;
extern uint8_t xdata select_flow;
extern uint8_t xdata select_pulse, select_interval;
extern uint8_t xdata select_rms;
extern uint8_t xdata select_scroll;

// These are collected into a single module as globals
// because they have to be at a fixed offset for a
// configuration tool: io_merge.exe
extern uint8r_t ri_defaults[];
extern uint8r_t defaults[];

#ifdef METER_H  // used only by meter.c
extern struct Parameters_t code r_Parms;
#endif

// these are used to print identifying information.
extern uint8r_t r_demo_version[];
extern uint8r_t r_ce_version[];
extern uint8r_t copyright1[];
extern uint8r_t copyright2[];

#if TRACE10
#define IO_BASE       0x2000
#define IO_CE         (IO_BASE + 0x00)
#define IO_CE_IDX            0  
#define IO_CE_SIZE          16  

#define IO_LCD        (IO_BASE + 0x20)
#define IO_LCD_IDX    (IO_CE_SIZE)
#define IO_LCD_SIZE          3

#define IO_RTM        (IO_BASE + 0x60)
#define IO_RTM_IDX    (IO_CE_SIZE + IO_LCD_SIZE)
#define IO_RTM_SIZE          4

// reserved, unused part of table, maintained for io_merge
#define IO_R1_IDX     (IO_RTM_IDX + IO_RTM_SIZE)
#define IO_R1_SIZE    5

#define IO_TRIM       (IO_BASE + 0xFD)    
#define IO_TRIM_IDX   (IO_R1_IDX + IO_R1_SIZE)
#define IO_TRIM_SIZE  1

#elif M6520
#define IO_BASE       0x2000
#define IO_CE         (IO_BASE + 0x00)
#define IO_CE_IDX     0  
#define IO_CE_SIZE    16  

#define IO_LCD        (IO_BASE + 0x20)
#define IO_LCD_IDX    (IO_CE_IDX + IO_CE_SIZE)
#define IO_LCD_SIZE   2

#define IO_BLINK        (IO_BASE + 0x5A)    
#define IO_BLINK_IDX  (IO_LCD_IDX + IO_LCD_SIZE)    
#define IO_BLINK_SIZE 1

#define IO_RTM        (IO_BASE + 0x60)
#define IO_RTM_IDX    (IO_BLINK_IDX + IO_BLINK_SIZE)
#define IO_RTM_SIZE   4

#define IO_PLS          (IO_BASE + 0x80)    
#define IO_PLS_IDX    (IO_RTM_IDX + IO_RTM_SIZE)
#define IO_PLS_SIZE      2

#define IO_CE3          (IO_BASE + 0xA8)    
#define IO_CE3_IDX    (IO_PLS_IDX + IO_PLS_SIZE)
#define IO_CE3_SIZE   3

#define IO_TRIM          (IO_BASE + 0xFD)    
#define IO_TRIM_IDX   (IO_CE3_IDX + IO_CE3_SIZE)
#define IO_TRIM_SIZE  3

#else
#error unknown device
#endif

#define BAUD0_IDX 12
#define BAUD1_IDX 14
#if 0
#define SEVEN_BIT     0x20
#define ECHO          0x10
#define PARITY_NONE   0x08
#define PARITY_ODD    0x04
#define STOP_BIT2     0x02
#define XON_XOFF      0x01
#endif

/***************************************************************************
 * $Log: defaults.h,v $
 * Revision 1.8  2006/10/13 00:48:14  tvander
 * Removed compile options for 6530, 6515;
 * renamed 6511 and 6513 to trace11 and trace13;
 * Binary verified unchanged from previous version.
 *
 * Revision 1.7  2006/03/10 00:05:06  tvander
 * BAUD_IDX (baud index) for serial 0 and 1 are made public so that initializations
 * can use the io_merge baud rates.
 *
 * Revision 1.6  2006/09/06 02:15:22  tvander
 * Added 6510 trim index
 *
 * Revision 1.5  2006/08/09 00:56:57  tvander
 * *** empty log message ***
 *
 * Revision 1.4  2006/06/24 04:43:23  tvander
 * Debugged the battery modes, especially the mission->brownout transition
 * Includes necessary changes for the reset hack needed for the 6521A03.
 *
 * Revision 1.3  2005/09/22 23:45:10  tvander
 * Clean build all models and unit tests, updated copyright to be fore Teridian
 *
 * Revision 1.2  2005/08/31 05:55:36  gmikef
 * First version w/ LAPIE interface.
 *
 * Revision 1.1  2005/08/30 01:58:44  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 /* defaults.h */

⌨️ 快捷键说明

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