The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.   United States  United States   


Datasheet Search Engine   
 
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)


  Datasheet Home \ Datasheet Details

Driver, Power Supply, Termination, Volume Control, Buffer, PCMCIA, Memory, LCD

Download

PDF Abstract Text:

Hitachi Confidential


SH7709 WindowsCE Reference Platform (PFM-DS3) Application Notes (Temporary Version) (Software volume)

Hitachi Confidential
SH7709 WindowsCE Reference Platform (PFM-DS3) Application Notes (Temporary Version) (Software volume)
Hitachi Confidential
Contents 1 PREFACE
3 TOUCH PANEL 3.1. PREFACE
3.1.1. Outline 3.1.2. Target Environment
3.2. DEVICE DRIVER INTERFACE (DDI) SPECIFICATIONS
3.2.1. Driver Name 3.2.2. Module Definition 3.2.3. Function Prototype
3.3. OPERATING SPECIFICATIONS
3.3.1. Calibration 3.3.2. Acquiring Coordinates 3.3.3. Coordinate Acquisition Procedure 3.3.4. Pen-up and Pen-down Processing 3.3.5. Interrupt Processing
3.4. DEVICE DRIVER SERVICE PROVIDER INTERFACE (DDSI) SPECIFICATIONS
3.4.1. Interface Data Specifications 3.4.2. Interface Function Specifications 3.4.3. Interface function call relationships 3.4.4. Cross Reference between Interface Data and Interface Function
3.5. PLATFORM DEPENDENT DEVICE (PDD) SPECIFICATIONS
3.5.1. Global Variable 3.5.2. Cross Reference between Global Variables and Functions 3.5.3. Function process flowchart
4.1.1. Outline 4.1.2. Target Environment
4.2. DEVICE DRIVER INTERFACE (DDI) SPECIFICATIONS
4.2.1. Driver Name 4.2.2. Module Definition 4.2.3. Function Prototype 4.2.4. Contents of the Registry
4.3. OPERATING SPECIFICATIONS
4.3.1. Key Scanning 4.3.2. Interrupts 4.3.3. Hardware Initialization 4.3.4. Power Supply Recovery and Termination
4.4. DEVICE DRIVER SERVICE-PROVIDER INTERFACE (DDSI) SPECIFICATIONS
4.4.1. Interface Data Specifications
Hitachi Confidential 4.4.2. Interface Function Specifications 4.4.3. Interface function call relationships 4.4.4. Interface data interface function cross reference
4.5. PDD PLATFORM DEPENDENT DEVICE DRIVER
4.5.1. Global parameter 4.5.2. Global parameter function cross reference 4.5.3. Function processing flowchart
SPECIFICATIONS
5 SOUND DRIVER 5.1. PREFACE
5.1.1. Outline 5.1.2. Target Environment
5.2. DEVICE DRIVER INTERFACE (DDI) SPECIFICATIONS
5.2.1. Driver Name 5.2.2. Module Definition 5.2.3. Function Prototype 5.2.4. Contents of the Registry
5.3. OPERATING SPECIFICATIONS
5.3.1. Continuous Playback Operation 5.3.2. Playback Mode 5.3.3. Recording Mode 5.3.4. Hardware Initialization 5.3.5. Header Analysis 5.3.6. WAVE File Support 5.3.7. Turn On and Off Power 5.3.8. Output Volume Control
5.4. DEVICE DRIVER SERVICE-PROVIDER INTERFACE (DDSI) SPECIFICATIONS
5.4.1. Interface Data Specifications 5.4.2. Interface Function Specifications 5.4.3. Function call for interface / peripheral
5.5. PLATFORM DEPENDENT DEVICE DRIVER (PDD) SPECIFICATIONS
5.5.1. Global Variables 5.5.2. Cross Reference between Global Variables and Functions 5.5.3. DMA Buffer 5.5.4. DMA Driven Sampling Frequency 5.5.5. Function processing flowchart
6 SERIAL DRIVER 6.1. PREFACE
6.1.1. Outline 6.1.2. Target Environment
6.2. SERIAL DDI (DEVICE DRIVER INTERFACE) SPECIFICATIONS
6.2.1. Driver Name 6.2.2. Module Definition 6.2.3. Function Prototype
6.3. OPERATING SPECIFICATIONS
6.3.1. Windows CE Serial Communications API
Hitachi Confidential 6.3.2. Function of the Serial Driver 6.3.3. Device Driver Initialization 6.3.4. Interrupt Processing 6.3.5. Reading Data (Receive data) 6.3.6. Writing Data (Transmit data) 6.3.7. Device Control
6.4. SERIAL DDSI (DRIVER DEVICE DRIVER SERVICE-PROVIDER INTERFACE) SPECIFICATIONS
6.4.1. Interface Function Specifications 6.4.2. Interface function call relationships 6.4.3. Specifications of Hardware Information (PDD Common Information) Specifications and Cross Reference 6.4.4. Function process flowchart
7 PCMCIA DRIVER 7.1. PREFACES
7.1.1. Outline 7.1.2. PCMCIA Driver Supported Card
7.2. DEVICE DRIVER INTERFACE (DDI) SPECIFICATIONS
7.2.1. Driver Name 7.2.2. Module Definition 7.2.3. Function Prototype
7.3. OPERATING SPECIFICATIONS
7.3.1. Hardware Configuration 7.3.2. Memory Window Structure 7.3.3. Hardware Initialization 7.3.4. Interrupt Processing 7.3.5. Interface Function Specifications
7.4. PLATFORM-DEPENDENT DEVICE DRIVER (PDD) SPECIFICATIONS
7.4.1. Relationship between Interface Functions 7.4.2. Global Variables 7.4.3. Cross Reference between Global Variables and Functions 7.4.4. Flowchart of Function Processing
8 LCD 8.1. PREFACE
8.1.1. Outline 8.1.2. Target Environment
8.2. OPERATING SPECIFICATIONS
8.2.1. Display Operation
8.3. PLATFORM-DEPENDENT DEVICE DRIVER (PDD) SPECIFICATIONS
8.3.1. Class 8.3.2. Working Area Used 8.3.3. Function process flowchart
9 KERNEL 9.1. PREFACE
9.1.1. Outline 9.1.2. Target Environment
9.2. CFW.C
9.2.1. OEMInit() 9.2.2. OEMInterruptEnable()
Hitachi Confidential 9.2.3. OEMInterruptDisable() 9.2.4. OEMInterruptDone() 9.2.5. InitClockFreq()
9.3. INTERRUPT SERVICE ROUTINE(ISR)
9.3.1. fw.src 9.3.2. ccISR.src 9.3.3. dmaISR.src 9.3.4. kbdISR.src 9.3.5. tchISRs.src 9.3.6. halasm.src 9.3.7. ISR Flowchart
Hitachi Confidential
Preface
This document describe about routine for kernel interrupt processing and each driver s source program for CP09. About drivers, their names and functions are listed below
Fig1.1 Driver
Drivers for CP09 name Touch.dll Audio.dll PCMCIA.dll Serial.dll Keybddr.dll ddi.dl Description Touch-panel input Wave files input / output Handling PCMCIA card Serial port Keyboard input LCD display
Touch-Panel Sound PCMCIA Serial Keyboard LCD
Hitachi Confidential
PlatForm
Drivers
Display
2Bpp Color
Keybd
Pdd sctovk
PCMCIA Serial Builddll ccir scif touchp Wavedev Inc Kernel hal shx
Fig1.2
Directory Structure
Hitachi Confidential
Preface
Outline
The touch panel driver acquires the coordinates at specified locations and sends the data to the Microsoft® Windows® CE OS. The following describes the details of the operating and function specifications of the touch panel driver.
Target Environment
Table 3.1 shows the target environment.
Table 3.1 Target Environment
# Platform Function OAK version 1 CP09 touch-panel input 1.0 -1.01 Note
Hitachi Confidential
Device Driver Interface (DDI) Specifications
Driver Name
Module Definition
Table 3.2 List of Definitions of Modules to be Exported and their Functions
Module (Function) Definition TouchPanelGetDeviceCaps Description Attain physical specifications of the touch panel
TouchPanelEnable TouchPanelDisable TouchPanelSetMode TouchPanelReadCalibrationPoint TouchPanelReadCalibrationAbort TouchPanelSetCalibration TouchPanelCalibrateAPoint TouchPanelPowerHandler
Validates the touch panel Void the touch panel Set the mode of the touch panel Acquire coordinates at calibration Terminate calibration Calculate the coordinates after calibration Convert the result of calibration Power control
Hitachi Confidential
Function Prototype
As shown in section 3.2, the DDI differs widely depending on the version of the OAK. Therefore, a description will be given for each DDI. For details, refer to the online document OAK API Reference and Win32 Programmers Reference. Driver entry point BOOL DllEntry( HINSTANCE DllInstance, / / instance handle for driver DLL INT Reason, LPVOID Reserved ) Driver export BOOL TouchPanelGetDeviceCaps( INT LPVOID ) iIndex, / / kind of device specifications attained / / reason of function call / / reserved
lpOutput / / acquisition source
VOID TouchPanelDisable( VOID )
BOOL TouchPanelSetMode( INT LPVOID ) iIndex, lpInput / / configured mode type / / setting information
BOOL TouchPanelReadCalibrationPoint( INT INT ) pRawX, pRawY / / X coordinate / / Y coordinate
VOID TouchPanelReadCalibrationAbort( VOID )
Hitachi Confidential
BOOL TouchPanelSetCalibration( INT32 INT32 INT32 INT32 INT32 ) cCalibrationPoints, / / number of calibration points pScreenXBuffer, / / indicated X coordinate list pScreenYBuffer, pUncalXBuffer, pUncalYBuffer / / indicated Y coordinate list / / attained X coordinate list / / attained Y coordinate list
void TouchPanelCalibrateAPoint( INT32 INT32 INT32 INT32 ) UncalX, UncalY, pCalX, pCalY / / uncalibrated X coordinate / / uncalibrated Y coordinate / / calibrated X coordinate / / calibrated Y coordinate
void TouchPanelPowerHandler( BOOL bOff )
Hitachi Confidential
Operating Specifications
Pen-up and Pen-down Processing
Pen-up and pen-down processing, and coordinate acquisition are controlled through the DdsiTouchPanelPointGet function. In this process, the acquired coordinates (X, Y) (hereafter called the current coordinates) and the previously acquired coordinates (X, Y) are stored. The current coordinates are used as an interface variable between the MDD and the touch panel driver and the touch panel driver provides the coordinates to the MDD by storing the current coordinates in the variable. The previously acquired coordinates (hereafter called the previous coordinates) are stored in a static variable declared in the DdsiTouchPanelPointGet function and can be used only in the DdsiTouchPanelPointGet function.
Hitachi Confidential
There are three types of processing in the DdsiTouchPanelPointGet function.
1) Pen-down processing 2) Pen-up processing 3) Coordinate acquisition processing
Refer to table 3.3 for the contents of each process.
Interrupt Processing
Hitachi Confidential
Device Driver Service Provider Interface (DDSI) Specifications
This section describes the interface between MDD and PDD. This section must be understood thoroughly if the driver has a two-layer driver structure as is in the OAK sample source code.
Interface Data Specifications
The interface data does not have a structure type. Data transferred to and from the MDD and PDD includes a flag variable that validates or invalidates the acquired coordinates (X, Y) and the variable to store the coordinates (X, Y).
Interface Function Specifications
Interface function BOOL DdsiTouchPanelGetDeviceCaps( INT LPVOID ) iIndex, lpOutput / / kind of requested process / / address of structure for conclusion storage / / set calibration
BOOL DdsiTouchPanelSetMode( INT LPVOID ) iIndex, lpInput / / set device information / / kind of requested process
BOOL DdsiTouchPanelEnable( void ) / / attain and initialize of work area
void DdsiTouchPanelDisable( void ) / / purge work area, powerdown control
pUncalX,
pUncalY / / Y coordinate / / acquire X, Y coordinates
Hitachi Confidential
Interface function call relationships
Fig.3.4 describes interface function call relationships.
P hieralchy Fig.3.4 Interface call relationships and moduled d T o u c h P a n e l G
etSam p les
Hitachi Confidential
Cross Reference between Interface Data and Interface Function
Table 3.5 shows the cross reference between the DDSI interface data and functions. Refer to section 3.5.3, Outline of Function Processing Flow, for the cross reference of functions and their operations,
Table 3.5 Cross Reference between the DDSI Interface Data and Functions
SampleFlags(pTipStateFlags) description
data word in parenthesis is a name in PDD
RawX(pUncalX)
RawY(pUncalY)
TouchPanelpDetach TouchPanelpAttach TouchPanelISR TouchPanelDllEntry TouchPanelGetDeviceCaps TouchPanelSetMode TouchPanelPowerHandler TouchPanelEnable TouchPanelDisable TouchPanelReadCalibrationPoint TouchPanelReadCalibrationAbort R R R R R
DdsiTouchPanelGetDeviceCaps DdsiTouchPanelSetMode DdsiTouchPanelEnable DdsiTouchPanelDisable DdsiTouchPanelAttach DdsiTouchPanelGetPoint DdsiTouchPanelPowerHandler R R R R R
I initialize W setting R reference U update
lpInput(lpInput)
iIndex(iIndex)
Hitachi Confidential
Platform Dependent Device (PDD) Specifications
This section describes the internal specifications of the Windows CE touch panel.
Global Variable
The PDD uses the following variables. It is important to understand the variables in order to understand the PDD. Tables 3.6 lists the variables.
Table 3.6 Global Variables of the PDD
area address for coordinate sampling
SampleFlags
control flag for coordinate sampling
Cross Reference between Global Variables and Functions
Table 3.7 shows a cross reference between the PDD global variables and functions.
Table 3.7 Cross Reference between the PDD Global Variables and Functions
parameter
function PddTouchPanelDeallocateVm PddTouchPanelGetSamples PddTouchPanelEvaluateSamples PddSetupPenDownIntr TouchDriverCalibrationPointGet I initialize W setting R reference U update
SampleFlags
Hitachi Confidential
Function process flowchart
PddTouchPenDeallocateVm
Purge gpLEDs area Purge gpIORegs area Purge gpArea1IntCtrlRegs area Purge gpArea7IntCtrlRegs area
Hitachi Confidential
PddpTouchPanelGetSamples
Set devDrvPointer
Copy attained X / Y coorddinates to work area for coordinate calculation
Hitachi Confidential
PddpTouchPanelEvaluateSamples
Hitachi Confidential
TouchDriverCalibrationPointGet
Set calibration points
Hitachi Confidential
DdsiTouchPanelGetDeviceCaps
Hitachi Confidential
DdsiTouchPanelSetMode
Hitachi Confidential
DdsiTouchPanelEnable
Attain gpLEDs area Attain gpIORegs area Attain gpArea1IntCtrlRegs area Attain gpArea7IntCtrlRegs area Attain gpTouchSample area
DdsiTouchPanelPowerHandler()
Hitachi Confidential
DdsiTouchPanelGetPoint
PddpTouchPanelEvaluateSamples() Calculate coordinates
Keyboard Driver
4.1.Preface
4.1.1.Outline The keyboard driver manages the data input from the keyboard. The keyboard driver directly accesses the hardware and provides an interface that does not depend on the hardware for the Microsoft® Windows® CE OS and the Windows CE applications. The function of the highest-layer interface of the keyboard driver is as follows. This manual describes the details of the operating and function specifications of the keyboard driver.
4.1.2.Target Environment Table 4.1 shows the target environment.
Table 4.1 Target Environment
# Platform Function OAK version 1 CP09 Keyboard inputs 1.0 1.01 Note
Device Driver Interface (DDI) Specifications
This section describes how the keyboard driver matches the remaining operating system. This section does not have to be understood thoroughly if the driver has a two-layer driver structure as is in the OAK sample source code. If a single-layer driver is developed, this section must be understood thoroughly.
Table 4.2 List of Definitions of the Modules to be Exported and their Functions
Module (Function) Definition KeybdDriverInitialize KeybdDriverVKeyToUnicode KeybdDriverPowerHandler KeybdDriverGetInfo KeybdDriverInitStates KeybdDriverSetMode Description Initializes the keyboard driver Converts a virtual key to UNICODE Turns on and off the power Acquires driver information Initializes the key state Sets the mode
Function Prototype
As shown in section 4.2, the DDI differs widely depending on the version of the OAK. Therefore, a description will be given for each OAK version. For details, refer to the online document OAK API Reference and Win32 Programmers Reference.
KeyState, / / key state array pKeybdDriverToUnicodeState, cBufferSize, pcCharacters, pShiftStateBuffer, / / pointer for shift key state buffer / /
/ / UNICODE conversion buffer size / / pointer for number of character
UINT32 )
pCharacterBuffer / / pointer for character buffer
void KeybdDriverPowerHandler( BOOL bOff / / switch for power shutdown / recover / / TRUE when power is OFF / / FALSE when power is ON )
BOOL KeybdDriverGetInfo( INT INT iKeybdId, / / keyboard ID not in use iIndex, / / acquired information index ID
lpOutput / / pointer for acquired information buffer
/ / pointer for setting information
Registry is not required in the sound driver, so it is not used
Operating Specifications
This section explains the characteristics of the Windows CE keyboard driver.
Key Scanning
The keyboard driver determines which keys are pressed in the 8 x 13 key matrixby scanning all of the keys in the key matrix. It acquires the state of one line with eight keys, then repeats this for the remaining 12 lines. 4.3.2. Interrupts The keyboard driver has two types of interrupt.
(1) Generating an Interrupt by Pressing a Key PINT is used as an interrupt generated by pressing a key, and is generated when a key is pressed. After a PINT is generated, the keyboard driver initiates the key scan timer to scan the keys at specified intervals. This is the key interrupt processing.
(2) Generating an Interrupt to Scan the Keys with the Key Scan Timer Key scan timer interrupt processing means the keys are scanned at specified intervals. TMU0 is used as the key scan timer interrupt. After the key scan timer is initiated by the key interrupt processing, TMU0 is generated every time the specified time has passed. By generating TMU0 with a specified timing, key scanning is performed at the specified intervals. This is the key scanning timer interrupt processing.
Hardware Initialization
The keyboard driver initializes the hardware by calling the initialization routine in the entry function of the keyboard driver. The OS does not call the initialization routine of the keyboard driver in the OS program description.
Power Supply Recovery and Termination
When the power supply of the the Windows CE system is turned off, the device manager calls the power supply termination module function, and when the power supply is turned on, it calls the power supply recovery module. However, the keyboard driver does not have to call any modules. Therefore, the keyboard driver modules initiated by modules called by the device manager are ignored.
Device Driver Service-Provider Interface (DDSI) Specifications
This section describes the interface between the MDD and PDD. This section must be understood thoroughly if the driver has a two-layer driver structure as is in the OAK sample source code. If a single layer driver is developed, this section will be useful but does not have to be understood thoroughly.
Interface Data Specifications
Name VirtualKeys 16 KeyEvents16 UINT32
Description store acquired virtual key store acquired state of virtual key
Interface Function Specifications
Interface function
BOOL KeybdDriverInitializeAddresses( void ) / / attain / map register address map for keyscan
/ / scan every keys, acquire state of each keys.
/ / TRUE when power is ON, FALSE when power is off. ) / / execute no process
INLINE UINT GetSenseLine( UINT nScanState ) / / status for scanning / / execute scannning
INLINE void EnablePowerUp( void ) / / power control
INLINE void StopTimer( void ) / / timerstop for companion chip
INLINE void StartTimer( UINT16 ) nTimerCount / / wait time
/ / timerstart for next keyscan
Interface function call relationships
DllEntry
KeybdDriverInitialize
KeybdDriverThread
KeybdDriverInitializeAddress
KeybdSendKeyDownToUser
KeybdSendKeyUpToUser
KeybdDriverVKeyToUnicode
AllKeyScan
KeybdDriverKeyStateToShiftFlag
GetCsr
VKeyToUnicode
KeybdDriverPowerHandler
KeybdDriverGetInfo
KeybdDriverInitStates
Interfacenote fanction
Int. Func.
KeybdDriverSetMode Fig.4.1 Interface calling relationships and module hierarchy
Interface data interface function cross reference
Figure 4.1 shows DDS interface data and function reference. About function names and its descreptions related with this, see Fig.4.1. Fig.4.1 DDS Iinterface data and function cross-reference Note
VirtualKeys 16 I R I
Function MDD DllEntry KeybdDriverInitialize KeybdDriverThread
KeyEvents 16
Int.funct.
R Int.funct. Int.funct. R
Int.funct. W W
PDD Platform Dependent Device Driver specifications
This chapter describes about points with internal specifications of keyboard PDD on reference platform. 4.5.1.Global parameter Several global parameters are used in the PDD. Figure 5.1 lists these global parameters for more understanding of PDD.
ScanCodeToVKeyTable213 UINT32 8
Global parameter function cross reference
Fig.5.2 lists PDD global parameter and function cross-reference.
Fig.5.2 PDD global parameter and function cross-reference ScanCodeToVKeyTable2138 Note
MatrixToScanCode18
Parameter
Function
Function processing flowchart
KeybdDriverInitializeAddresses() Initialize register address map for keyscan
(pfnKeybdEventCallback) () key event callback
Timer setting
KeybdDriverInitializeAddresses
Allocate register for keyscan to access logical area on user mode VirtualAlloc()
Mapping register for keyscan to access logical area on user mode VirtualCopy()
AllKeyScan () Scan all keys
GetCsr () Obtain keycode and key status
Number of all keys
Obtain key event and virtual YES key is pushed key
Shutdown process
InitializePrevSenseArray
EnableSenseAll
Validate keyscan process
DisableSenseAll
Void keyscan process
GetSenseLine
Attain column to scan
EnablePowerUp
Validate PINT interrupt
StopTimer
StartTimer
ScanKeyboardCodeToVirtualKey
Return 0
return key content
Sound Driver
5.1.Preface
The following describes the details of the operating and function specifications of the sound driver.
5.1.2.Target Environment Table 5.1 shows the target environment.
Table 5.1 Target Evironment
Platform CP09 Function Plays back WAVE file OAK Version 1.0 - 1.01 Notes
Device Driver Interface (DDI) Specifications
5.2.3. Function Prototype As shown in section 5.2.2, the DDI differs widely depending on the version of the OAK. Therefore, a description will be given for each DDI. For details, refer to the online document OAK API Reference and Win32 Programmers Reference.
/ / RegisterDevice information
DWORD PBYTE DWORD PBYTE DWORD PDWORD )
dwCode, / / I / O control code pBufIn, / / address of input data dwLenIn, / / size of input data pBufOut, / / address of return value dwLenOut, / / size of return value pdwActualOut / / (not in use)
5.2.4. Contents of the Registry No registry is required in the sound driver, so none is used.
Operating Specifications
This section explains the characteristics of the Windows CE touch panel driver. As described above, the sound driver plays back the WAVE file on the physical device or reads WAVE data from the physical device. In this section, the former is called the playback mode and the latter the recording mode. Note: In the following description, playback module when written as playback module will mean the DDI function AudioPlaySound of the driver for OAK version 1.01 and earlier versions.
5.3.1. Continuous Playback Operation Once the WAVE file is played back, the sound driver must guarantee the completion of the operation without any interruptions.
Requirements for the MDD Level Design When a request is made to play back a WAVE file while another WAVE file is being played, the Critical Section Object, which is a type of OS thread synchronous support function prevents a play-back module being called by a new request until the resource becomes available. The resource mentioned here belongs to one process and is shared exclusively by different thread groups that correspond to the playback requests made. For details on the Critical Section Object, refer to the online manual Windows CE Programmer s Guide. Section 5.3.2 also describes playback operation without interruption. Required Conditions for the PDD Level Design If the DMA buffer is used, it is recommended that the sound driver thread be executed at a high priority, and the output DMA buffer must be large enough to avoid playback termination due to task switching.
5.3.2.Playback Mode The sound driver has a normal playback mode and a loop playback mode. The mode name in this section is an example, so the driver itself does not have a simple and clear playback operation flag definition. Table 5.3 shows the mode specification.
Table 5.3 Mode Specification when Calling the Playback Module
Table 5.4 Flags Related to Playback Mode and the Meaning of Each Flag
If an application specifies synchronous playback when playing back a DATA file, the user must confirm the
5.3.3.Recording Mode The recording mode uses the Analog Front End (AFE) interface and the following algorithm to record data. 1) Start reading WAVE data Turns on the data receive bit of the ASTR register, and enables reading of data. 2) Read WAVE data Stores the data in a 96-byte buffer area starting from the ARXDBR register . 3) Terminates reading of WAVE data Turns off the data receive bit of the ASTR register, and stops reading data. 5.3.4.Hardware Initialization The sound driver initializes the hardware by calling the initialization routine in the entry function in the sound driver. The OS does not call the initialization routine in the sound driver in its program description.
Table 5.5 Minimum Settings of the WAVE Format Type that the Windows CE System will Support
sample rate 11.025 kHz bits per sample 8 16 22.050 kHz 8 16 44.100 kHz 8 16 channel monoral stereo monoral stereo monoral stereo monoral stereo monoral stereo monoral stereo Minimum set requirements for Windows CE required optional required optional required optional required optional optional optional optional optional
In the recording mode, WAVE data in the format of table 5.6 can be read.
Table 5.6 Format of the WAVE that are readable
Sample rate 11.025 kHz Bits per sample 8 16 22.050 kHz 8 16 44.100 kHz 8 16 Channel monoral stereo monoral stereo monoral stereo monoral stereo monoral stereo monoral stereo
5.3.7.Turn On and Off Power
When the Windows CE system is turned off, the device manager calls the power-off module, and when turned on, calls the power-on module. When the system is turned off, only the hardware device is turned off, and the sound driver does not release the allocated memory resource. When the power supply is turned on, however, the sound driver does not resume and releases the resource by aborting the play-back processing. This enables the driver to quickly enter a wait state for processing.
Table 5.7 Software Volume Control Method used by the OAK Sample Driver and the Reference Platform Driver
Device Driver Service-Provider Interface (DDSI) Specifications
This section describes the interface between the MDD and PDD. This section must be thoroughly understood if the driver has a two-layer driver structure as in the OAK sample source code. If a single-layer driver is developed, this section will be useful but does not have to be understood thoroughly.
Audio Device State Detection Contents
wMid wPid vDriverVersion szPname dwFormats wChannels wReserved1 dwSupport manufacturer ID product ID driver version product name(has NULL character in the end) Formats supported Number of sources supported reserved Functionality supported by driver
Name wFormatTag nChannels nSamplesPerSec nAvgBytesPerSec nBlockAlign wBitsPerSample cbSize Description format type channel(monoral or stereo) sample rate For buffer estimation size of data block sample number of monoral data per bit length of data followed cbSize
dwFormats
formats supported
5.4.3.Function call for interface / peripheral DDI DDS1 PDD
GetVirtualAddressOfUncached Memory
FreeAllocateVirtualMemory
MarkAllAsNotInLoop
MarkAllAsDone
SatrtCMT
Call relationship of interface and module level
MarkAllAsNotInLoop
Call relationship of interface and module level (Continue)
The description of section 5 is described in table 5.9, showing the cross reference between the DDSI interface data and functions. Refer to figure 5.1 for the cross reference of functions and their operations. Table 5.9 Cross Reference between DDSI Interface and Function
function
nAvgBytesPerSec
wBitsPerSample
nSamplesPerSec
wMid wPid vDriverVersion
nBlockAlign
wFormatTag
dwFormats
wChannels
dwSupport
nChannels
dwLoops
szPname
dwFlags I
dwUser
lpNext Int.funct. Int.funct. R R R Int.funct. Int.funct. Int.funct.
cbSize
lpData
MarkFullAsDone InitGSI
Int.funct. Int.funct.
Platform Dependent Device Driver (PDD) Specifications
This section describes the major internal specifications of the the reference platform keyboard PDD. 5.5.1.Global Variables The PDD uses the following global variables. It is important to understand the variables in order to understand the PDD. Tables 5.1 lists the variables. Table 5.10 Global Variables of PDD
5.5.2.Cross Reference between Global Variables and Functions Table 5.11 shows the cross reference between the PDD global variables and functions. Table 5.11 Cross Reference between the PDD Global Variables and Functions
pIRR1, pIPRE, pDACR, pDMAOR, pDAR2, pCHCR2, pCMSTR, pCMCSR, PcmcnT
pSAR2, pDMATCR2, pCMCOR
Function
pAudioPlayingAddress
pAudioOutInterrupt
pDrvGlobalBase
pRegisterBase
clockRate
Function processing flowchart
(uMsg , dwParam1 , dwParam2 )
(apidir , pCaps , wSize)
(apidir, dwCode , dwParam1, dwParam2)
FreeAllocatedVirtualMemory
(virtualAddress)
Open area VirtualFree()
GetVirtualAddressOfUncachedMemory
(physicalAddress , size, callerID)
Get area VirtualAlloc() VirtualCopy() FreeAllocatedVirtualMemory()
Switch on RERR bit of ASTR
Switch on RDF bit of ASTR
Setting the delay counter AdjustMicroSecondsToLoopCount()
(bPowerDown , bInKernel)
Setting ACTR and SCPDR
Setting SCPCR, SCPDR, ACTR and ATXDR
Setting ASTR
Read and set ASTR
Switch on RE bit REIR bit RXIR bit of ACTR
Take out a sample from AFE
Buffer size Input size Buffer size
Setting Pwh to next point
Get sample from WAVEHDR
Switch off RDF bit of ASTR
8bit monoral
8bit stereo
16bit monoral
16bit stereo
Setting ACTR to 0
Illegal data
Setting 8 / 16bit monoral / stereo
ResetAudioOutInterrupt()
AudioPlayingAddress()
Setting register Setting pAudioPlayingAddress and pAudioOutInterrupt
Setting the volume
ResetAudioOutInterrupt()
bPowerDown
End the set-up register DisableDMA2() ClearDMA2Interrupt() DisableDA0()
Start CMT StartCMT()
Initialize audio interrupt flagAudio ResetAudioOutInterrupt()
Setting the volume
No data
Input the silent data
Buffer size
Setting a sample
WriteAudioPlayingAddress()
Transfer the first buffer WriteSAR2() WriteDMATCR2() ClearDMA2Interrupt()
Start the play back of the first buffer StartDMA2Transfer()
WriteAudioPlayingAddress()
Stop CMT StopCMT()
DisableDMA2() ClearDMA2Interrupt() StopCMT()
(pFormat , fQueryFormatOnly)
Check the wave format
Format
OK Setting 8 / 16bit, monoral / stereo
Return the volume information
Setting the volume information
Hitachi Confidential
PCMCIA Driver Prefaces
7.1.1.Outline The PCMCIA driver uses the SH7709 on-chip PCMCIA controller as the interface between it and the card. The PCMCIA driver directly accesses the hardware and provides an interface that does not depend on the Microsoft® Windows® CE OS or Windows CE applications. The following describes the details of the operating and function specifications of the PCMCIA driver. 7.1.2. PCMCIA Driver Supported Card The PCMCIA driver supports only the following SRAM card. Manufacturer: Hitachi Maxell Card type: SRAM card (2MB) Product type name: ML-2M-TB4N
Hitachi Confidential
Device Driver Interface (DDI) Specifications
Module(function)definition name CallbackThread CardDeregisterClient CardRegisterClient CardGetStatus CardRequestConfiguration CardSystemPower CardAccessConfigurationRegister CardModifyWindow CardMapWindow Callback of each event Unregister card Register card Get socket status Configure card interface / power supply voltage Turn ON / OFF card power supply Read / write attribute memory on card Modify attribute for memory window Allocate memory window Description
Hitachi Confidential 7.2.3. Function Prototype As shown in section 7.2, the DDI differs widely depending on the version of the OAK. For details, refer to the online document OAK API Reference and Win32 Programmers Reference.
Driver Entry Point BOOL DllEntry( HINSTANCE DllInstance, INT Reason, LPVOID Reserved )
/ / Instance handle fordriver DLL / / Reason of function call / / Reserved, not in use.
Hitachi Confidential
Operating Specifications
This section describes the PCMCIA driver software and hardware.
7.3.1. Hardware Configuration Figure 7.2 shows the PCMCIA interface. Since the buffer and the card use the same power supply, the power supply of the buffer is turned on even when the PCMCIA driver is waiting for the card to be inserted. Buffer Card Slot
Figure 2 PCMCIA Interface
7.3.2. Memory Window Structure The SH7709 on-chip PCMCIA controller uses areas 5 and 6. The PCMCIA controller area mode is specified in the Continuous 32-MB Area Mode. In this case, the address space is fixed in the SH7709 specifications (see figure 7.3). The user can define the window freely within this address space. Figure 7.4 shows the five memory maps defined in this driver.
Attribute memory 16MB
figure 7.3 PCMCIA address space
Hitachi Confidential
H 14000000 H 15000000 H 18000000 H 19000000 H 1A000000
Window0 Attribute(8bit / 16bit width) Window2 Common(8bit / 16bit width) Window1 Attribute(8bit / 16bit width) Window3 Common(8bit / 16bit width) Window4 I / O(8bit / 16bit width)
Figure 7.4 Window Memory Map
/ / Pointer for adapter status
/ / Window number / / Pointer for window state structure.
Hitachi Confidential
Platform-dependent Device Driver (PDD) Specifications
This section describes the PDD in the PCMCIA. 7.4.1.Relationship between Interface Functions
DDI MDD DDSI PDD
InitCardSvc
CallbackThread
P cm cia P ow e r O n PDCardGetSocket P c m c i a P o w e r O ff PDCardSetSocket CreateDeviceID PDCardGetAdapter CardDeregisterClient PDCardSetAdapter CardReleaseConfiguration CardReleaseIRQ C a r d R e l e a s e W in d o w PDCardReadCmnByte
PDCardReadAttrByte CardGetStatus P D C a r d W r iteAttrByte CardRegisterClient
StatusChangeThread C a r d R y s tueem t C o nef r g u r a t i o n S eq sPow i
CardSystemPower CardAccessConfigurationRegister
C a r d Interface n d o w Fig.7.5 M o d i f y W i calling relationships and module hieralchy C a r d M a p W in d o w
Hitachi Confidential 7.4.2.Global Variables The global variables used in the PDD are listed in table 7.6. Table 7.6 Global Variables Used in the PDD
struct
gPddSocketCrit gPddWindowCrit gPddMemoryCrit gPddPowerCrit pPcmciaBase pGPIOBase pDriverGlobals pControlRegs
Critical section for FDD reentrant
Store header address of mapping area for register control
Hitachi Confidential 7.4.3. Cross Reference between Global Variables and Functions Table 7.7 shows the cross reference between the PDD and global variables. Table 7.7 Cross Reference between PDD and Global Functions
note PowerSettingsA44 parameter PowerSettings 44
PcmciaRegisters
gPddWindowCrit
gPddMemoryCrit
gPddSocketCrit
pDriverGlobals I W
gPddPowerCrit
PDCardInitServices PDCardInquireWindow PDCardGetWindow PDCardSetWindow PDCardReadCmnByte PDCardReadAttrByte PDCardWriteAttrByte PDCardInquireAdapter PDCardGetAdapter PDCardSetAdapter PDCardResetSocket PDCardGetSocket PDCardSetSocket SetPower
pGPIOBase
function
pControlRegs I Int.fun ct.
I initialize W configuration R reference U update
pPcmciaBase
Hitachi Confidential 7.4.4. Flowchart of Function Processing
PDCardInitServices
Memory allocation and mapping for PDMCIA register to access user-mode logical space VirtualAlloc() VirtualCopy()
Initialize global parameter
PCMCIA reset
Setting PCMCIA controller operation mode
Hitachi Confidential
PDCardReadCmnByte
Read 1byte from common memory
PDCardReadAttrByte
Read 1byte from attribute memory
PDCardWriteAttrByte
Write 1byte to attribute memory
Hitachi Confidential
PDCardGetWindow
Hitachi Confidential
PDCardSetWindow
status, access
speed, address
offset,
Hitachi Confidential
PDCardInquireWindow
Hitachi Confidential
Reset card
Hitachi Confidential
PDCardGetSocket
Hitachi Confidential
PDCardSetSocket
Hitachi Confidential
PDCardGetAdapter
Hitachi Confidential
PDCardSetAdapter
Power
Hitachi Confidential
PDCardInquireAdapter
Hitachi Confidential SetPower
Power supply setting Set power-supply relative register
Hitachi Confidential
LCD Preface
Outline
The LCD driver displays information transmitted to the Microsoft® Windows® CE OS on the LCD.
Target Environment
Table 8.1 shows the target environment.
Table 8.1 Target Environment.
# Platform Function OAK Version 1 CP09 LCD Display 1.0 - 1.01 Note
Operating Specifications
This section explains the characteristics of the Windows CE LCD driver.
Display Operation
This LCD driver allocates the following to the LCD. Table 8.2 Panel Display
Color display Display size(V H) Color depth 240640 256 colors W / B display 240640 2colors4gradation
Hitachi Confidential
Platform-dependent Device Driver (PDD) Specifications
This driver acquires the following four working areas. Table 8.3 Working Areas
Hitachi Confidential Function process flowchart
CE2Disp::CE2Disp
Getting work area VirtualAlloc() VirtualCopy()
CE2Disp::dspInitAttribute
(inModelTypes)
Setting register
Hitachi Confidential
CE2Disp::SetMode
(modelid , pPalette)
Power control PowerHandle()
Getting display area AllocSurface()
Setting palette SetPalette()
Hitachi Confidential
CE2Disp::ContrastControl
(cmd, pValue)
Setting the present status
Hitachi Confidential
CE2Disp::PowerHandle
(bOff)
Setting register dspInitAttribute()
Hitachi Confidential