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

📄 psgdrv.h

📁 SIM卡的驱动程序,有利于开发一些与SIM相通的一些工具,或者手机软件SIM驱动的开发
💻 H
📖 第 1 页 / 共 2 页
字号:
///////////////////////////////////////////////////////////////////////////////
//
//   REVISION HISTORY 
//
//   $Log:   W:\UC\PH2SW\Rockwell\BASE\Ps\rock\ARCHIVES\PSGDRV.H_v  $
//   
//      Rev 3.22   18 Jan 2001 16:50:34   wanggc1
//   Project: UC SCRs ( GSM )
//   SCR 1612 - CX805 Development Platform Support
//   
//      Rev 3.21   09 Nov 2000 10:24:42   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1525 - Port DMA interface SIM driver (PS) for new platform library
//   
//      Rev 3.20   Nov 08 2000 12:10:24   wanggc1
//   Project: UC SCRs ( GSM )
//   SCR 1522 - Migration from ARM211a  to ARM251
//   
//      Rev 3.19   Nov 07 2000 11:42:40   wanggc1
//   Project: UC SCRs ( GSM )
//   SCR 1520 - Modifications for CX805 Migration
//   
//      Rev 3.18   Oct 13 2000 11:36:44   maungmt
//   Project: UC SCRs ( GSM )
//   SCR 1499 - Preparation for CX805 Migration
//   Change the SIM register names consistent with CX805
//   register naming convention.
//   
//      Rev 3.17   16 Mar 2000 18:02:32   hisamok
//   Project: UC SCRs ( GSM )
//   SCR 1278 - Phase 1 5v SIM Takes About 3 Minutes to Be Initialized at Startup
//   
//   
//      Rev 3.16   16 Mar 2000 16:47:42   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1279 - Infrequent Broken SIM due to framer task taking too long
//   
//   
//      Rev 3.15   08 Mar 2000 17:54:34   ordd
//   Project: UC SCRs ( GSM )
//   SCR 1255 - "Broken SIM' monitor and data logger
//   
//   
//      Rev 3.14   22 Feb 2000 20:17:48   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1210 - temporarily backing out of changes for psgdrv.h to avoid field lockup
//   
//   
//      Rev 3.12   18 Feb 2000 15:57:40   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1202 - Add logic to TimerA to ensure that the timer is correctly set.
//   
//   
//      Rev 3.11   10 Feb 2000 18:12:10   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1188 - Reduce occurances of "Broken SIM" message during ESD testing.
//   
//   
//      Rev 3.10   01 Feb 2000 15:56:52   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1163 - Lockup Instead of BROKEN SIM Msg.
//   
//   
//      Rev 3.9   27 Oct 1999 15:26:02   omahond
//   Project: UC SCRs ( GSM )
//   SCR 1016 - Removal of GSMcprintf from SIM interrupt handler PSWaitProcByte()
//   
//   
//      Rev 3.8   15 Jul 1999 14:41:26   omahond
//   Project: UC SCRs ( GSM )
//   SCR 736 - Fix for SIM test case 27.11.1.5
//   
//   
//      Rev 3.6   27 Apr 1999 01:47:52   aiouaza
//   Project: UC SCRs ( GSM )
//   SCR 592 - Build Warning cleanup
//   
//   
//      Rev 3.5   16 Oct 1998 12:31:44   LIG
//   Project: UC SCRs ( GSM )
//   SCR 299 - PH2 - TA failure: SIM power on/off sequence.
//   
//   
//      Rev 3.4   08 Oct 1998 16:06:32   LIG
//   Project: UC SCRs ( GSM )
//   SCR 263 - PH2 - Speed up SIM card recognition
//   
//   
//      Rev 3.3   23 Sep 1998 16:03:20   LIG
//   Project: UC SCRs ( GSM )
//   SCR 197 - Phase 1 and inverted SIMs are not working on Samsung platform
//   
//   
//      Rev 3.2   01 Sep 1998 12:14:36   LIG
//   Project: UC SCRs ( GSM )
//   SCR 194 - PH2 - Combination fixes of SCR 36, 45, 192, and 193
//   
//   
//      Rev 3.1   27 Aug 1998 17:00:54   LIG
//   Project: UC SCRs ( GSM )
//   SCR 45 - PH2 - SIM Signal Sequence Control (982501)
//   
//   
//      Rev 3.0   19 Jun 1998 11:04:50   dangmk
//   Initial CheckIn
//   
//      Rev 2.8   28 Mar 1998 17:47:32   ramos
//   Removed #ifdef (M46, ARM)
//   
//      Rev 2.7   11 Mar 1998 17:15:22   vahdatm
//   Updated to handle "Inverse Mode" SIM (Gary)
//   
//      Rev 2.6   31 Oct 1997 15:17:16   quanp
//   Add code to implement DMA for M46 SIM
//   
//      Rev 2.5   10 Oct 1997 16:28:22   Nicholson
//   Modified to support M46.
//   
//      Rev 2.4   24 Jul 1997 09:21:16   quanp
//   Changed ifdef for code to support new SIM FPGA to _ARM_.
//   
//      Rev 2.3   23 Jul 1997 15:40:48   quanp
//   Modify to support inverted mode for new SIM for ARM
//   
//      Rev 2.2   22 Jul 1997 11:28:20   quanp
//   Clean up
//   
//      Rev 2.1   21 Jul 1997 17:53:26   quanp
//   Added HW_SIM code for ARM 
//   
//      Rev 2.0   11 Jul 1997 10:37:22   dangmk
//   Initial CheckIn for this ps\rock dir.
//   
//   
//      Rev 1.4   04 Jun 1997 11:00:16   quanp
//   Enable Timer A interrupt.
//   Clean up.
//   
//      Rev 1.3   29 May 1997 17:10:40   shaheen
//   Replaced include of htimers.h with itimers.h to be 
//   consistent with the new file naming in the platform files.
//   
//   
//      Rev 1.2   23 May 1997 12:21:14   quanp
//   commented out disabling of retransmission
//   in PSSetInvert() 
//   
//      Rev 1.1   15 May 1997 08:45:32   hsuj
//   (1)  Deleted gsmucl40.h include
//   (2)  Deleted tracelow.h include
//   (3)  Added iDevAPI.h include
//   (4)  Added hwinit.h include
//   (5)  Added hTimer.h include
//   (6)  Added system.h include
//   (7)  Changed PSChangeIdleToDeact() to use DevWrite() to GPIO
//   (8)  Changed PSChangeToNull() to use DevWrite() to GPIO
//   (9)  Changed PSChangeDeactToRx() to use DevWrite() to GPIO PortE Data Register
//   (10)  Removed writing to GPIO PORTE_DIR register since it is done in HwInit() in PSChangeDeactToRx()
//   (11)  Changed setting of TimerA to use SetTimer() in PSChangeDeactToRx()
//   (12)  Changed polling of TimerA interrupt flag to use TimerInterruptFlag() macro
//   (13)  Changed PSResetHigh() to use DevWrite() to GPIO
//   (14)  Changed PSSetInverse() to use DevWrite() to GPIO
//   (15)  Changed PSSetDirect() to use DevWrite() to GPIO
//   (16)  Commented out the #if 0 section of PSSend()
//   (17)  Type-casted all SIM register references with (UINT16 *) since regaddr.h define the registers to be (VOID *)
//   
//   
//      Rev 1.0   12 Feb 1997 19:51:16   HSUJ
//   header for hardware SIM
//   
///////////////////////////////////////////////////////////////////////////////

#ifndef __PSGDRV_H
#define __PSGDRV_H


/*---------------------------- Includes: ---------------------------------*/

#include "target.h"
#include "..\system\regaddr.h"
#include "iDevAPI.h"
#include "..\hw\rock\hwinit.h"
#include "..\system\system.h"
#include "iTimers.h"
#include "..\system\interrup.h"


/*---------------------------- Global Defines: ---------------------------*/

extern BOOL PSInverseMode;
extern void PupsPutChar( char nix );
extern UINT8 PSInverseData( UINT8 in );
extern void  PSSetClockSpeed(void);

extern UINT8 PSTxChar;
extern UINT32 PSGuardPeriod;

#define PS_DEFAULT_GUARD_PERIOD    2
#define PS_EXTENDED_GUARD_PERIOD    3

//for power up
#define PSSetSIMEnToHigh()    *(UINT16 *)SIM_CTRL_LO_REG |= (SIM_BLK_ACT)
#define PSSetSIMEnToLow()     *(UINT16 *)SIM_CTRL_LO_REG &= ~(SIM_BLK_ACT)

#define PSDataIOEnable()     *(UINT16 *)SIM_CTRL_LO_REG |= (SIM_DATA_ACT)

⌨️ 快捷键说明

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