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

📄 abb.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/**********************************************************************************/
/*            TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION              */
/*                                                                                */
/*   Property of Texas Instruments -- For  Unrestricted  Internal  Use  Only      */
/*   Unauthorized reproduction and/or distribution is strictly prohibited.  This  */
/*   product  is  protected  under  copyright  law  and  trade  secret law as an  */
/*   unpublished work.  Created 1987, (C) Copyright 1997 Texas Instruments.  All  */
/*   rights reserved.                                                             */
/*                                                                                */
/*                                                                                */
/*   Filename         : abb.h                                                     */
/*                                                                                */
/*   Description      : Analog BaseBand registers and bits definition.	    	  */
/*                       Functions to drive the ABB device.                       */
/*                       The Serial Port Interface is used to connect the TI 	  */
/*						 Analog BaseBand (ABB).				    				  */
/*						 It is assumed that the ABB is connected as the SPI       */																				  
/*                       device 0.                                                */																				  
/*																				  */
/*   Author           : Pascal PUEL                                               */
/*                                                                                */
/*   Version number   : 1.0                                                       */
/*                                                                                */
/*   Date and time    : Dec 2002                                                  */
/*                                                                                */
/*   Previous delta   : Creation                                                  */
/*                                                                                */
/**********************************************************************************/

#ifndef __ABB_H__
#define __ABB_H__

#include "sys_types.h"

#ifndef _WINDOWS

#include "l1_sw.cfg"

#if(!OP_L1_STANDALONE)
  #include "chipset.cfg"
#endif


// DEFINITIONS FOR OMEGA/NAUSICA
#if (ANALOG == 1)
  // ABB PAGE
  #define PAGE0	0x0001
  #define PAGE1	0x0002

  // ABB REGISTERS
  //=== PAGE 0 =======
  #define PAGEREG      1
  #define APCDEL1      2
  #define BULDATA1_2   3
  #define TOGBR1       4
  #define TOGBR2       5
  #define VBDCTRL      6
  #define AUXAFC1      7
  #define AUXAFC2      8
  #define AUXAPC       9
  #define APCRAM       10
  #define APCOFF       11
  #define AUXDAC       12
  #define MADCCTRL1    13
  #define MADCCTRL2    14
  #define VBATREG      15
  #define VCHGREG      16
  #define ICHGREG      17
  #define VBKPREG      18
  #define ADIN1REG     19
  #define ADIN2REG     20
  #define ADIN3REG     21
  #define ADIN4XREG    22
  #define ADIN5YREG    23
  #define MADCSTAT     24
  #define CHGREG       25
  #define ITMASK       26
  #define ITSTATREG    27
  #define BCICTL1      28
  #define BCICTL2      29
  #define VRPCCTL2     30
  #define VRPCSTS      31
  
  //=== PAGE 1 =======
  #define PAGEREG      1
  #define BULIOFF      2
  #define BULQOFF      3
  #define BULQDAC      4
  #define BULIDAC      5
  #define BBCTL        6
  #define VBUCTRL      7
  #define VBCTRL       8
  #define PWDNRG       9
  #define TSC_TIMER    10
  #define VRPCCTRL3    11
  #define APCOUT       12
  #define VRPCBGT      18
  #define TAPCTRL      19
  #define TAPREG       20
  #define AFCCTLADD    21
  #define AFCOUT       22
  #define VRPCCTRL1    23
  #define VRPCCTRL4    24
  #define APCDEL2      26
  #define ITSTATREG    27

  // Registers bit definitions
  // ABB device bits definition of register VBCTRL
  #define VDLAUX    0x001
  #define VDLEAR    0x002
  #define VBUZ      0x004
  #define VULSWITCH 0x008
  #define MICBIAS   0x010
  #define VALOOP    0x020
  #define VCLKMODE  0x040
  #define VSYNC     0x080
  #define VBDFAUXG  0x100
  #define VFBYP     0x200

  // ABB device bits definition of register VBUCTRL
  #define DXEN      0x200

  // ABB device bits definition of register VRPCSTS
  #define ONBSTS    0x01  // ON Button push flag
  #define ONRSTS    0x02  // Remote ON flag
  #define ITWSTS    0x04  // Wake-up IT flag
  #define CHGSTS    0x08  // Charger plug flag
  #define ONREFLT   0x10  // ON Button current state
  #define ORMRFLT   0x20  // Remote ON current state
  #define CHGPRES   0x40  // Charger plug current state

  // ABB device bits definition of register ITSTATREG
  #define REMOT_IT_STS    0x02
  #define PUSHOFF_IT_STS  0x04
  #define CHARGER_IT_STS  0x08
  #define ADCEND_IT_STS   0x20

  // On Nausica, if the PWR key is pressed, the bit is set, and cleared when released
  #define PWR_OFF_KEY_PRESSED       (ONREFLT)

  // ABB ADC Interrupts
  #define EOC_INTENA  0x03DF
  #define EOC_INTMASK 0x0020

  // ABB ADC CHANNELS
  #define VBATCV      0x0001
  #define VCHGCV      0x0002
  #define ICHGCV      0x0004
  #define VBKPCV      0x0008
  #define ADIN1CV     0x0010
  #define ADIN2CV     0x0020
  #define ADIN3CV     0x0040
  #define vADIN4XCV   0x0080
  #define ADIN5XCV    0x0100
  #define ALL         0x01FF
  #define NONE        0x0000

  // ABB MODULES
  #define MADC        0x8000
  #define AFC         0x2000
  #define ADAC        0x0800
  #define DCDC        0x0080
  #define ALLOFF      0x0000

  // Definitions of OMEGA test modes for baseband windows
  #define TSPTEST1       0x001d
  #define TSPTEST2       0x001e
  #define AFCTEST        0x0010
  #define AFCNORM        0x0000


// DEFINITIONS FOR IOTA
#elif (ANALOG == 2)
  // ABB PAGE
  #define PAGE0	0x0001
  #define PAGE1	0x0002
  #define PAGE2	0x0010

  // ABB REGISTERS
  //=== PAGE 0 =======
  #define PAGEREG      1
  #define APCDEL1      2
  #define BULDATA1_2   3
  #define TOGBR1       4
  #define TOGBR2       5
  #define VBDCTRL      6
  #define AUXAFC1      7
  #define AUXAFC2      8
  #define AUXAPC       9
  #define APCRAM       10
  #define APCOFF       11
  #define AUXDAC       12
  #define MADCCTRL     13
  #define VBATREG      15
  #define VCHGREG      16
  #define ICHGREG      17
  #define VBKPREG      18
  #define ADIN1REG     19
  #define ADIN2REG     20
  #define ADIN3REG     21
  #define ADIN4REG     22
  #define MADCSTAT     24
  #define CHGREG       25
  #define ITMASK       26
  #define ITSTATREG    27
  #define BCICTL1      28
  #define BCICTL2      29
  #define VRPCDEV      30
  #define VRPCSTS      31
								
  //=== PAGE 1 =======		
  #define PAGEREG      1
  #define BULIOFF      2
  #define BULQOFF      3
  #define BULQDAC      4
  #define BULIDAC      5
  #define BBCTRL       6
  #define VBUCTRL      7
  #define VBCTRL1      8
  #define PWDNRG       9
  #define VBPOP        10
  #define VBCTRL2      11
  #define APCOUT       12
  #define BCICONF      13
  #define BULGCAL      14
  #define TAPCTRL      19
  #define TAPREG       20
  #define AFCCTLADD    21
  #define AFCOUT       22
  #define VRPCSIM      23
  #define AUXLED       24
  #define APCDEL2      26
  #define ITSTATREG    27
  #define VRPCMSKABB   29
  #define VRPCCFG      30
  #define VRPCMSK      31

  // Registers bit definitions
  // ABB device bits definition of register VBCTRL1
  #define VDLAUX    0x001
  #define VDLEAR    0x002
  #define VBUZ      0x004
  #define VULSWITCH 0x008
  #define MICBIAS   0x010
  #define VALOOP    0x020
  #define VCLKMODE  0x040
  #define VSYNC     0x080
  #define VBDFAUXG  0x100
  #define VFBYP     0x200
 
  // ABB device bits definition of register VBCTRL2
  #define MICBIASEL 0x001
  #define VDLHSO    0x002
  #define MICNAUX   0x004

  // ABB device bits definition of register VBUCTRL
  #define DXEN      0x200

  // ABB device bits definition of register VBPOP
  #define HSODIS    0x001
  #define HSOCHG    0x002
  #define HSOAUTO   0x004
  #define EARDIS    0x008
  #define EARCHG    0x010
  #define EARAUTO   0x020
  #define AUXDIS    0x040
  #define AUXCHG    0x080
  #define AUXAUTO   0x100

  // ABB device bits definition of register VRPCSTS
  #define ONBSTS    0x01  // ON Button push flag
  #define ONRSTS    0x02  // Remote ON flag
  #define ITWSTS    0x04  // Wake-up IT flag
  #define CHGSTS    0x08  // Charger plug flag
  #define ONREFLT   0x10  // ON Button current state
  #define ORMRFLT   0x20  // Remote ON current state
  #define CHGPRES   0x40  // Charger plug current state

  // ABB device bits definition of register ITSTATREG
  #define REMOT_IT_STS    0x02
  #define PUSHOFF_IT_STS  0x04
  #define CHARGER_IT_STS  0x08
  #define ADCEND_IT_STS   0x20

  // On Iota, the bit is set when the key is released and set when the key is pressed
  #define PWR_OFF_KEY_PRESSED      (0)

  // ABB ADC Interrupts
  #define EOC_INTENA  0x03DF
  #define EOC_INTMASK 0x0020

  // ABB ADC CHANNELS
  #define VBATCV      0x0001
  #define VCHGCV      0x0002
  #define ICHGCV      0x0004
  #define VBKPCV      0x0008
  #define ADIN1CV     0x0010
  #define ADIN2CV     0x0020
  #define ADIN3CV     0x0040
  #define ADIN4CV     0x0080
  #define ALL         0x00FF
  #define NONE        0x0000

  // ABB MODULES
  #define MADC        0x8000
  #define AFC         0x2000
  #define ADAC        0x0800
  #define DCDC        0x0080
  #define ALLOFF      0x0000

  // Definitions of IOTA test modes
  #define TSPTEST1      0x001d
  #define TSPTEST2      0x001e
  #define AFCTEST       0x0010
  #define AFCNORM       0x0000

  // Definition for IOTA test modes
  #define TSPEN         0x001a
  #define MADCTEST      0x0012

⌨️ 快捷键说明

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