1.1 --- a/epoc32/include/assp/template_assp/template_assp_priv.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,154 +0,0 @@
1.4 -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// template\template_assp\template_assp_priv.h
1.18 -// Template ASSP architecture private header file
1.19 -//
1.20 -//
1.21 -
1.22 -
1.23 -
1.24 -#ifndef __KA_TEMPLATE_H__
1.25 -#define __KA_TEMPLATE_H__
1.26 -#include <e32const.h>
1.27 -#include <arm.h>
1.28 -#include <assp.h>
1.29 -#include <template_assp.h>
1.30 -
1.31 -// Example only
1.32 -const TInt KNumTemplateInts=EAsspIntIdZ+1;
1.33 -
1.34 -class TemplateInterrupt : public Interrupt
1.35 - {
1.36 -public:
1.37 - /**
1.38 - * These functions are required to initialise the Interrupt controller,or perform housekeeping
1.39 - * functions, or dispatch the incoming IRQ or FIQ interrupts.
1.40 - */
1.41 -
1.42 - /**
1.43 - * initialisation
1.44 - */
1.45 - static void Init1();
1.46 - static void Init3();
1.47 - /**
1.48 - * IRQ/FIQ dispatchers
1.49 - */
1.50 - static void IrqDispatch();
1.51 - static void FiqDispatch();
1.52 - /**
1.53 - * Housekeeping (disable and clear all hardware interrupt sources)
1.54 - */
1.55 - static void DisableAndClearAll();
1.56 - /**
1.57 - * Empty interrupt handler
1.58 - */
1.59 - static void Spurious(TAny* anId);
1.60 -public:
1.61 - static SInterruptHandler Handlers[KNumTemplateInts];
1.62 - };
1.63 -
1.64 -class TemplateAssp : public Asic
1.65 - {
1.66 -public:
1.67 - IMPORT_C TemplateAssp();
1.68 -
1.69 -public:
1.70 - /**
1.71 - * These are the mandatory Asic class functions which are implemented here rather than in the Variant.
1.72 - * It makes sense having an ASSP class when there is functionality at Variant/Core level which is common
1.73 - * to a group of devices and is provided by an IP block(s) which is likely to be used in future generations
1.74 - * of the same family of devices.
1.75 - * In general the common functionality includes first-level Interrupt controllers, Power and Reset controllers,
1.76 - * and timing functions
1.77 - */
1.78 -
1.79 - /**
1.80 - * initialisation
1.81 - */
1.82 - IMPORT_C virtual void Init1();
1.83 - IMPORT_C virtual void Init3();
1.84 - /**
1.85 - * Read and return the Startup reason of the Super Page (set up by Bootstrap)
1.86 - * @return A TMachineStartupType enumerated value
1.87 - * @see TMachineStartupType
1.88 - */
1.89 - IMPORT_C virtual TMachineStartupType StartupReason();
1.90 -
1.91 - /**
1.92 - * timing functions
1.93 - */
1.94 -
1.95 - /**
1.96 - * Obtain the period of System Tick timer in microseconds
1.97 - * @return Period of System Tick timer in microseconds
1.98 - */
1.99 - IMPORT_C virtual TInt MsTickPeriod();
1.100 - /**
1.101 - * Obtain System Time from the RTC
1.102 - * @return System Time in seconds from 00:00 hours of 1/1/2000
1.103 - */
1.104 - IMPORT_C virtual TInt SystemTimeInSecondsFrom2000(TInt& aTime);
1.105 - /**
1.106 - * Obtain Adjust the RTC with new System Time (from 00:00 hours of 1/1/2000)
1.107 - * @return System wide error code
1.108 - */
1.109 - IMPORT_C virtual TInt SetSystemTimeInSecondsFrom2000(TInt aTime);
1.110 - /**
1.111 - * Obtain the time it takes to execute two processor instructions
1.112 - * @return Time in nanoseconds it takes two execute 2 instructions at the processor clock speed
1.113 - */
1.114 - IMPORT_C virtual TUint32 NanoWaitCalibration();
1.115 -
1.116 -public:
1.117 - /**
1.118 - * for derivation by Variant
1.119 - */
1.120 -
1.121 - /**
1.122 - * external interrupt handling
1.123 - * used by second-level interrupt controllers at Variant level
1.124 - */
1.125 - virtual TInt InterruptBind(TInt anId, TIsr anIsr, TAny* aPtr)=0;
1.126 - virtual TInt InterruptUnbind(TInt anId)=0;
1.127 - virtual TInt InterruptEnable(TInt anId)=0;
1.128 - virtual TInt InterruptDisable(TInt anId)=0;
1.129 - virtual TInt InterruptClear(TInt anId)=0;
1.130 -
1.131 - /**
1.132 - * USB client controller - Some example functions for the case that USB cable detection and
1.133 - * UDC connect/disconnect functionality are part of the Variant.
1.134 - * Pure virtual functions called by the USB PSL, to be implemented by the Variant (derived class).
1.135 - * If this functionality is part of the ASSP then these functions can be removed and calls to them
1.136 - * in the PSL (./pa_usbc.cpp) replaced by the appropriate internal operations.
1.137 - */
1.138 - virtual TBool UsbClientConnectorDetectable()=0;
1.139 - virtual TBool UsbClientConnectorInserted()=0;
1.140 - virtual TInt RegisterUsbClientConnectorCallback(TInt (*aCallback)(TAny*), TAny* aPtr)=0;
1.141 - virtual void UnregisterUsbClientConnectorCallback()=0;
1.142 - virtual TBool UsbSoftwareConnectable()=0;
1.143 - virtual TInt UsbConnect()=0;
1.144 - virtual TInt UsbDisconnect()=0;
1.145 -
1.146 - /**
1.147 - * miscellaneous
1.148 - */
1.149 - virtual TInt VideoRamSize()=0;
1.150 -
1.151 -public:
1.152 - static TemplateAssp* Variant;
1.153 - static TPhysAddr VideoRamPhys;
1.154 - NTimerQ* iTimerQ;
1.155 - };
1.156 -
1.157 -#endif