0% found this document useful (0 votes)
154 views

DMSS Ui

Uploaded by

niku007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

DMSS Ui

Uploaded by

niku007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

DMSS User Interface

User Guide

80-V0280-1 X4
November 27, 2000

Restricted Distribution: This document contains


critical information about QUALCOMM products and
may not be distributed to anyone that is not an
employee of QUALCOMM without the approval of
Configuration Management.

QUALCOMM Incorporated
5775 Morehouse Dr.
San Diego, CA 92121-1714
U.S.A.
QUALCOMM Incorporated
5775 Morehouse Dr.
San Diego, CA 92121-1714
U.S.A.

Copyright © 1999, 2000 QUALCOMM Incorporated. All rights reserved.


Printed in the United States of America.

All data and information contained in or disclosed by this document is confidential and proprietary information of
QUALCOMM Incorporated, and all rights therein are expressly reserved. By accepting this material the recipient agrees
that this material and the information contained therein is held in confidence and in trust and will not be used, copied,
reproduced in whole or in part, nor its contents revealed in any manner to others without the express written permission
of QUALCOMM Incorporated.

Export of this technology may be controlled by the United States Government. Diversion contrary to U.S. law
prohibited.

Restricted Distribution: This document contains critical information about QUALCOMM products and may
not be distributed to anyone that is not an employee of QUALCOMM without the approval of Configuration
Management.

QUALCOMM is a registered trademark and registered service mark of QUALCOMM Incorporated. Other product and
brand names may be trademarks or registered trademarks of their respective owners.

Information in this document is preliminary and subject to change and does not represent a commitment on the part of
QUALCOMM Incorporated.

DMSS User Interface User Guide

80-V0280-1 X4

November 27, 2000

ii QUALCOMM Proprietary 80-V0280-1 X4


Contents

1 Introduction ....................................................................................... 1-1


1.1 Purpose................................................................................................................ 1-1
1.2 Scope................................................................................................................... 1-1
1.3 Organization........................................................................................................ 1-1
1.4 Conventions ........................................................................................................ 1-2
1.5 Revision history .................................................................................................. 1-2
1.6 Technical assistance............................................................................................ 1-2
1.7 Terms and definitions.......................................................................................... 1-2

2 Overview ............................................................................................ 2-1


2.1 Introduction......................................................................................................... 2-1
2.2 Overall phone architecture .................................................................................. 2-1
2.3 Tasks ................................................................................................................... 2-3
2.3.1 User interface (UI) task .......................................................................... 2-3
2.3.2 Handset (HS) task................................................................................... 2-3
2.3.2.1 Keypad ................................................................................... 2-4
2.3.2.2 Screen..................................................................................... 2-4
2.3.3 Watchdog task ........................................................................................ 2-5
2.3.4 Sound task .............................................................................................. 2-5
2.3.5 Non-volatile memory (NV) task............................................................. 2-5
2.3.6 Sleep task ............................................................................................... 2-6
2.3.7 Call Manager (CM) task......................................................................... 2-6
2.3.8 Short message services (SMS) task........................................................ 2-7
2.3.9 Embedded File System (EFS) task......................................................... 2-7
2.3.10 Position Determination Services Manager (PDSM) task ..................... 2-7
2.3.11 Bluetooth (BT) task.............................................................................. 2-8
2.3.12 Task priorities....................................................................................... 2-9
2.4 Services ............................................................................................................. 2-10
2.4.1 Clock services ...................................................................................... 2-10
2.4.2 Database services ................................................................................. 2-10
2.4.3 Battery services .................................................................................... 2-10
2.4.4 Device Mapper (devmap) Services ...................................................... 2-10

80-V0280-1 X4 QUALCOMM Proprietary iii


Contents DMSS User Interface

3 Design................................................................................................. 3-1
3.1 Introduction .........................................................................................................3-1
3.2 UI architecture .....................................................................................................3-1
3.3 File organization ..................................................................................................3-3
3.4 UI layers ..............................................................................................................3-6
3.4.1 Dispatcher layer (ui.c).............................................................................3-6
3.4.2 Handler layer ..........................................................................................3-7
3.4.2.1 Signal handler (uihsig.c) .........................................................3-7
3.4.2.2 Key handler (uihkey.c) ...........................................................3-8
3.4.2.3 Callback timer handler (uihcbt.c) ...........................................3-8
3.4.2.4 Command handler (uihcmd.c) ................................................3-9
3.4.3 State machine layer...............................................................................3-11
3.4.4 Events ...................................................................................................3-11
3.4.5 States.....................................................................................................3-13
3.4.5.1 Major states...........................................................................3-14
3.4.5.2 Minor states ..........................................................................3-15
3.4.6 Major state machine..............................................................................3-16
3.4.7 Minor state machines ............................................................................3-18
3.4.7.1 UI_OFF_S state machine (uisoff.c) ......................................3-18
3.4.7.2 UI_LOCKED_S state machine transitions ...........................3-18
3.4.7.3 UI_STARTUP_S state machine (uisstrt.c) ...........................3-18
3.4.7.4 UI_IDLE_S state machine (uisidle.c) ...................................3-19
3.4.7.5 UI_CODE_S state machine (uiscode.c)................................3-19
3.4.7.6 UI_CALL_S state machine (uiscall.c)..................................3-20
3.4.7.7 UI_CLI_S state machine (uiscli.c)........................................3-21
3.4.7.8 UI_MESSAGE_S state machine (uismsg.c).........................3-22
3.4.7.9 UI_INFO_S state machine (uisinfo.c) ..................................3-22
3.4.7.10 UI_RCL_S state machine (uisrcl.c) ....................................3-23
3.4.7.11 UI_STO_S state machine (uissto.c)....................................3-25
3.4.7.12 UI_MENU_S state machine (uismenu.c) ...........................3-26
3.4.7.13 UI_SERVICE_S state machine (uisserv.c).........................3-30
3.4.7.14 UI_MULTIMEDIA_S state machine (uismm.c) ................3-33
3.4.7.15 UI_NUMEDIT_S state machine (uisnum.c).......................3-34
3.4.7.16 UI_ALPHAEDIT_S state machine (uisalpha.c) .................3-34
3.4.7.17 UI_LIST_S state machine...................................................3-35
3.4.7.18 UI_HELP_S state machine (uishelp.c) ...............................3-35
3.4.7.19 UI_SMS_S state machine (uissms.c)..................................3-36
3.4.7.20 UI_HEXEDIT_S state machine (uishexed.c) .....................3-37
3.4.7.21 UI_GPS_S state machine (uisgps.c) ...................................3-38
3.4.7.22 UI_BT_S state machine (uisbt.c)........................................3-39
3.5 UI interface........................................................................................................3-40
3.5.1 UI interface – Input...............................................................................3-40
3.5.1.1 Signal interface module (rex.c).............................................3-40
3.5.1.2 Key interface module (uihkey.c) ..........................................3-40
3.5.2 UI interface – Output ............................................................................3-41
3.5.2.1 Sound interface module (uixsnd.c) .......................................3-41
3.5.2.2 Screen interface module (uixscrn.c) .....................................3-42

iv QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Contents

3.5.3 UI interface – Services ......................................................................... 3-45


3.5.3.1 Call Manager (CM) interface module (uixcm.c).................. 3-45
3.5.3.2 NV interface module (uixnv.c)............................................. 3-46
3.5.3.3 Database (DB) interface module (db.c)................................ 3-47
3.5.3.4 Sleep interface module (ui.h) ............................................... 3-48
3.5.3.5 Watchdog interface module (ui.c) ........................................ 3-48
3.5.3.6 Clock interface module (clk.c) ............................................. 3-49
3.5.3.7 Battery interface module (vbatt.c)........................................ 3-49
3.5.3.8 User application programming interface SMS
(uixuasms.c) ..................................................................................... 3-50
3.5.3.9 Embedded file system interface module (fs.c) ..................... 3-51
3.5.3.10 Device Mapper interface module
(sdevmap.c/rdevmap.c) .................................................................... 3-52
3.5.3.11 gpsOne interface module (pdsm.c)..................................... 3-53
3.5.3.12 Multimedia interface module (cmx.c) ................................ 3-54
3.5.3.13 Bluetooth interface module (bt.c)....................................... 3-55
3.6 Features ............................................................................................................. 3-56
3.6.1 Basic call features................................................................................. 3-56
3.6.2 Call-in-progress features ...................................................................... 3-56
3.6.3 Calling numbers features...................................................................... 3-57
3.6.4 Extra features........................................................................................ 3-57
3.6.5 Information displays............................................................................. 3-58
3.6.6 Restrictions........................................................................................... 3-58
3.6.7 System information .............................................................................. 3-58
3.6.8 User preferences................................................................................... 3-59
3.7 Sequence diagrams............................................................................................ 3-60

4 Modification examples ...................................................................... 4-1


4.1 Adding UI test menus ......................................................................................... 4-1
4.1.1 Purpose................................................................................................... 4-1
4.1.2 Requirements.......................................................................................... 4-1
4.1.3 Software modifications .......................................................................... 4-3
4.1.3.1 uiumenu.c ............................................................................... 4-3
4.1.3.2 uiutstmn.c ............................................................................... 4-3
4.1.3.3 uiutxt.c.................................................................................... 4-4
4.1.3.4 uismenu.c ............................................................................... 4-4
4.1.3.5 uiutxti.h .................................................................................. 4-4
4.1.3.6 Other files............................................................................... 4-4

80-V0280-1 X4 QUALCOMM Proprietary v


Contents DMSS User Interface

vi QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Contents

Figures
Figure 2–1 UI context diagram....................................................................................... 2-2
Figure 3–1 UI architecture.............................................................................................. 3-1
Figure 3–2 Voice call setup and mobile release ........................................................... 3-60
Figure 3–3 Voice call setup and base station release ................................................... 3-61
Figure 3–4 Failed voice call setup................................................................................ 3-62
Figure 3–5 Incoming voice call .................................................................................... 3-62

80-V0280-1 X4 QUALCOMM Proprietary vii


Contents DMSS User Interface

viii QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Contents

Tables
Table 1-1 Revision history ............................................................................................. 1-2
Table 2-1 Tasks and services.......................................................................................... 2-2
Table 2-2 Task priorities................................................................................................. 2-9
Table 3-1 UI architecture................................................................................................ 3-2
Table 3-2 UI software files............................................................................................. 3-4
Table 3-3 Signal handler signals .................................................................................... 3-7
Table 3-4 Callback timers............................................................................................... 3-8
Table 3-5 CM and SMS tasks......................................................................................... 3-9
Table 3-6 Internal events to the UI state machine ........................................................ 3-11
Table 3-7 External events to the UI state machine ....................................................... 3-11
Table 3-8 Major states .................................................................................................. 3-14
Table 3-9 List state minor states................................................................................... 3-15
Table 3-10 Major state machine transitions.................................................................. 3-16
Table 3-11 UI_LOCKED_S state machine transitions................................................. 3-18
Table 3-12 UI_STARTUP_S state machine transitions ............................................... 3-18
Table 3-13 UI_IDLE_S state machine transitions........................................................ 3-19
Table 3-14 UI_CODE_S state machine transitions ...................................................... 3-19
Table 3-15 UI_CALL_S state machine transitions ...................................................... 3-20
Table 3-16 UI_CLI_S state machine transitions .......................................................... 3-21
Table 3-17 UI_MESSAGE_S state machine transitions .............................................. 3-22
Table 3-18 UI_INFO_S state machine transitions........................................................ 3-22
Table 3-19 UI_RCL_S state machine transitions ......................................................... 3-23
Table 3-20 UI_STO_S state machine transitions ......................................................... 3-25
Table 3-21 UI_MENU_S state machine transitions ..................................................... 3-26
Table 3-22 Menu levels 1 and 2 ................................................................................... 3-27
Table 3-23 UI_SERVICE_S state machine transitions ................................................ 3-30
Table 3-24 Service menu options ................................................................................. 3-32
Table 3-25 UI_MULTIMEDIA_S state machine transitions ....................................... 3-33
Table 3-26 UI_SERVICE_S state machine transitions ................................................ 3-34
Table 3-27 UI_ALPHAEDIT_S state machine transitions........................................... 3-34
Table 3-28 UI_LIST_S state machine transitions ........................................................ 3-35
Table 3-29 UI_HELP_S state machine transitions ....................................................... 3-35
Table 3-30 UI_SMS_S state machine transitions ......................................................... 3-36
Table 3-31 UI_GPS_S state machine transitions.......................................................... 3-38
Table 3-32 UI_BT_S state machine transitions............................................................ 3-39
Table 3-33 Signal handler signals ................................................................................ 3-40
Table 3-34 Signal handler signals ................................................................................ 3-40
Table 3-35 Commands used by the state machine........................................................ 3-41
Table 3-36 Screen manager service routines ................................................................ 3-44
Table 3-37 Call Manager service routines.................................................................... 3-45
Table 3-38 NV Manager service routines..................................................................... 3-46
Table 3-39 Database service routines ........................................................................... 3-47
Table 3-40 Database service items read by the UI ....................................................... 3-47
Table 3-41 Database service item modified by the UI ................................................. 3-47
Table 3-42 Sleep task service routines ......................................................................... 3-48
Table 3-43 Watchdog task service routines.................................................................. 3-48
Table 3-44 Clock interface service routines ................................................................. 3-49
Table 3-45 Battery interface service routines ............................................................... 3-49

80-V0280-1 X4 QUALCOMM Proprietary ix


Contents DMSS User Interface

Table 3-46 UASMS service routines ............................................................................3-50


Table 3-47 EFS interface service routines used by the UI ............................................3-51
Table 3-48 sdevmap interface service routines used by the UI.....................................3-52
Table 3-49 rdevmap interface service routines used by the UI.....................................3-52
Table 3-50 PDSM interface service routines ................................................................3-53
Table 3-51 CMX interface service routines ..................................................................3-54
Table 3-52 BT interface service routines ......................................................................3-55
Table 3-53 Basic call features .......................................................................................3-56
Table 3-54 Call-in-progress features.............................................................................3-56
Table 3-55 Calling numbers features ............................................................................3-57
Table 3-56 Extra features ..............................................................................................3-57
Table 3-57 Information displays ...................................................................................3-58
Table 3-58 Restrictions .................................................................................................3-58
Table 3-59 System information.....................................................................................3-58
Table 3-60 User preferences .........................................................................................3-59

x QUALCOMM Proprietary 80-V0280-1 X4


1 Introduction

1 1.1 Purpose
2 The purpose of this document is to describe the design of the DMSS User Interface (UI). This
3 document contains descriptions of how the UI fits into the overall architecture of the phone and its
4 interactions with other parts of the phone. It also includes descriptions of the detailed internal design
5 of the UI software.

6 1.2 Scope
7 This document is limited to a description of the UI and its interaction with other entities of the phone.
8 The main purpose of the document is to highlight the functionality needed from the UI rather than to
9 serve as a tutorial on other phone entities. It is written for engineers who need to understand how the
10 UI works and for those who might be tasked with maintaining the software. This document assumes
11 that the reader has a rudimentary understanding of QUALCOMM CDMA Technologies phone
12 software and is familiar with its general architecture.

13 1.3 Organization
14 This document is organized into the following chapters:
15 ■ Introduction – purpose and scope of the document
16 ■ Overview – description of:
17 ❒ Overall QUALCOMM CDMA Technologies software architecture
18 ❒ UI and other parts of phone with which the UI interfaces
19 ■ Design – description of the UI design to give the reader sufficient understanding of how the UI is
20 put together
21 ■ Modification Examples – examples of how something in the UI can be modified for future
22 improvements

80-V0280-1 X4 QUALCOMM Proprietary 1-1


Introduction DMSS User Interface

1 1.4 Conventions
2 Function declarations, function names, type declarations, and code samples appear in a different font.
3 For example: #include
4 Shading indicates content that has been added or changed for this revision of the document.

5 1.5 Revision history


6 The revision history for this document is shown in Table 1-1.

7 Table 1-1 Revision history

Version Date Description


X1 May 1999 Initial release
X2 September 1999 Updates incorporated
X3 September 1999 Updated title
X4 November 2000 Updated tasks and services
8

9 1.6 Technical assistance


10 In the event that you need assistance or clarification on information in this guide, please feel free to
11 email QUALCOMM CDMA Technologies: [email protected].

12 1.7 Terms and definitions


BT Bluetooth
CM Call Manager
Command An input that is sent to the UI task by another task
DTMF Dual-Tone Multi-Frequency
EFS Embedded File System
Event An input to the state machine. These events are some times self-
generated; however, most of the events are generated from the commands
sent by the other entities to the UI task.
GPS Global Positioning System
NVM Non-volatile memory
PDSM Position Determination Services Manager
SMS Short Message Services
UI User interface
13

1-2 QUALCOMM Proprietary 80-V0280-1 X4


2 Overview

1 2.1 Introduction
2 The overall system architecture from the perspective of the UI is described in this chapter.
3 “UI perspective” refers to a view that is limited to the entities with which the UI interacts; all other
4 entities are excluded. A description is provided of the functionality of each entity that is identified.
5 Also included is a description of how each of those entities interfaces with the UI.

6 2.2 Overall phone architecture


7 The overall architecture of the phone and how the UI fits into it is shown in Figure 2–1. This figure is
8 from the perspective of the UI; entities with which the UI does not interact are not shown.
9

NOTE The following graphic was updated for this revision of the document.
10

80-V0280-1 X4 QUALCOMM Proprietary 2-1


Overview DMSS User Interface

USER INTERFACE HS

HS Input (UI) TASK Output

SND

Services

clock vbatt db devmap NV CM SMS BT PDSM SLEEP WDOG EFS

Legend: Task Service


1

2 Figure 2–1 UI context diagram

3 Tasks and services that are described in this chapter include those listed in Table 2-1. Services differ
4 from tasks in that service routines are performed in the UI task context.

5 Table 2-1 Tasks and services

Task or service Types


Task ■ User interface ■ Sound
■ Handset ■ NV
■ Watchdog ■ Position Determination Services Manager
■ Embedded File System ■ Bluetooth
■ Call Manager ■ Sleep
■ SMS
Service ■ Clock ■ Database
■ Device mapper ■ Battery
6

2-2 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Overview

1 2.3 Tasks

2 2.3.1 User interface (UI) task


3 The UI task is the layer between the actual user of the phone and its software. It provides interfaces to
4 phone hardware to provide display, sound, and key entry.
5 The UI task:
6 ■ Enables the user to dial a number and make calls.
7 ■ Enables the user to change phone preferences through menus.
8 ■ Displays information to notify the user of the status of current operations.
9 ■ Displays icons to keep the user informed of items such as the type of service (digital/analog),
10 signal strength, battery strength, and so on.
11 The UI task is essentially a giant loop:
12 ■ It receives the commands to perform an activity.
13 ■ After performing the requested command, it goes to the top of the loop and waits for the next
14 command.
15 The input to the UI task is provided through signals. The UI task waits for signals from other tasks
16 and processes them. Some signals instruct the UI to stop or go offline, while others inform the UI task
17 of queued commands that need processing. The UI task coordinates the activation/de-activation of
18 display fields, the setting of annunciators, the playing of sounds, and other related jobs associated
19 with handset, sound, and non-volatile memory.
20 The internal operation of the UI task is detailed in Section 3.

21 2.3.2 Handset (HS) task


22 The handset task is responsible for processing inputs from the keypad and displaying data on the
23 screen/LCD display. The handset task is also responsible for checking for changes in the position of
24 the earpiece and changes in the power. The handset task passes these events to the UI task for further
25 processing. The UI task sends commands to the handset task to display keys as they are pressed,
26 display a message, turn the backlight on or off, update display icons, or set/clear/blink the
27 annunciators.
28 The handset task has two components:
29 ■ Keypad
30 ■ Screen (also referred to as the LCD)

80-V0280-1 X4 QUALCOMM Proprietary 2-3


Overview DMSS User Interface

1 2.3.2.1 Keypad

2 The UI views events as a key that is being pressed. This model allows for the easy addition of other
3 handset features as necessary. This means that in addition to the key code for any event, the UI will
4 want to see a key-released event. Extra “events” that appear as keys include:
5 ■ Power on and off events
6 ■ Power-up-timer on and off events
7 ■ Ignition on and off events
8 ■ Phone-placed-in-cradle and lifted-from-cradle events
9 The UI will register with the handset task using hs_key_init() to inform it that UI_KEY_SIG
10 needs to be set for every incoming character.
11 Note that the action of placing the phone in and lifting it out from the cradle should appear as key
12 events to the UI, each with their appropriate “key-down” and key-up codes. Decoded DTMFs will
13 also appear as “keys” being pressed.
14 The UI expects the handset task to provide the following on every power up with the appropriate key
15 events in the handset buffer:
16 ■ State of the power switch
17 ■ State of the ignition switch
18 ■ Phone in or out of the hands-free cradle

19 2.3.2.2 Screen

20 Whenever the screen needs to be updated, the UI will call the display-screen update function with a
21 pointer to the new screen layout. The UI and the screen handler both need to know the height and
22 width of the screen.
23 The screen handler will compare the incoming screen to the current screen. It will attempt to make the
24 incoming screen look like current screen; however, this is dependent on the hardware and is not
25 within the province of the UI. If a new screen is passed in while a screen refresh is occurring, the
26 current screen refresh should be abandoned, if possible, so that response is as fast as possible.
27 Other features supported are backlight control and setting of annunciators.

2-4 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Overview

1 2.3.3 Watchdog task


2 The watchdogtask controls the hardware watchdog-reset timer. This timer must be re-enabled
3 periodically by the software, or the phone CPU will be reset.
4 The watchdog task provides routines for other tasks to indicate that they are functioning properly.
5 Every software task and important service routine is assigned a bit in a bitmap word that is
6 maintained by the watchdog task. Each task is responsible for setting its bit at regular intervals. If the
7 watchdog task detects that some task has not set its bit within the designated interval, it stops
8 re-enabling the hardware timer, which will eventually cause a reset.
9 The UI periodically reports to the watchdog task to alert it that the UI is running.

10 2.3.4 Sound task


11 There are three types of sounds that the UI needs the Sound task to produce:
12 ■ Tones – enumerated DTMFs
13 ■ Multitones – sequences of Tones
14 ■ Sounds – enumerated and consist of multiple DTMFs
15 For example, RING and BUSY would be Sounds. A single key-press would generate a Tone. A list of
16 digits to be “dialed” would be a Multitone.
17 Tones take precedence over Multitones, which take precedence over Sounds. When a lower priority
18 sound is preempted by a higher priority sound, it should resume once the higher priority sound is
19 finished.
20 The UI task can send a command message to the sound task to choose the input and output audio
21 paths, adjust the ear/speaker/ring volume, or play or stop a sound/multitone/tone. Tones can be played
22 at power-up when the battery is low or if there is a SMS message waiting. Multitones are played
23 when DTMF data needs to be transmitted. Sounds are played in the event of an alert such as incoming
24 call, service area change, fade, incoming SMS message, or moving in and out of service.
25 The UI will need to be notified at the completion of each of the different types of sounds with a
26 separate signal for each. It will also need the option to be notified whenever a Sound reaches its end
27 and begins to repeat, so that those rings may be counted.

28 2.3.5 Non-volatile memory (NV) task


29 The NV task manages the persistent data storage of the phone. Tasks that write to or read from the
30 NV communicate to the NV task through a command queue. The NV task executes the commands
31 asynchronously and notifies the original task by setting a REX signal.
32 The UI reads or writes to many NV items. It also uses the NV for storing SMS messages.

80-V0280-1 X4 QUALCOMM Proprietary 2-5


Overview DMSS User Interface

1 2.3.6 Sleep task


2 The sleep task controls the sleep mode of the phone; it is the lowest priority task. It maintains a
3 bitmap word, where each task of interest is assigned a bit. Each task is responsible for setting or
4 clearing its bit. This task puts the phone to sleep when all tasks approve. It awakens upon hardware
5 interrupts.
6 When the UI is ready to sleep, it will set the signal for the sleep task. Otherwise, it will clear the
7 signal.

8 2.3.7 Call Manager (CM) task


9 The CM task is the layer between the UI and the Call-Processing task. It handles the requests from the
10 UI and dispatches them to lower level services. Tasks communicate with the CM task by calling
11 CM-provided functions. These functions put the commands in the CM command queue and set a
12 signal to alert the CM task that it has a command that needs to be processed. The CM task uses events
13 to return information to the UI. The following describe some examples of interface between the UI
14 and the CM.
15 The UI sends commands to the CM task to:
16 ■ Originate a call
17 ■ Turn the power on or off
18 ■ Send a flash
19 ■ End a call
20 ■ Answer an incoming call
21 ■ Send a burst of DTMF
22 Messages are also sent when there is:
23 ■ Change in the preferred system/mode
24 ■ Switch to another NAM
25 ■ During TX testing/calibration
26 The CM task sends events and responses to the UI when:
27 ■ User origination failed
28 ■ Fade during conversation
29 ■ Call is connected
30 ■ Call is released
31 ■ An alert exists

2-6 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Overview

1 2.3.8 Short message services (SMS) task


2 This service provides mobile-terminated and mobile-originated (two-way) SMS. The UI receives the
3 services through the SMS application programming interface (API). The SMS API provides the client
4 software with the ability to send and receive short messages, and the ability to set up a dedicated
5 traffic channel for the transfer of short messages. The messages are used for providing teleservices
6 such as paging, voice mail notifications, short messaging, and wireless application protocol (WAP).
7 This service runs in the same thread context as the CM. There is no separate task for this service.

8 2.3.9 Embedded File System (EFS) task


9

NOTE This section was added to this revision of the document.


10

11 The EFS task is a consistent, device-independent file management system that provides standard
12 interfaces to any application that needs to access the non-volatile memory. In addition to standard
13 routines for opening, closing, reading, and writing files, EFS also provides a variety of other useful
14 routines for directory and file manipulation.
15 One of the ways the UI uses EFS is for storing of multimedia data, such as MIDI files.

16 2.3.10 Position Determination Services Manager (PDSM) task


17

NOTE This section was added to this revision of the document.


18

19 The PDSM task provides the interface by which applications/UI can get position location information
20 about their current location. Tasks communicate with the PDSM task by calling PDSM-provided
21 functions. These functions put the commands in the PDSM command queue and set a signal to alert
22 the PDSM task that it has a command that needs to be processed. The PDSM task uses events to
23 return information to the application/UI. The following is an example of the kind of location
24 information that may be returned to the application.
25 ■ Latitude
26 ■ Longitude
27 ■ Position uncertainty in meters
28 ■ Heading
29 ■ Horizontal/vertical velocity
30 ■ Height

80-V0280-1 X4 QUALCOMM Proprietary 2-7


Overview DMSS User Interface

1 2.3.11 Bluetooth (BT) task


2

NOTE This section was added to this revision of the document.


3

4 The BT task provides the interface by which applications/UI can get perform a variety of Bluetooth
5 operations. Tasks communicate with the BT task by calling BT-provided functions. These functions
6 put the commands in the BT command queue and set a signal to alert the BT task that it has a
7 command that needs to be processed. The BT task uses events to return information to the
8 application/UI. The following list is some of the BT interfaces currently used by the UI.
9 The UI sends commands to the BT task to:
10 ■ Enable/Disable network access
11 ■ Enable/Disable audio gateway
12 ■ Query what BT devices are within range
13 ■ Get the name of a BT device that is within range
14 The BT task sends events to the UI when:
15 ■ A BT connection is established
16 ■ A BT connection is lost
17 ■ Device Discovery data is available

2-8 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Overview

1 2.3.12 Task priorities


2 All of the tasks run under the real-time executive (REX). The priorities of individual tasks in
3 relationship to other tasks are shown in descending order in the following table.

4 Table 2-2 Task priorities


Number Task Priority
1 Watchdog 1000
2 Sound 900
3 Transmit (TX) 700
4 Receive (RX) 600
5 Searcher 500
6 Receive-Transmit (RXTX) 450
7 Main Control (MC) 400
8 Handset (HS) 300
9 Diagnostics (Diag) 200
10 QDSP 165
11 Vocoder 160
12 Call Manager (CM) 150
13 Bluetooth (BT) 125
14 Position Determination Services Manager (PDSM) 104
15 User Interface (UI) 100
16 Non-Volatile Memory (NV) 80
17 Voice Services 79
18 Embedded File System (EFS) 78
19 Authentication 75
20 Data 70
21 USB (not applicable to DMSS 3000 or DMSS 5000) 66
22 Data Protocol Services (PS) 60
23 Sleep 50
5

6 Some observations on task priorities:


7 ■ Watchdog has the highest priority
8 ■ Sleep has the lowest priority, as it gets activated in the absence of other tasks
9 ■ Sound has the second highest priority because it ensures clear ring sound without being
10 interrupted by any other task

80-V0280-1 X4 QUALCOMM Proprietary 2-9


Overview DMSS User Interface

1 2.4 Services

2 2.4.1 Clock services


3 Clock services provide callback timers, and the setting and reading of the system clock. The UI
4 primarily uses clock services for the use of callback timers.
5 When the callback timer expires, it calls a user-defined callback function. Since the callback function
6 executes in interrupt context, it is critical to do the minimum and switch immediately to a task thread.
7 Some examples of UI usage of callback timers are:
8 ■ Checking to see if a key is pressed
9 ■ Updating a display
10 ■ Displaying menus and lists
11 ■ Handling timed pauses
12 Every callback timer must be registered with clock services before its usage. The timers can be
13 registered to execute only once or periodically.

14 2.4.2 Database services


15 Database services contain data that is shared globally among all tasks. This data is not preserved
16 through power-downs. Each item in database services is assigned an enumerated type name. Database
17 service access is multithread safe. Each item in database services can be modified through db_put()
18 or retrieved through db_get().
19 The central information database will be periodically polled by the UI to determine the status of
20 information. In addition, the UI will maintain its own variables in the database for use in debugging
21 or other tasks.

22 2.4.3 Battery services


23 Battery services provide routines to read and calibrate the current battery level. During initialization
24 of the UI, a callback routine to update the display every one second is registered with clock services.
25 The callback function reads the current level of the battery and sends a command message to the
26 handset task to update the display.

27 2.4.4 Device Mapper (devmap) Services


28

NOTE This section was added to this revision of the document.


29

30 The devmap service centralizes the logic for device assignments and ensures the proper sequencing of
31 device assignments. Devmap services provide routines to map a selection of physical devices to a
32 selection of applicable services. An example of this may be mapping data services to uart2.

2-10 QUALCOMM Proprietary 80-V0280-1 X4


3 Design

1 3.1 Introduction
2 The UI software design is described in this chapter. Design topics include the UI software
3 architecture, the components of the architecture, and various UI features.

4 3.2 UI architecture
5 The UI architecture is shown in Figure 3–1. The UI communicates to all external entities through a
6 well-defined API. In most cases, there is a module within the UI that clearly defines this API. In some
7 cases, such as database items, the UI uses the API provided by the external entities themselves. This
8 is referred to as “Virtual External Interface” in the diagram below.

User Interface Task

Dispatcher

Signal Handler

Key Handler Command Handler CB Timer Handler Screen HS

HS Signal State Machine

Major State 1 Major State 2 ... Major State N Sound SND

Minor States Minor States ... Minor States

Call Multi- File Watch


Clock Battery sdevmap DB NV UASMS gpsOne Bluetooth Sleep
Manager media System Dog

clock vbatt devmap db NV CM SMS PDSM VS BT EFS SLEEP WDOG

External Virtual
Legend: Task service Interface Ext. Intf
9

10 Figure 3–1 UI architecture

80-V0280-1 X4 QUALCOMM Proprietary 3-1


Design DMSS User Interface

1 Table 3-1 UI architecture

Architecture Description

UI layers
■ Dispatcher layer The top layer of the UI.
■ Handler layer The signals are the primary input to the UI.
❒ Callback timer handler
❒ Key handler
❒ Command handler
■ State machine layer Main processing unit of the UI.
UI interface to other entities
■ Signals Modules for handling input to the UI
■ Screen Modules for handling output from the UI
■ Sound
■ Battery Modules for handling services required by/requested of the UI software
■ Clock
■ CM
■ DB
■ NV
■ Sleep
■ UASMS
■ Watchdog
■ devmap
■ gpsOne
■ Multimedia
■ Bluetooth
■ EFS
2

3-2 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.3 File organization


2 This section describes the file-naming conventions, gives a brief description of files, and an overall
3 structured chart that describes the program layout of the UI.
4 All UI files will have three character prefixes. The first two characters, UI, are mandatory to signify
5 that these belong to the User Interface technology group. The third character signifies the sub-group
6 within the UI to which the files belong. Currently, x, h, s, and u are used for the third character. The
7 rest are reserved.
8

uih H – Handlers
The UI receives input through signals, queue messages, and keys. Extensive
processing is done on the signals before they can be fed to the state machine.
These “handler” functions transform the command to events that the state machine
can understand.
uis S – State
All state machine processing including state machine and all state transition
actions.
uix X – External (to UI) Interface
All UI files that interface to external entities. These files contain the API to access
an external entity. For example, uixsnd.h and uixsnd.c define the interface and
implementation of sound related API. Similarly, uixscrn.h and uixscrn.c define the
interface and implementation of screen related API.
uiu U – Utility
All the utility functions that do not fall into any of the above categories.
9

80-V0280-1 X4 QUALCOMM Proprietary 3-3


Design DMSS User Interface

1 The following table lists all the files that make up the UI software.

2 Table 3-2 UI software files

Name Comments
ui.h Interface to UI the task
ui.c Initialization and main command dispatcher
Handler files
uihsig.c Signal handler; feeds signals to appropriate handlers
uihkey.c Key handler; converts keys to state machine events
uihcbt.c Callback timers
uih.h Handler header file
uihcmd.c, uihcmd.h Q commands; converts commands to state machine events
State files
uistate.c, uistate.h State machine event dispatcher
uisalph.c Alpha edit
uisbt.c, uisbt.h Bluetooth
uiscall.c, uiscall.h Call
uiscli.c CLI
uiscode.c Code
uisgps.c, uisgps.h GPS
uishelp.c Help
uishexed.c Hex edit
uisidle.c Idle
uisinfo.c Info
uislist.c List
uislock.c Lock
uislpm.c Low Power Management
uismenu.c, uismenu.h Menu
uismm.c, uismm.h Multimedia
uismsg.c Message
uisnum.c Number Edit
uisoff.c Off
uisrcl.c Recall
uisserv.c Service Menu
uissms.c, uissms.h SMS
uissto.c Store
uisstrt.c Start-up
uisview.c, uisview.h View

3-4 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Name Comments

Utility files
uiuint.h Internal UI defines
uiudata.c, uiudata.h Data utility file
uiumenu.c, uiumenu.h Menu definitions
uiusmsd.c, uiusmsd.h SMS display functions
uiusmsl.c, uiusmsl.h SMS list functions
uiutstmn.c, uiutstmn.h Test menu
uiutxt.c, uiutxt.h Text definitions
uiutxti.h Internal text defines
External interface files
uixscrn.c, uixscrn.h Interface to the Screen task
uixsnd.c, uixsnd.h Interface to the Sound task
uixnv.c Interface to the NV task
uixcm.c, uixcm.h Interface to the CM task
uixuasms.c, uixuasms.h Interface to the SMS task
1

80-V0280-1 X4 QUALCOMM Proprietary 3-5


Design DMSS User Interface

1 3.4 UI layers
2 The UI software is divided into three major layers – dispatcher, handler, and state machine. The first
3 two layers are responsible for control aspects of the UI. For example, deciphering the meaning of the
4 input and directing the control flow to call the proper processing function. The state machine layer
5 performs all the processing necessary to carry out functions.

6 3.4.1 Dispatcher layer (ui.c)


7 The dispatcher is the top layer of the UI. It is the giant loop that receives the input and directs it to
8 proper function on which to perform the operation. All the input, such as keypad and commands, will
9 be received here prior to reaching the place where it will be properly handled.
10 The dispatcher layer gets called when the UI task is started. This layer is responsible for start-up
11 initialization. The initialization and the main loop are shown below in pseudo code.
12 ui_task ()
13 {
14 /* Initialize UI */
15 ui_init()
16 {
17 Initialize screen handler;
18 Initialize sound;
19 Initialize command queues;
20 Initialize SMS queue;
21 Initialize info queue;
22 Initialize REX timers;
23 Wait for Start signal from MC task;
24 Initialize callback timers;
25 Initialize handset;
26 Initialize state variables;
27 Initialize Call Manager (CM);
28 Initialize sms;
29 Initialize GPS;
30 Initialize BT;
31 }
32 /* Main Loop */
33 for ( ;; )
34 {
35 Wait for signal;
36 Feed to State Machine all pending events from the priority queue;
37 ui_signal() /* Call handler layer to process all the signals*/
38

39 Feed to State Machine the messages from Base station;


40 Feed to state Machine all the pending key events from the event queue;
41

42 Refresh screen;
43 }
44 }

3-6 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.2 Handler layer


2 The signals are the primary input to the UI. Some signals carry additional information such as keypad
3 input and commands from other tasks. The signal handler part of this layer is responsible for calling
4 the appropriate functions to process the signal. Some signal processing is simple while the others are
5 complex.

6 3.4.2.1 Signal handler (uihsig.c)

7 This module handles most of the signals that are received by the UI task. Where appropriate, the
8 signal handler converts the signals into events and feeds them to the state machine for processing.

9 Signals
10 The UI task receives signals that inform it of various events. The signal wakes up the UI task to let it
11 know that an operation needs to be performed. The signals are listed in Table 3-3.

12 Table 3-3 Signal handler signals

Name Description

UI specific signals
UI_KEY_SIG Key from HS task; invokes handle_keys().
UI_CMD_Q_SIG Something on the command queue; invokes ui_handle_cmds().
UI_TIMERS_SIG Any of the callback timers; invokes ui_timers().
UI_RPT_TIMER_SIG Time to kick watchdog; invokes ui_kick_dog().
UI_MULTI_STOP_SIG Multitone has ended, alert the state machine.
UI_RING_SIG End of a ring from SND task; count rings and pass it to the state machine.
UI_NV_SIG Return from NV. *** This signal is not handled here.***
It is received and processed when NV read/write is performed. By explicitly
waiting for this signal (in uixnv.c), UI task achieves the synchronous NV
read/write.
Common signals
TASK_START_SIG Start. *** This signal is not handled here.***
During the UI task startup, MC sets this signal for the UI to continue initialization.
This is the only signal Dispatcher layer explicitly handles.
TASK_STOP_SIG Powerdown. It is not all the time that we powerdown when user presses the
power key. Some times (OTASP) the MC task alerts us that we need to power
down; alert the state machine and acknowledge the MC task that we are powered
down.
TASK_OFFLINE_SIG Go offline, alert the state machine and acknowledge the MC task that we are
offline.
13

80-V0280-1 X4 QUALCOMM Proprietary 3-7


Design DMSS User Interface

1 3.4.2.2 Key handler (uihkey.c)

2 This module handles the key press messages passed from the HS task whenever the user presses a
3 key. The key handler converts these key presses into events. It adds these converted events to the
4 event queue for subsequent processing by the state machine.
5

handle_keys() Converts key press messages into UI events and feeds them to the state machine
6

7 3.4.2.3 Callback timer handler (uihcbt.c)

8 The callback timers are used to get a signal at appropriate intervals to perform useful operations. This
9 module uses a global variable, timeflags, and allocates a bit for each callback timer used. An
10 appropriate bit is set or reset when a callback timer is started or expired. This module converts the
11 signal into an appropriate state machine event.
12

handle_timers() Convert callback timer signal into UI events and feed them to the state machine
13

14 The following callback timers are defined.

15 Table 3-4 Callback timers


Name Description
UI_KEY_TIMER Key down timer
UI_GEN_TIMER General countdown timer
UI_DISP_TIMER One second display timer
UI_MENU_TIMER Menu/List timer
UI_MSG_TIMER Message timer
UI_DISPMSG_TIMER Temporary message display timer
UI_SMSMSG_TIMER SMS status message display timer
UI_ALPHA_TIMER Alpha entry timer
UI_ANIMATE_DOT_TIMER Timer for animated ellipsis
UI_PAUSE_TIMER Timed pause timer
16

3-8 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.2.4 Command handler (uihcmd.c)

2 This module converts messages from other tasks into events and feeds them to the state machine for
3 processing.
4

ui_cmd() Allows other tasks to send commands to the UI


5

6 Commands
7 The commands are the input to the UI that are placed on the command queue when the UI receives
8 the UI_CMD_Q_SIG. Upon receiving the signal, the UI reads the command queue to determine what
9 its next action should be. The commands are sent to the UI from other tasks to request that the UI
10 perform an operation.
11 Some of the commands are generated internally by the interface modules such as uixcm.c and
12 uixuasms.c. The CM and SMS tasks generate events to these modules, which in turn translate them
13 into commands that the UI task understands.

14 Table 3-5 CM and SMS tasks

Name Description

SMS task (proxy - uixuasms.c)


UI_SMS_F Display/process incoming SMS message
UI_SMS_MSG_WAITING_F Message waiting
UI_SMS_N_VOICE_F NAMPS voice mail
UI_BCSMS_CMD_ERR_F BC SMS error happened
UI_BCSMS_CONFIG_F BC SMS configuration information
UI_BCSMS_PREF_F BC SMS user preference information
UI_BCSMS_TABLE_F BC SMS service table
UI_BCSMS_SRV_IDS_F BC SMS service IDs
UI_BCSMS_SRV_INFO_F BC SMS service information
UI_BCSMS_SRV_ADDED_F BC SMS service added
UI_BCSMS_SRV_DELETED_F BC SMS service deleted
UI_BCSMS_SRV_UPDATED_F BC SMS service updated
UI_BCSMS_ENABLE_FAILURE_F BC SMS service enable failure
UI_BCSMS_DISABLE_FAILURE_F BC SMS service disable failure
CM task (proxy - uixcm.c)
UI_CALL_INCOMING_F Incoming call
UI_CALL_ORIGINATED_F A call is originated
UI_CALL_ANSWERED_F The call is answered
UI_CALL_CONNECT_F The call is connected
UI_CALL_ENDED_F The call is ended
UI_CALL_SO_CHANGED_F The service option is changed

80-V0280-1 X4 QUALCOMM Proprietary 3-9


Design DMSS User Interface

Name Description
UI_CALL_PRIVACY_CHANGED_F The voice privacy is changed
UI_CALL_CALLER_ID_F Caller ID could be call waiting
UI_CALL_FLASHED_F A flash is sent
UI_CALL_SIGNAL_F New for ring event from base station
UI_CALL_ABRV_ALERT_F Generate a CDMA/AMPS abbreviated alert
UI_CALL_ABRV_REORDER_F Generate an AMPS abbreviated reorder
UI_CALL_ABRV_INTERCEPT_F Generate an AMPS abbreviated intercept
UI_CALL_DISPLAY_F Display CDMA information
UI_CALL_CALLED_PARTY_F Called Party information
UI_CALL_CONNECTED_NUM_F Responding party information
UI_CALL_EXT_DISPLAY_F Extended display
UI_CALL_NDSS_START_F NDSS start
UI_CALL_NDSS_CONNECT_F NDSS connect
UI_PH_INUSE_STATE_F IN_USE state is changed
UI_PH_SRV_STATE_F Service state is changed
UI_PH_OPRT_MODE_F Operating mode is changed
UI_PH_CDMA_LOCK_MODE_F CDMA lock mode is changed
UI_PH_MODE_PREF_F Preferred mode is changed
UI_PH_SYS_PREF_F Preferred system is changed
UI_PH_ANSWER_VOICE_F Answer voice as data setting is changed
UI_PH_RES_LEVEL_F Restriction level is changed
UI_PH_CURR_NAM_F Current NAM is changed
UI_PH_NAM_SEL_F NAM selection is changed
UI_PH_ROAM_STATUS_F Roaming status is changed
UI_PH_INFO_AVAIL_F Phone information is now available
UI_PH_MAINTREQ_F CDMA Maintenance Required command
UI_PH_RSSI_F New RSSI value
UI_PH_STANDBY_SLEEP_F Entering powerdown sleep mode
UI_PH_STANDBY_WAKE_F Exiting powerdown sleep mode
UI_SS_SRV_CHANGED_F Serving system parameter changed
UI_INBAND_REV_BURST_DTMF_F Reverse burst DTMF from UI or another application
UI_INBAND_FWD_BURST_DTMF_F Forward burst DTMF from the base station
UI_INBAND_REV_START_CONT_DTMF_F Reverse start cont DTMF from UI or another application
UI_INBAND_FWD_START_CONT_DTMF_F Forward start cont DTMF from the base station
UI_INBAND_REV_STOP_CONT_DTMF_F Reverse stop cont DTMF from UI or another application
UI_INBAND_FWD_STOP_CONT_DTMF_F Forward stop cont DTMF from the base station
1

3-10 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.3 State machine layer


2 This layer is the main processing unit of the UI. It processes the input from other tasks and drivers,
3 and decides what to do based on the current UI state. See uistate.c for the main state machine details
4 and all uis*.c for minor (sub-state) state machine details.

5 3.4.4 Events
6 In addition to all of the possible keyboard codes, the following events are given to the UI state
7 machine.
8 The events are divided into two categories:
9 ■ External events – events that are converted from UI commands
10 ■ Internal events – events that the UI generates to sync its state machine
11 The internal and external events to the UI state machine are described in the following tables.

12 Table 3-6 Internal events to the UI state machine


Internal event Description
UI_MULTIDONE_F Multitone done playing
UI_RING_F End of a ring
UI_OFFLINE_F Go offline “key”
UI_INFO_F Information received from base station
13

14 Table 3-7 External events to the UI state machine

External event Description


UI_CLRALL_F CLR held down
UI_PSEK_F Pause “key”
UI_TPSEK_F Timed pause “key”
UI_HYPHEN_F Hyphen “key”
UI_RCLUP_F Recall key released
UI_RCLDN_F Recall key held down
UI_DIGDOWN_F Digit (1-9) held down
UI_SENDDTMF_F Send string DTMF “key”
UI_DOABRVALERT_F Abbreviated alert
UI_RELEASE_F Call release
UI_SMUTE_F Speaker mute
UI_NVOICE_F NAMPS voice mail status
UI_NMSG_F NAMPS short message
UI_UPDISP_F Update display
UI_TIMER_F General purpose timer expired

80-V0280-1 X4 QUALCOMM Proprietary 3-11


Design DMSS User Interface

External event Description


UI_MENUTIMER_F Menu/list timer expired
UI_MSGTIMER_F uistate_msg message timer expired
UI_DISPMSGTIMER_F Temporary message display timer expired
UI_BOOSTCALL_F Make a call for power boost
UI_TOIDLE_F Back out to idle state
UI_LOCKWARN_F Key pressed during earpiece down
UI_SAVE_F SAVE soft key pressed
UI_PUNC_F Punctuation character selected
UI_ALPHATIMER_F Alpha entry interdigit timeout
UI_PAUSETIMER_F Timed Pause timeout
UI_PWR_K_F Power up even though earpiece down
UI_SMS_UIB_ALERT_F Have SMS display the alert
UI_SMSTIMER_F SMS status/warning timeout
UI_SMS_MSG_F SMS message received
UI_SMS_STS_MSG_F SMS status message received
UI_PWR_KEY_PRESS_F For the display when PWR key is pressed
UI_DO_END_ACTIVATION_F End OTASP activation call
UI_DO_OTASP_STATUS_F Sent OTASP activation ending status
UI_MSGALL_F Message key was held down
UI_0_HELD_F Key 0 held down
UI_1_HELD_F Key 1 held down
UI_2_HELD_F Key 2 held down
UI_3_HELD_F Key 3 held down
UI_4_HELD_F Key 4 held down
UI_5_HELD_F Key 5 held down
UI_6_HELD_F Key 6 held down
UI_7_HELD_F Key 7 held down
UI_8_HELD_F Key 8 held down
UI_9_HELD_F Key 9 held down
UI_END_HELD_F Key held down end
UI_PF1_HELD_F Left softkeys held
UI_PF2_HELD_F Right softkeys held
UI_CALL_INCOMING_E Incoming call
UI_CALL_ORIGINATED_E A call is originated
UI_CALL_CONNECT_E The call is connected
UI_CALL_ENDED_E The call is ended
UI_CALL_SO_CHANGED_E The service option is changed
UI_CALL_PRIVACY_CHANGED_E The voice privacy is changed
UI_CALL_CALLER_ID_E Caller ID could be call waiting
UI_CALL_FLASHED_E A flash is sent
UI_CALL_CMD_ERR_E Some error happened to call commands

3-12 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

External event Description


UI_CALL_EXT_DISPLAY_E Display Ext disp information
UI_PH_INUSE_STATE_E IN_USE state is changed
UI_PH_SRV_STATE_E Service state is changed
UI_PH_OPRT_MODE_E Operating mode is changed
UI_PH_CDMA_LOCK_MODE_E CDMA lock mode is changed
UI_PH_MODE_PREF_E Preferred mode is changed
UI_PH_SYS_PREF_E Preferred system is changed
UI_PH_ANSWER_VOICE_E Answer voice as data setting is change
UI_PH_RES_LEVEL_E Restriction level is changed
UI_PH_CURR_NAM_E Current NAM is changed
UI_PH_NAM_SEL_E NAM selection is changed
UI_PH_ROAM_STATUS_E Roaming status is changed
UI_PH_INFO_AVAIL_E Phone information is now available
UI_PH_CMD_ERR_E Some error happened to phone commands
UI_INBAND_FWD_BURST_DTMF_E Forward burst DTMF
UI_SS_SRV_CHANGED_E Serving system is changed
1

2 3.4.5 States
3 The UI state machine consists of many states. These states are termed “major” states. Each major
4 state has substates called “minor” states to carry out its operations.
5 A state stack drives the state machine. Each state returns one of three possible values:
6 ■ Its own state – machine remains in that state
7 ■ Another state – current state is saved on the state stack and the new state is entered
8 ■ POP_STATE – last state is popped off the state stack and becomes the current state

9 A state such as IDLE can invoke the MENU state to display a menu. When the MENU state exits,
10 control will be returned to the IDLE state, which will handle the return information from the MENU
11 state. When the phone is powered up, it begins in the OFF state and goes to the STARTUP state.
12 Thus, eventually the state will return to OFF when the phone is powered down.

80-V0280-1 X4 QUALCOMM Proprietary 3-13


Design DMSS User Interface

1 3.4.5.1 Major states

2 The major states are described in Table 3-8.

3 Table 3-8 Major states


Major state Description
UI_STARTUP_S Powering up:
a. Read NV data
b. Decide whether to power up or down
c. Decide if service programming is necessary
UI_LOCKED_S Earpiece down-locked
UI_CODE_S Enter lock code
UI_IDLE_S Do nothing except wait for something to happen. Handles immediate menu choices
(such as lock), incoming alerts, and so on. Basically, a dispatcher to other states.
UI_CALL_S In call. Answer alert, handle busy signals, reorder, redial, call timer, and so on. The
in-call equivalent of IDLE.
UI_CLI_S Caller line information
UI_MESSAGE_S Display a message (default of two seconds)
UI_INFO_S Information displayed for the user
UI_RCL_S Recall a number from the memory or call stack
UI_STO_S Store a number to memory
UI_MENU_S Handle any menus
UI_SERVICE_S Service programming
UI_NUMEDIT_S Edit a number
UI_ALPHAEDIT_S Edit a name/banner
UI_HEXEDIT_S Edit a hexadecimal number
UI_LIST_S Handle selection lists – reads and writes to NV if necessary
UI_HELP_S Display help menu
UI_SMS_S SMS message menu
UI_MULTIMEDIA_S Multimedia
UI_GPS_S GPS
UI_BT_S Bluetooth
UI_OFF_S Power-off state
4

3-14 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.5.2 Minor states

2 Each major state has multiple minor states – ENTER, EXIT, and anything in-between. These minor
3 states are defined as necessary to make the control flow as simple as possible. Generally, each major
4 state has one minor state; all other minor states are invoked to handle incoming events as needed. The
5 state will react based upon the incoming event.
6 Whenever a state reaches the EXIT minor state (it is in process of being exited), it should do two
7 things:
8 1. Set its internal state back to ENTER, so that the next time the state in reentered, it does not
9 immediately exit.
10 2. Return with a POP_STATE, so that the state that “called” it can resume control.
11 As an example, the minor states of the List Major State are described in Table 3-9.

12 Table 3-9 List state minor states

Minor state Description


ENTER_S Enter message state
MAIN_S Main key handling
MENU_S Return from menu
ADJVOL_S Adjust volume
DOSTO_S Do storage
EXIT_S Message exit state
13

80-V0280-1 X4 QUALCOMM Proprietary 3-15


Design DMSS User Interface

1 3.4.6 Major state machine


2 The major state machine processes all of the incoming events to the UI as well as other internally
3 generated events. It consists of minor state machines that handle individual UI states. Based on the
4 current state, the major state machine calls the corresponding minor state machine to handle the
5 events. See uinstate.c for details. The state transitions are listed in Table 3-10. All states use
6 UI_POP_S to return to previous state on the stack. Except for the states where they have no other
7 state transitions, this is not shown for each state in the following table.

8 Table 3-10 Major state machine transitions


Current state Next state
UI_OFF_S UI_LOCKED_S
UI_STARTUP_S
UI_LOCKED_S UI_POP_S
UI_STARTUP_S UI_IDLE_S
UI_IDLE_S UI_CALL_S
UI_CODE_S
UI_MESSAGE_S
UI_INFO_S
UI_LIST_S
UI_NUMEDIT_S
UI_RCL_S
UI_STO_S
UI_MENU_S
UI_SMS_S
UI_ALPHAEDIT_S
UI_CALL_S UI_MESSAGE_S
UI_LIST_S
UI_INFO_S
UI_CODE_S
UI_MENU_S
UI_RCL_S
UI_HELP_S
UI_NUMEDIT_S
UI_SMS_S
UI_CLI_S UI_MESSAGE_S
UI_CODE_S UI_INFO_S
UI_MESSAGE_S
UI_MESSAGE_S UI_POP_S
UI_INFO_S UI_POP_S
UI_LIST_S UI_INFO_S
UI_ALPHAEDIT_S UI_INFO_S
UI_HEXEDIT_S UI_POP_S
UI_HELP_S UI_POP_S

3-16 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Current state Next state


UI_MENU_S UI_MESSAGE_S
UI_LIST_S
UI_SERVICE_S
UI_CODE_S
UI_INFO_S
UI_NUMEDIT_S
UI_ALPHAEDIT_S
UI_HEXEDIT_S
UI_MULTIMEDIA_S
UI_GPS_S
UI_BT_S
UI_NUMEDIT_S UI_MESSAGE_S
UI_INFO_S
UI_LIST_S
UI_STO_S
UI_RCL_S UI_INFO_S
UI_MESSAGE_S
UI_HELP_S
UI_NUMEDIT_S
UI_CODE_S
UI_STO_S
UI_SERVICE_S UI_INFO_S
UI_MESSAGE_S
UI_SMS_S UI_NUMEDIT_S
UI_MESSAGE_S
UI_STO_S
UI_MULTIMEDIA_S UI_POP_S
UI_GPS_S UI_POP_S
UI_BT_S UI_MESSAGE_S
UI_STO_S UI_MESSAGE_S
UI_ALPHAEDIT_S
UI_HELP_S
UI_LIST_S
1

80-V0280-1 X4 QUALCOMM Proprietary 3-17


Design DMSS User Interface

1 3.4.7 Minor state machines

2 3.4.7.1 UI_OFF_S state machine (uisoff.c)

3 This state machine handles the OFF state of the UI task. The OFF state is both the default initial state
4 and the termination state of the UI. The UI always starts and ends with this state. At the initial state, if
5 the user powers up the phone, the UI will transition to the STARTUP state. In the case of a phone
6 having an earpiece device that is closed, the UI will transition to the LOCKED state. During phone
7 operation, if the user powers down the phone, the UI will transition back to the OFF state.
8 There are no state transitions.

9 3.4.7.2 UI_LOCKED_S state machine transitions

10 This state machine handles the LOCK state of the UI task. The UI can be in this state only when the
11 phone has an earpiece device. When the user holds the power key while the earpiece is closed, the UI
12 transitions to the state from the OFF state. While in this state, if the user opens the earpiece, the UI
13 will transition to the STARTUP state. If the earpiece is not open within a predefined time, the UI will
14 transition to the OFF state.
15 The state transitions are listed in Table 3-11.

16 Table 3-11 UI_LOCKED_S state machine transitions


Current state Next state
ENTER_S WAITING_S
WAITING_S External UI major states
17

18 3.4.7.3 UI_STARTUP_S state machine (uisstrt.c)

19 This state machine handles the STARTUP state of the UI. It initializes the NV items used by the UI
20 and the MC task, and other variables used by the UI. If the initialization is successful and the power is
21 on at the end of the initialization, the UI will transition to the IDLE state. Otherwise, the UI will
22 transition back to the OFF state.
23 The state transitions are listed in Table 3-12.

24 Table 3-12 UI_STARTUP_S state machine transitions

Current state Next state


ENTER_S SHUT_S
ID_S
ID_S IDLE_S
IDLE_S SHUT_S
SHUT_S ENTER_S
25

3-18 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.4 UI_IDLE_S state machine (uisidle.c)

2 This state machine handles the IDLE state of the UI task. In this state, the UI waits for events from
3 external devices and other tasks. Based on the incoming events, the UI transitions to other states.
4 The state transitions are listed in Table 3-13.

5 Table 3-13 UI_IDLE_S state machine transitions


Current state Next state
ENTER_S IDLING_S
IDLING_S ENTER_S
SPDDISP_S
CODE_S
RCL_S
UI_CALL_MISSED_S
MENU_S
EXIT_S
UI_CALL_MISSED_S ENTER_S
IDLING_S
RCL_S ENTER_S
MENU_S IDLING_S
SPDDISP_S ENTER_S
6

7 3.4.7.5 UI_CODE_S state machine (uiscode.c)

8 This state machine handles the CODE state of the UI. The UI transitions to this state when the user
9 selects a UI feature that invokes security-code checking. In this state, the UI allows the user to unlock
10 the security code. If a matching code is entered, the UI transitions back to the state that the UI was in
11 prior to the CODE state.
12 The state transitions are listed in Table 3-14.

13 Table 3-14 UI_CODE_S state machine transitions

Current state Next state


ENTER_S MAIN_S
MAIN_S EXIT_S
EXIT_S ENTER_S
14

80-V0280-1 X4 QUALCOMM Proprietary 3-19


Design DMSS User Interface

1 3.4.7.6 UI_CALL_S state machine (uiscall.c)


2

NOTE Numerous changes were made to this section. It is recommended that it be reviewed in its entirety.
3

4 This state machine handles the CALL state of the UI. The UI transitions to this state when there are
5 call-related activities and/or events such as incoming and outgoing calls. In this state, the UI handles
6 call-related events and other events that may occur during a call.
7 The CALL state is handled differently than other states in that its state machine is implemented
8 differently and the minor states are called modes. In the CALL state, there are many possible modes
9 and each mode contains an entry, event, and exit function.
10 Upon transitioning to a new mode, the entry function is called to set up variables, display, timers and
11 so on for the current mode. Then it will stay in the event function to handle all events during this
12 mode. Depending on the event, the mode could exit and enter another mode, if appropriate, or exit the
13 CALL state, which would take the phone to the previous state in the UI state stack. The exit function
14 of each mode performs clean-ups for that mode, such as deactivating certain display items, stopping
15 timers, and so on.
16 When the call state is entered from a different state, either originated mode or alerted mode is entered.
17 In each mode, UI may exit the Call state completely due to certain events, such as Power-off event.
18 The mode transitions are listed in Table 3-15.

19 Table 3-15 UI_CALL_S state machine transitions


Current mode Description Next mode
orig_attempt Call origination is being attempted alerted
originated

originated Call has been originated alerted


paused
in_prog
wait_retry
call_end_disp

alerted An incoming call alert has in_prog


occurred call_forward
call_forward Call has been forwarded call_end_disp
wait_retry Call origination failed and is going return_wait_retry
to be retried orig_attempt
alerted

return_wait_retry Reenter wait_retry mode wait_retry


after certain events that occurred
in wait_retry mode previously

3-20 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Current mode Description Next mode


in_prog Call has been connected num_edit
code
return_in_prog
in_prog
paused
multi_wait
alerted
call_end_disp
paused Wait for burst DTMF to be sent in_prog
multi_wait
alerted

Multi_wait Wait for DTMF tones to be played paused


locally after sending burst DTMF in_prog
alerted
Code If phone is locked, enter code to in_prog
unlock it
Num_edit (numed) Scratch pad number handling in_prog
Return_in_prog Return from other states back to in_prog
UI_CALL_S
Call_end_disp Display call end screen and exit alerted
exit_call_state
1

2 3.4.7.7 UI_CLI_S state machine (uiscli.c)

3 This state machine handles the CLI (CALL LINE ID) state of the UI. The UI pushes this state to the
4 state stack so that the UI can display incoming-call information on the screen. The UI exits this state
5 and transitions to the UI_CALL_S state after displaying the CLI information for a time period (such
6 as 6 seconds), after auto-answer is activated, or after the user responds to the incoming call.
7 The state transitions are listed in Table 3-16.

8 Table 3-16 UI_CLI_S state machine transitions


Current state Next state
ENTER_S MAIN_S
MAIN_S EXIT_S
EXIT_S Exit CLI state
9

80-V0280-1 X4 QUALCOMM Proprietary 3-21


Design DMSS User Interface

1 3.4.7.8 UI_MESSAGE_S state machine (uismsg.c)

2 This state machine handles the MESSAGE state of the UI. The UI transitions to this state when there
3 is a request to display a message on the screen. In this state, the UI displays the requested message on
4 the screen.
5 The state transitions are listed in Table 3-17.

6 Table 3-17 UI_MESSAGE_S state machine transitions


Current state Next state
ENTER_S PSE_S
PSE_S EXIT_S
ENTER_S
EXIT_S ENTER_S
7

8 3.4.7.9 UI_INFO_S state machine (uisinfo.c)

9 This state machine handles the INFO state of the UI. The UI transitions to this state when there is a
10 request to display information about the phone. Normally, this happens when the user presses the
11 information key on the keypad. In this state, the UI displays the phone information.
12 The state transitions are listed in Table 3-18.

13 Table 3-18 UI_INFO_S state machine transitions

Current state Next state


ENTER_S GETINFO_S
GETINFO_S EXIT_S
MAIN_S
MAIN_S GETINFO_S
EXIT_S
EXIT_S ENTER_S
14

3-22 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.10 UI_RCL_S state machine (uisrcl.c)

2 This state machine handles the RCL state of the UI. The UI transitions to this state when there is a
3 request to recall a database entry, such as the phone book. In this state, the UI handles the recalled
4 information and any further user requests.
5 The state transitions are listed in Table 3-19.

6 Table 3-19 UI_RCL_S state machine transitions


Current state Next state
ENTER_S REENTER_S
REENTER_S MAIN_S
SCROLL_INIT_S
PART_INIT_S
MAIN_S EXIT_S
STACK_INIT_S
SCROLL_INIT_S
REENTER_S
USE_S
USE_S EXIT_S
EDIT_S
SAVE_S
SCROLL_INIT_S EXIT_S
MSG_S
SCROLL_LIST_S
MSG_S EXIT_S
REENTER_S
SCROLL_LIST_S EXIT_S
USE_S
ALPHA_INIT_S
REENTER_S
ALPHA_INIT_S ALPHA_S
ALPHA_S EXIT_S
ALPHA_DONE_S
MENU_S
REENTER_S
MENU_S EXIT_S
ALPHA_S
ALPHA_DONE_S SCROLL_INIT_S
REENTER_S
ALPHA_INIT_S
SCROLL_LIST_S
STACK_INIT_S MSG_S
SCROLL_LIST_S
PART_INIT_S EXIT_S
SCROLL_INIT_S

80-V0280-1 X4 QUALCOMM Proprietary 3-23


Design DMSS User Interface

Current state Next state


EDIT_S EXIT_S
POSTSCRIPT_S
CODE_S
ERASE_S
PREPEND_S
REENTER_S
OFD_S
SAVE_S EXIT_S
CALLTIME_S
PREPEND_S
SCROLL_LIST_S
REENTER_S
OFD_S
PREPEND_S USE_S
EXIT_S
OFD_S USE_S
EXIT_S
CALLTIME_S USE_S
EXIT_S
CODE_S EXIT_S
ERASE_S
USE_S
POSTSCRIPT_S USE_S
EXIT_S
ERASE_S REENTER_S
CLR_DONE_S
EXIT_S
USE_S
CLR_DONE_S SCROLL_LIST_S
EXIT_S ENTER_S
1

3-24 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.11 UI_STO_S state machine (uissto.c)

2 This state machine handles the STO state of the UI. The UI transitions to this state when there is a
3 request to store an entry into the database, such as the phonebook. In this state, the UI handles the
4 store and any related requests.
5 The state transitions are listed in Table 3-20.

6 Table 3-20 UI_STO_S state machine transitions


Current state Next state
ENTER_S REENTER_S
REENTER_S LOC_S
INIT_S
INIT_S LOC_S
LOC_S REENTER_S
EXIT_S
MAIN_S
MAIN_S EXIT_S
REENTER_S
USED_S
LOC_S
USED_S SECRET_S
REENTER_S
ASK_S
ASK_S EXIT_S
REENTER_S
SECRET_S
SECRET_S SECRETRESP_S
SECRETRESP_S EXIT_S
SAVE_DO_S
SECRET_S
SAVE_DO_S EXIT_S
VERIFY_S
VERIFY_S EXIT_S
EXIT_S ENTER_S
7

80-V0280-1 X4 QUALCOMM Proprietary 3-25


Design DMSS User Interface

1 3.4.7.12 UI_MENU_S state machine (uismenu.c)

2 This state machine handles the MENU state of the UI. The UI transitions to this state when there is a
3 request to view the menu options. The state machine handles the main menu and sub-menu displays
4 and any further related user requests. When entry into the service-programming menu is requested,
5 the UI transitions to the SERVICE state.
6 The state transitions are listed in Table 3-21.

7 Table 3-21 UI_MENU_S state machine transitions

Current state Next state


ENTER_S MENU_S
MENU_S MENU_S
EXIT_S
CALLINFO_S MENU_S
EXIT_S
NEWLOCK_S MENU_S
EXIT_S
EMERGENCY_S EMERGENCY2_S
EMERGENCY2_S EMERGENCY_S
EDIT_RETURN_S
MENU_S
EXIT_S
CHNAM_S MENU_S
EXIT_S
EDIT_RETURN_S EMERGENCY2_S
EXIT_S
IP_ADDRESS_S IP_EDIT_RETURN_S
IP_PORT_S IP_EDIT_RETURN_S
IP_EDIT_RETURN_S IP_EDIT_RETURN_S
MENU_S
EXIT_S
RESTRICT_S MENU_S
EXIT_S
BANNER_S BANNER_S
MENU_S
EXIT_S
BANNER_SHOW_S BANNER_S
MENU_S
EXIT_S
VERWAIT_S MENU_S
EXIT_S
LOCK_CODE_S MENU_S
EXIT_S
FIELD_CODE_S MENU_S
EXIT_S

3-26 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Current state Next state


TESTCALL_S MENU_S
EXIT_S
SHOWERR_S MENU_S
EXIT_S
CLRERR_S MENU_S
EXIT_S
LIST_S MENU_S
EXIT_S
MSGMENU_S MENU_S
EXIT_S
ACTIVATE_S MENU_S
EXIT_S
NEWSOUNDS_S ENTER_S
EXIT_S ENTER_S
1

2 Menus are the mechanism for the user to change pre-defined options. Menus are organized in a
3 hierarchical fashion and the user can navigate through the menus using the soft keys and the number
4 keys.
5 Menus are used for:
6 ■ Choosing items to change
7 ■ Actions to take
8 ■ Giving help
9 Menus may be scrolled through with the cursor keys or the menu key. Pressing MENU from
10 anywhere results in the display of a menu.

11 Table 3-22 Menu levels 1 and 2

Level 1 Level 2 Options


1: Volume 1: Ringer off | escalate | low | M- | M+ | high
2: Key Beep off | low | M- | M+ | high
3: Earpiece 1 – 7 levels
4: Message off | low | M- | M+ | high
2: Display 1: Backlight always on | 10 sec | 30 sec | always off
2: Banner Enter personal greeting
3: Show Time no | if available
4: AutoHyphen on | off
5: Version Displays software version

80-V0280-1 X4 QUALCOMM Proprietary 3-27


Design DMSS User Interface

Level 1 Level 2 Options


3: System 0: Service Menu See details of the Service menu later in this document>
1: Select Std | A Only | B Only | A then B | B then A | Home Only
2: Set NAM nam1 | nam2
3: Auto NAM on | off
4: Data/Fax off | fax/data for next call | fax/data until power off
5: Force Mode CDMA Pref | CDMA Only | temp Analog | Analog only
4: Alerts 1: Fade on | off
2: Minute on | off
3: Service on | off
5: Call Information 1: Last Call Call time nn:nn
2: Home Calls n calls; mm:ss time
3: Roam Calls n calls; mm:ss time
4: All Calls n calls; mm:ss time
6: Security 1: Lock Mode on power up | now | never
4 digit lock code 2: Restrict yes | no
(default - 0000)
3: New Code enter and re-enter new 4 digit code
4: Emergency # enter number
5: Send PIN never | prompt
7: Features 0: Debug
1: Screen <screen display>
2: Test Calls New 8K/13K Markov | 8K/13K Loopback | TDSO | FTDSO
3: CDMA Only Enabled
4: Errors <screen deploys>
5: Clr Errors no | yes
6: Voice SO 8K | EVRC | 13K
7: Data Scrn —
8: ToggleQNC Enabled / Disabled
1: AutoAnswer 1/3/5 rings | off (answer a call on second ring)
2: AutoRetry 60 sec | 30 sec | 10 sec | off (redials up to 5 times)
3: ScratchPad Enter number
4: Mute Muted
5: Key Beep long | normal
6: One-touch enable | disable
7: Privacy standard | enhanced
8: Ring Type Dynamic list
9: SIO Config Port Map
DS Baud
Diag Baud

3-28 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Level 1 Level 2 Options


8: Voice Svcs 1: Multimedia MIDI
9: Tests 1: SMS Save Tmplt
Save MO
SMS Call
Reset SeqN
2: BC SMS SrvcConfig
Srvc Pref
Srvc Slct
Srvc Information
3: Call Mngr Register
Activate
DeRegister
Get Information
4: NV
5: UI UI Rng On
UI Rng Off
6: Analog HFK Enable | Disable
1

80-V0280-1 X4 QUALCOMM Proprietary 3-29


Design DMSS User Interface

1 3.4.7.13 UI_SERVICE_S state machine (uisserv.c)

2 This state machine handles the SERVICE state of the UI. The UI transitions to this state when there is
3 a request to enter the service-programming menu. In this state, the UI displays the service-
4 programming menu options and allows the user to enter new configuration values.
5 The state transitions are listed in Table 3-23.

6 Table 3-23 UI_SERVICE_S state machine transitions


Current state Next state
ENTER_S PASS_S
PASS_S OFFLINE_S
INIT_S
EXIT_S
OFFLINE_S INIT_S
INIT_S GETITEM_S
GETITEM_S VIEW_S
PF1_OR_PF2_S
GETITEM_S
EDIT_S
EDIT1_S
EDITB_S
DONEMSG_S
VIEW_S DONEMSG_S
BACKUP_S
UI_INFO_S
DOSTO_S
NEXTITEM_S
GETITEM_S
AKEY_ENTRY_S
EDIT_SIDNID_S
EXIT_S
PF1_OR_PF2_S GETITEM_S
BACKUP_S
NEXTITEM_S
DONEMSG_S
EDIT_S GETITEM_S
EDITA_S
BACKUP_S
NEXTITEM_S
DONEMSG_S
EDIT1_S
EDIT_SIDNID_S
EXIT_S

3-30 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Current state Next state


EDIT1_S GETITEM_S
DOSTO_S
BACKUP_S
EDIT_S
ERROR_S
DONEMSG_S
EDITA_S EDIT_S
DOSTO_S
BACKUP_S
ERROR_S
DONEMSG_S
EDITB_S BACKUP_S
DOSTO_S
EDIT_SIDNID_S EDIT_S
ERROR_S
VIEW_S
DOSTO_S EDIT_S
EDIT1_S
NEXTITEM_S
ERROR_S
BACKUP_S GETITEM_S
NEXTITEM_S GETITEM_S
ERROR_S ERR1_S
ERR1_S GETITEM_S
DONEMSG_S WAIT_S
WAIT_S EXIT_S
AKEY_ENTRY_S AKEY_REENTER_S
AKEY_DONE_S
DONEMSG_S
AKEY_REENTER_S AKEY_ENTRY_S
AKEY_DONE_S GETITEM_S
EXIT_S ENTER_S
1

80-V0280-1 X4 QUALCOMM Proprietary 3-31


Design DMSS User Interface

1 The service menu options are listed in Table 3-24. The phone is re-booted at the end of the service
2 menu. “?” in the table refers to NAM number. The menu goes through the middle section of the menu
3 as many times as there are NAMs.

4 Table 3-24 Service menu options

Option
Security Code [000 000]
ESN
Akey
NAM ? Settings
NAM ? Phone Number
NAM ? Home SID
NAM ? Name
Basic Programming [Exit / More]
Service Security Code <?=1 only>
NAM ? Lock out system
NAM ? PRL Enabled
NAM ? CDMA Phone Number
NAM ? Mobile Country Code
NAM ? Mobile Network Code
NAM ? Mobile Station ID#
NAM ? CDMA Home SID List
NAM ? AMPS Phone Number
NAM ? AMPS Home SID
NAM ?+1 Settings [Edit]
Phone Model
Slot Cycle Index
Exit Service Programming
5

3-32 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.14 UI_MULTIMEDIA_S state machine (uismm.c)


2

NOTE This section was added to this revision of the document.


3

4 This state machine handles the Multimedia state of the UI. The UI transitions to this state when the
5 user picks a multimedia option from the menu. This state machine handles the song selection and
6 playback and other user inputs to control and adjust the playback.
7 The state transitions are listed in Table 3-20.

8 Table 3-25 UI_MULTIMEDIA_S state machine transitions


Current state Next state
ENTER_S GET_SELECTION_S
EXIT_S
GET_SELECTION_S PLAY_WAIT_S
EXIT_S
PLAY_WAIT_S PLAY_STOPPING_S
PLAYING_S
EXIT_S
PLAYING_S PLAY_STOPPING_S
PLAY_PAUSE_S
PLAY_REL_WAIT_S
GET_SELECTION_S
PLAY_CHOICE_S
EXIT_S
PLAY_STOPPING_S EXIT_S
PLAY_CHOICE_S
PLAY_STOPPED_S PLAY_CHOICE_S
PLAY_PAUSE_S EXIT_S
PLAYING_S
PLAY_STOPPING_S
PLAY_CHICE_S PLAY_WAIT_S
GET_SELECTION_S
EXIT_S
PLAY_REL_WAIT_S PLAYING_S
PLAY_STOPPING_S
EXIT_S ENTER_S
9

80-V0280-1 X4 QUALCOMM Proprietary 3-33


Design DMSS User Interface

1 3.4.7.15 UI_NUMEDIT_S state machine (uisnum.c)

2 This state machine handles the NUMEDIT state of the UI. In this state, the UI provides a number
3 editor that allows the user to enter and edit a number. The number editor will automatically insert
4 hyphens (if the option is enabled). Pauses and hyphens can be forced. The editor will use the entire
5 display to show the current number. Anything aside from the current number can be viewed by
6 holding down the RCL key.
7 This state has been extended to also handle the editing of an IP address and IP port.
8 The state transitions are listed in Table 3-26. See uisnum.c for details.

9 Table 3-26 UI_SERVICE_S state machine transitions

Current state Next state


ENTER_S EDIT_S
EDIT_S EXIT_S
STO_S
INFO_DISPLAY_S
RCL_S EDIT_S
EXIT_S
STO_S EDIT_S
EXIT_S
INFO_DISPLAY_S EDIT_S
EXIT_S
MENUCALL_S EDIT_S
EXIT_S
EXIT_S ENTER_S
10

11 3.4.7.16 UI_ALPHAEDIT_S state machine (uisalpha.c)

12 This state machine handles the ALPHAEDIT state of the UI. In this state, the UI provides an
13 alphanumeric editor that allows the user to enter and edit an alphanumeric string. It allows upper and
14 lower case, and editing with the arrow keys.
15 The state transitions are listed in Table 3-27.

16 Table 3-27 UI_ALPHAEDIT_S state machine transitions

Current state Next state


ENTER_S EDIT_S
EDIT_S EXIT_S
MENU_S
MENU_S EDIT_S
EXIT_S
EXIT_S ENTER_S
17

3-34 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.17 UI_LIST_S state machine

2 This state machine handles the LIST state of the UI. In this state, the UI allows the user to scroll
3 through a list. Lists are used to select between different choices for a single feature, for example,
4 backlight options. One line is used for a description/prompt and the other is used for the choice. The
5 cursor keys are used to make the choice. Pressing the STO key makes the choice, and pressing the
6 RCL key recalls the previous value.
7 The state transitions are listed in Table 3-28.

8 Table 3-28 UI_LIST_S state machine transitions

Current state Next state


ENTER_S MAIN_S
MAIN_S EXIT_S
DOSTO_S
ADJVOL_S
ADJVOL_S MAIN_S
DOSTO_S EXIT_S
EXIT_S ENTER_S
9

10 3.4.7.18 UI_HELP_S state machine (uishelp.c)

11 This state machine handles the HELP state of the UI. In this state, the UI displays the help screen of
12 the UI.
13 The state transitions are listed in Table 3-29.

14 Table 3-29 UI_HELP_S state machine transitions


Current state Next state
ENTER_S MAIN_S
MAIN_S EXIT_S
EXIT_S ENTER_S
15

80-V0280-1 X4 QUALCOMM Proprietary 3-35


Design DMSS User Interface

1 3.4.7.19 UI_SMS_S state machine (uissms.c)

2 This state machine handles the SMS state of the UI. In this state, the UI handles SMS-related events.
3 This state is entered when the user presses the MESSAGE button in Idle state or Call state, and when
4 there is a SMS message or status coming in.
5 In any substate, UI exits the SMS state completely due to certain events, such as Power-off event,
6 Timeout, and so on. The SMS state maintains a substate stack. Sometimes a new substate is pushed
7 into the stack; sometimes the current substate is popped from the SMS state stack and UI goes to the
8 previous substate in the stack.
9 The state transitions are listed in Table 3-30.

10 Table 3-30 UI_SMS_S state machine transitions


Current state Description Next state
UI_SMS_IDLE_S Initial substate UI_SMS_MSG_RXD_S
UI_SMS_MSG_ACCESS_S
UI_SMS_MSG_RXD_S Display message/status received UI_SMS_IDLE_S
screen
UI_SMS_MSG_ACCESS_S Display SMS access screen with UI_SMS_NO_ACCESS_S
number of voice mails and text UI_SMS_MSG_RXD_S
messages
UI_SMS_VOICE_S
UI_SMS_TEXT_S
UI_SMS_SCROLL_S
UI_SMS_VOICE_S Display the voice mail message UI_SMS_CALL_BACK_S
UI_SMS_PREPEND_S
UI_SMS_MSG_RXD_S
UI_SMS_MSG_ACCESS_S
UI_SMS_TEXT_S
UI_SMS_ERASE_S
UI_SMS_TEXT_S Display a text message UI_SMS_MSG_RXD_S
UI_SMS_ERASE_S
UI_SMS_CALL_BACK_S
UI_SMS_PREPEND_S
UI_SMS_MSG_ACCESS_S
UI_SMS_SCROLL_S Display SMS old message list UI_SMS_ERASE_S
UI_SMS_MSG_RXD_S
UI_SMS_PREPEND_S
UI_SMS_MSG_ACCESS_S
UI_SMS_TEXT_S
UI_SMS_CALL_BACK_S
UI_SMS_ERASE_S Confirm erasing a message UI_SMS_MSG_RXD_S
UI_SMS_MSG_ACCESS_S
UI_SMS_SCROLL_S

3-36 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

Current state Description Next state


UI_SMS_PREPEND_S Return from number state for UI_SMS_MSG_RXD_S
prepending digits to the callback
number
UI_SMS_CALL_BACK_S Displaying callback number that UI_SMS_MSG_RXD_S
the user can prepend and dial UI_SMS_MSG_ACCESS_S
UI_SMS_PREPEND_S
UI_SMS_NO_ACCESS_S Display no voice mail or message UI_SMS_MSG_RXD_S
available UI_SMS_MSG_ACCESS_S
1

2 3.4.7.20 UI_HEXEDIT_S state machine (uishexed.c)


3

NOTE This section was added to this revision of the document.


4

5 This state machine handles the HEXEDIT state of the UI. In this state, the UI provides a hexadecimal
6 editor that allows the user to enter and edit a hex numeric string .
7 The state transitions are listed in Table 3-29.

8 Table 3-27 UI_HEXEDIT_S state machine transitions


Current state Next state
ENTER_S EDIT_S
EDIT_S EXIT_S
EXIT_S ENTER_S
9

80-V0280-1 X4 QUALCOMM Proprietary 3-37


Design DMSS User Interface

1 3.4.7.21 UI_GPS_S state machine (uisgps.c)


2

NOTE This section was added to this revision of the document.


3

4 This state machine handles the GPS state of the UI. In this state, the UI sets GPS parameters and
5 interfaces to PDSM to get a position location.
6 The state transitions are listed in Table 3-29.

7 Table 3-31 UI_GPS_S state machine transitions

Current state Next state


ENTER_S GET_LOC_S
SET_PARAM_S
GET_LOC_S DELAY_S
LOC_RECVD_S
EXIT_S
SET_PARAM_S END_SET_S
EXIT_S
LOC_RECVD_S DELAY_S
DSPLY_DATA_S
EXIT_S
DSPLY_DATA_S EXIT_S
END_SET_S EXIT_S
DELAY_S EXIT_S
EXIT_S ENTER_S
8

3-38 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.4.7.22 UI_BT_S state machine (uisbt.c)


2

NOTE This section was added to this revision of the document.


3

4 This state machine handles the BT state of the UI. In this state, the UI interfaces to BT to do device
5 discovery and other BT specific functions.
6 The state transitions are listed in Table 3-29.

7 Table 3-32 UI_BT_S state machine transitions

Current state Next state


ENTER_S HCI_ENABLED_S
DELAY_S
DISCOVERY_STARTED_S
DISCOVERY_STARTED_S DELAY_S
DEVICE_DISPLAY_S
DEVICE_DISPLAY_S EXIT_S
DELAY_S EXIT_S
EXIT_S ENTER_S
8

80-V0280-1 X4 QUALCOMM Proprietary 3-39


Design DMSS User Interface

1 3.5 UI interface

2 3.5.1 UI interface – Input

3 3.5.1.1 Signal interface module (rex.c)

4 This is a virtual interface, there is no physical module associated with this interface. The UI utilizes
5 the signaling facilities provided by the operating system. The following signals are accepted by the UI
6 task.

7 Table 3-33 Signal handler signals


Name Description

UI specific signals
UI_KEY_SIG Key from HS task
UI_CMD_Q_SIG Something on the command queue
UI_TIMERS_SIG Any of the callback timers
UI_RPT_TIMER_SIG Time to kick watchdog
UI_MULTI_STOP_SIG Multitone has ended
UI_RING_SIG End of a ring from SND task
UI_NV_SIG Return from NV
Common signals
TASK_START_SIG Start
TASK_STOP_SIG Power down
TASK_OFFLINE_SIG Go offline
8

9 3.5.1.2 Key interface module (uihkey.c)


10

NOTE This section was added to this revision of the document.


11

12 This module provides a set of functions to register and process key events from the keypad and to set
13 the keypad backlight level.

14 Table 3-34 Signal handler signals

Name Description
uikey_init Initialize the key handler to register for key events from HS task
uikey_set_keypad_backlight_level Set the keypad backlight level
15

3-40 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.2 UI interface – Output

2 3.5.2.1 Sound interface module (uixsnd.c)


3

NOTE Numerous changes were made to this section. It is recommended that it be reviewed in its entirety.
4

5 This module provides a set of service routines for UI to play various types of sounds/tones (message
6 alert, keep beep, ring, multi-tone, and so on) to set the appropriate device (Handset, Headset, TTY,
7 HandsFree, and so on) or audio path (local and/or over-the-air), and to set the volume (message alert,
8 keep beep, multimedia, ring, TTY, voice, and so on).
9 All sound activities of the UI are handled through the sound manager. Whenever anything changes
10 (new sound to generate, old tone has ended, and so on), the sound manager decides what the current
11 volumes, devices and paths should be and makes adjustments if needed.
12 The commands are listed in Table 3-35.

13 Table 3-35 Commands used by the state machine


Name Description
uisnd_adata_config Configure the sound task to handle an AMPS Data call via the
PCMCIA card; this involves turning VOXing off, filtering off, and
unity gain off
uisnd_alert_vol Set the SMS message alert volume
uisnd_alt_call_fail Generate a customer call-failed sound
uisnd_beep_vol Set the key beep volume
uisnd_call_fail General call-failed sound
uisnd_dtmf Play a DTMF tone
uisnd_key_sound Play a key tone
uisnd_mm_vol Set the volume for multimedia
uisnd_multi Tell the sound task to play a multitone
uisnd_multi_stop Tell the sound task to stop a multitone
uisnd_multi_tone Play multitones to handset or a remote module
uisnd_play_signal Play a tone/alert signal from the network
uisnd_play_snd Tell the sound task to play a sound to the handset or a remote
module
uisnd_ring_vol Set the ring volume and inform the Sound task
uisnd_sample_snd Play a sample sound
uisnd_sample_tone Tell the sound task to play a sample tone while adjusting volume
uisnd_set_aagc Enable/disable the Audio AGC
uisnd_set_device Mute/Unmute a sound device
uisnd_set_escalating_ring_lvl Set the escalating ring volume level
uisnd_set_path Set the audio path
uisnd_snd Tell the sound task to play a sound

80-V0280-1 X4 QUALCOMM Proprietary 3-41


Design DMSS User Interface

Name Description
uisnd_snd_stop Tell the sound task to stop a sound
uisnd_stereo_mute Mute/Unmute the stereo
uisnd_tone Tell the sound task to play a tone
uisnd_tone_stop Tell the sound task to stop playing a DTMF tone
uisnd_tty_vol Set TTY device volume
uisnd_voice_vol Set the voice volume
1

2 3.5.2.2 Screen interface module (uixscrn.c)

3 This module provides a set of service routines for the state machine to control the LCD screen
4 display. It handles the screen fields and the list of active fields, and it builds the actual screens from
5 the fields. It also controls LCD and handset backlight options. See uixscrn.c for details.
6 The phone screen is 12 characters wide by 4 lines in length. This may be adapted to the needs of other
7 countries (Korea, Japan, Germany, and so on) in the future. Therefore, all of the actual text is
8 contained in one file, uiutxt.c, which can be easily changed to adapt the needs of different displays
9 and languages. There will be changes to the code because of the differing display sizes, but these
10 changes will be much smaller.
11 The screen handler keeps a special copy of the screen – one array element per character on the screen
12 that consists of a pointer to the position in memory where the character resides. This will point to
13 either a blank area or the text portion of a field. The screen handler also keeps a similar copy of the
14 blink attributes of the screen.
15 Fields constitute the content of the screen. Each field contains the following information:
16 ■ Priority – higher priority fields overwrite lower priority fields
17 ■ Line – the current line location on the screen
18 ■ Column – the current column location on the screen
19 ■ Blink – whether or not the text should be blinking
20 ■ Text – text in the field; this has the ability to wrap
21 The state machine manipulates this information (typically, the information is from the text field).
22 Behind-the-scenes is a linked list (queue) that is sorted in priority order. The state machine may
23 activate or deactivate any field – activating it places it in the list, deactivating it removes it. Only
24 fields in the list are drawn. Activating or deactivating a field will set a flag that indicates that the
25 screen needs to be rebuilt.
26 If only the text of the field has changed, the state machine can call uiscrn_update() that will
27 notify the screen handler that the text of the screen may or may not have been changed.
28 Finally, at the top of its big loop, just before it goes to sleep, the UI will call uiscrn_refresh(),
29 which will update the screen. If nothing has changed, this exits quickly. If only the text has changed,
30 it will rebuild the current display based on the pointers of its internal screen, and send it to the display
31 driver.

3-42 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 If a field has been activated or deactivated, the array of pointers needs to be rebuilt from scratch. The
2 screen manager traverses the list from the lowest priority field to the highest (again, the list is already
3 sorted), and for each field, sets the pointers in the array that the field affects. Thus, a higher priority
4 field will later overwrite the pointer of a lower priority field. Finally, the actual text is generated from
5 the pointers and sent to the display driver.

80-V0280-1 X4 QUALCOMM Proprietary 3-43


Design DMSS User Interface

1 Table 3-36 Screen manager service routines

Service routine Description


uiscrn_init Sets up the screen handler module.
uiscrn_font Sets the font for a screen character.
uiscrn_act Activates a field – adds it to the active display fields list.
uiscrn_deact Deactivates a field – removes it from the screen.
uiscrn_deact_all Deactivates all fields.
uiscrn_update Informs the screen handler that some text has changed.
uiscrn_list_update Informs the screen handler that a field has changed in a fundamental
way, for example, position, blinking, and so on.
uiscrn_refresh Takes all of the active fields and builds a screen display from them, once
uiscrn_update has been called. This should be called only once for
every time through the event loop.
uiscrn_scrn Turns the handset screen on or off.
uiscrn_backlight Turns backlighting on or off.
uiscrn_ann Sets or clears annunciators.
uiscrn_annblink Blinks annunciators.
uiscrn_rssi Sets RSSI annunciator bars.
uiscrn_batt Sets battery annunciator bars.
uiscrn_alloc_field Allocates storage for a screen item in RAM.
uiscrn_bind_field Calls uiscrn_alloc_field and copies the string into the screen
item.
uiscrn_bind_field2 Same as uiscrn_bind_field but copies UI_WIDE*field# into
the item.
uiscrn_bind_field3 Same as uiscrn_bind_field but copies UI_WIDE*field# into
the item.
uiscrn_bind_field4 Same as uiscrn_bind_field but copies UI_WIDE*field# into
the item.
uiscrn_bind_field_offset Same as uiscrn_bind_field but offsets into the screen item before
copying.
uiscrn_bind_act Same as uiscrn_bind_field but calls uiscrn_act before
returning.
uiscrn_bind_softkey Copies a string into the softkey screen item.
uiscrn_get_softkey Copies the current softkey item into a passed string.
uiscrn_ringer_on_off_txt Turn on/off Ringer Off text display.
2

3-44 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3 UI interface – Services

2 3.5.3.1 Call Manager (CM) interface module (uixcm.c)

3 The CM requires all of its clients to register themselves and to provide callback functions for different
4 types of events. This module provides all the necessary wrapper functions to interface to the CM,
5 including initialize the interface, register the required functions, as well as functions that the UI
6 module can call to send the commands to the CM and setup the appropriate parameters.

7 Table 3-37 Call Manager service routines

Service routine Description


ui_set_ph_info_avail Set phone information is available or not
ui_ph_info_is_avail Phone information is available or not
ui_call_is_from_ui See if the client for a call event is UI
ui_cm_call_event_cb Call event callback function
ui_cm_ph_event_cb Phone event callback function
ui_cm_ss_event_cb SS event callback function
ui_cm_inband_event_cb Inband event callback function
ui_cm_call_cmd_err_cb Call command error callback function
ui_cm_call_cmd_cb Call command callback function
ui_cm_ph_cmd_cb Phone command callback function
ui_cm_inband_cmd_cb Inband command callback function
ui_cm_ss_cmd_cb SS command callback function
is_emergency_call Function to see if it is emergency number
get_call_type Function to find the call type
call_is_allowed Function to see if call is allowed
ui_cm_init Initialize the UI-CM interface
ui_orig_voice_call Send voice call origination to the CM
ui_orig_test_call Send test call origination to the CM
ui_answer_call Send answer command to the CM
ui_answer_sms_call Send answer SMS call to the CM
ui_end_call Send call end command to the CM
ui_send_flash Send call flash command to the CM
ui_power_down Send power down command to the CM
ui_set_ph_oprt_mode Send set phone operation command to the CM
ui_set_ph_sys_pref Send set phone system preference to the CM
ui_set_ph_mode_pref Send set phone mode preference to the CM
ui_set_ph_curr_nam Send set current NAM command to the CM
ui_set_ph_auto_nam Send set auto NAM on/off to the CM
ui_set_ph_answer_voice_as_data Send set answer voice as data command
ui_burst_dtmf Send DTMF burst to the CM
ui_start_cont_dtmf Send command to start continuous DTMF
ui_stop_cont_dtmf Send command to stop continuous DTMF
ui_ph_cmd_is_mode_valid Check whether a phone mode is valid or not
8

80-V0280-1 X4 QUALCOMM Proprietary 3-45


Design DMSS User Interface

1 3.5.3.2 NV interface module (uixnv.c)

2 This module provides a set of service routines for the state machine to gain access to the NV
3 database. It allows the UI to read and write to NV database fields.
4 This module will intercept any inactive item “errors” that are returned from the non-volatile RAM
5 and will supply default values where an inactive item is possible and not fatal. In other words, if a
6 feature such as “Horn Alert” has never been set, the UI can safely substitute a FALSE value.
7 The UI will channel all of its write and read requests through three procedures,
8 ui_put_nv(),ui_replace_nv(), and ui_get_nv(), which will wait for the NV to return. In
9 essence, for the UI, the response from the NV task is always synchronous, albeit after a long delay.
10 This works because there are no reads or writes to the NV in any time-critical sections.

11 Table 3-38 NV Manager service routines

Service routine Description


ui_get_nv Retrieves an item from NV; provides the default value if the value returned is
invalid.
ui_put_nv Writes an item to NV.
ui_replace_nv Replaces an item in NV. Primarily used to write SMS list control block.
ui_free_nv Frees an item from NV.
ui_wait_nv It waits here for the response from NV task. In addition to waiting for signal
from NV task, it also kicks the watchdog if watchdog timer expires.
12

3-46 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3.3 Database (DB) interface module (db.c)

2 Database services contains data that is shared globally among all tasks. This data is not preserved
3 through power-downs. Each item in Database services is assigned an enumerated type name.
4 Database service access is multithread safe. Each item in Database services can be modified through
5 db_put() or retrieved through db_get().

6 The central information database will be periodically polled by the UI to determine the status of
7 information that does not need to be sent to the UI on the UI command queue. In addition, the UI will
8 maintain its own variables in the database for use in debugging or other tasks.

9 Table 3-39 Database service routines


Service routine Description
db_get Retrieves the item’s value from Database
db_put Writes to the specified item in Database
10

11 The Database service items read by the UI are described in Table 3-40.

12 Table 3-40 Database service items read by the UI


Database service item Description
DB_CHANNEL Current channel mobile is tuned to
DB_DIGITAL CDMA/Analog indication
DB_LP_SEC Leap seconds since start of system time
DB_LTM_OFF Offset local time since system time
DB_PILOT_PN_OFF Current pilot PN offset
DB_POWER Current mobile output power level
DB_RF_MODE Current RF mode (Analog, CDMA, PCS)
DV_ROAM Roaming status indication
DB_SID Current system ID
13

14 The Database service item modified by the UI are described in Table 3-41.

15 Table 3-41 Database service item modified by the UI

Database service item Description


DB_BATTERY_LEVEL Battery strength
16

80-V0280-1 X4 QUALCOMM Proprietary 3-47


Design DMSS User Interface

1 3.5.3.4 Sleep interface module (ui.h)

2 When the UI is ready to sleep, it will set the signal for the sleep task. Otherwise, it will clear the
3 signal. The following macros are used to communicate with the sleep task.

4 Table 3-42 Sleep task service routines

Service routines Description


UI_ENABLE_SLEEP Sets the signal SLEEP_UI_OKTS_SIG for the Sleep task
UI_DISABLE_SLEEP Clears the signal SLEEP_UI_OKTS_SIG for the Sleep task
5

6 3.5.3.5 Watchdog interface module (ui.c)

7 The UI periodically reports to the watchdog task through a timer that is registered with REX
8 (UI_RPT_TIMER_SIG) during the initialization of the UI task. When this timer expires, the UI task
9 resets the timer and reports to the watchdog task.

10 Table 3-43 Watchdog task service routines


Service routines Description
ui_kick_dog This routine invokes dog_report (DOG_UI_RPT) to let the watchdog task
know that the UI is running
11

3-48 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3.6 Clock interface module (clk.c)


2

NOTE Numerous changes were made to this section. It is recommended that it be reviewed in its entirety.
3

4 The clock routines provide the functions that allow the UI to define and use callback timers, and to
5 retrieve various time-related information. This is a virtual interface module and the UI directly uses
6 the functions provided by clock. On the expiration of a callback timer, the callback routines set the
7 signal to wake up the UI.

8 Table 3-44 Clock interface service routines

Service routines Description


clk_def Defines/initializes a clock call back structure to be used by other clock
functions.
clk_dereg De-register a clock call back routine.
clk_julian_to_secs Converts a specified Julian date and time to an equivalent number of elapsed
seconds since the base date.
clk_read_ms Reads the current value of the time-of-day clock in millisecond units.
clk_reg Register a clock call back routine.
clk_secs_to_julian Converts a specified number of elapsed seconds since the base date to its
equivalent Julian date and time.
clk_uptime Returns the number of seconds the phone has been on.
9

10 3.5.3.7 Battery interface module (vbatt.c)

11 The battery interface module provides a routine to read the current battery level. The UI main state
12 machine calls the function every second to read the current level of the battery calls a screen interface
13 function to update the display.

14 Table 3-45 Battery interface service routines

Service routines Description


vbatt_read Returns the battery level
15

80-V0280-1 X4 QUALCOMM Proprietary 3-49


Design DMSS User Interface

1 3.5.3.8 User application programming interface SMS (uixuasms.c)


2

NOTE Numerous changes were made to this section. It is recommended that it be reviewed in its entirety.
3

4 This module provides the interface to the SMS task (currently the same as the CM task) for
5 mobile-terminated, mobile-originated, and broadcast SMS. The following functions are included in
6 this module.

7 Table 3-46 UASMS service routines


Service routines Description
uiuasms_init Initializes the fixed mobile-originated messages so that they
can be sent to the SMS API later
uiuasms_send_MO Sends the next mobile-originated message to the SMS API in
the local array
uiuasms_clear_all_statuses Clear the status of each message
uiuasms_get_status Get the status of a message
uiuasms_msg_listener Listener function for receiving SMS messages
uiuasms_status_listener Listener function for receiving message status
uiuasms_event_listener Listener function for receiving events
uiuasms_bcsms_init Initializes the Broadcast SMS related configuration
uiuasms_bcsms_set_pref Set the user preference for Broadcast SMS
uiuasms_bcsms_set_srvc_enable Enable/.disable a service in the service table
uiuasms_bcsms_set_srvc_priority Set the priority of a service in the service table
uiuasms_bcsms_delete_srvc Delete a service from the service table
uiuasms_bcsms_add_srvc Add a service to the service table
uiuasms_bcsms_change_label Change the label of a service in the service table
uiuasms_bcsms_get_all_service_ids Get all service IDs in the service table
uiuasms_bcsms_get_service_info Get an entry in the service table
8

3-50 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3.9 Embedded file system interface module (fs.c)


2

NOTE This section was added to this revision of the document.


3

4 This module provides a set of service routines that allow the UI to gain access to the embedded file
5 system. The following functions are used by the UI.

6 Table 3-47 EFS interface service routines used by the UI


Service routine Description
fs_open Open a file
fs_close Close a file
fs_mkdir Create a new directory
fs_remove Remove a file
fs_read Read from a file
fs_write Write to a file
fs_nametest Test for existence of file or directory
fs_list_files Return list of files
fs_enum_init Init file or directory enumeration control object
fs_enum_next Return information for next file or directory
fs_enum_prev Return information for previous file or directory
fs_enum_finish Clean up enumeration control object
7

80-V0280-1 X4 QUALCOMM Proprietary 3-51


Design DMSS User Interface

1 3.5.3.10 Device Mapper interface module (sdevmap.c/rdevmap.c)


2

NOTE This section was added to this revision of the document.


3

4 This module provides a set of service routines that allow the UI to gain access to map a selection of
5 devices to a selection of applicable services The device mapper (devmap) service centralizes the logic
6 for device assignments and ensures the proper sequencing of device assignments.
7 There are two different device mappers. Earlier products will use the serial device mapper (SDM).
8 SDM supports fewer devices and the phone must be reset for the mapping to occur. Recent products
9 will use the runtime device mapper (RDM). RDM is more robust and will map/unmap at runtime.

10 Table 3-48 sdevmap interface service routines used by the UI


Service routine Description
sdm_ui_get_table_devmap Get current mappings
sdm_ui_set_dev_map Set mappings
11

12 Table 3-49 rdevmap interface service routines used by the UI


Service routine Description
rdm_get_device Query which device is being used by service
rdm_get_service Query which service mapped to a port
rdm_get_valid_ports Get all valid devices for a service
rdm_get_device_str Get character string for a device
rdm_assign_port Assign service to device
13

3-52 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3.11 gpsOne interface module (pdsm.c)


2

NOTE This section was added to this revision of the document.


3

4 PDSM requires all of its clients to register themselves and to provide callback functions for different
5 types of events. This module provides all the necessary functions to setup the appropriate parameters,
6 register the required functions, as well as functions that the UI module can call to get a position
7 location.

8 Table 3-50 PDSM interface service routines

Service routine Description


pdsm_client_init Initialize for client and get a client id
pdsm_client_release Release all data associated with this client
pdsm_client_pd_reg Register position callback
pdsm_client_pa_reg Register parameter callback
pdsm_client_act Activate the client for events
pdsm_client_deact Deactivate the client
pdsm_get_position Get a position location
pdsm_end_session Abort a position location session
pdsm_set_parameters Set one or more parameters
pdsm_get_parameters Get one or more parameters
9

80-V0280-1 X4 QUALCOMM Proprietary 3-53


Design DMSS User Interface

1 3.5.3.12 Multimedia interface module (cmx.c)


2

NOTE This section was added to this revision of the document.


3

4 CMX requires all of its clients to provide callback functions for different types of events. This module
5 provides all the necessary functions to support standard MIDI functionality.

6 Table 3-51 CMX interface service routines


Service routine Description
cmx_audfmt_play Play a midi file
cmx_audfmt_pause Pause midi playback
cmx_audfmt_resume Resume midi playback
cmx_audfmt_stop Stop midi playback
cmx_audfmt_seek_pause Prepare for a rewind/fast forward
cmx_audfmt_rewind Rewind midi playback
cmx_audfmt_fforward Fast forward midi playback
cmx_audfmt_tune Adjust midi playback tune
cmx_audfmt_tempo Adjust midi playback tempo
cmx_audfmt_ringer Play a midi ring
cmx_audfmt_get_time Calculate the play time of a file
7

3-54 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.5.3.13 Bluetooth interface module (bt.c)


2

NOTE This section was added to this revision of the document.


3

4 BT requires all of its clients to register themselves and to provide callback functions for different
5 types of events. The Bluetooth task contains the implementation of the Bluetooth protocol stack and
6 provides an interface for applications to do a variety of Bluetooth functions.

7 Table 3-52 BT interface service routines


Service routine Description
bt_cmd_dc_set_hci_mode Enter HCI mode
bt_cmd_dc_set_bd_addr Set handset device address
bt_cmd_dc_get_bd_addr Get handset device address
bt_cmd_ec_get_application_id Init for client and get id
bt_cmd_ec_register_event_set Register for events and specify callback
bt_cmd_ec_unregister_event_set Unregister for events
bt_cmd_ec_free_application_id Free all resources associated with this client
bt_cmd_ag_enable Enable audio gateway
bt_cmd_ag_ring_headset Ring the bluetooth headset
bt_cmd_ag_audio_connect Establish audio connection with bluetooth headset
bt_cmd_ag_audio_disconnect Disable the audio connection with the bluetooth
headset
bt_cmd_ag_disable Disable audio gateway
bt_cmd_sd_start_device_discovery Begin query for bluetooth devices
bt_cmd_sd_stop_device_discovery Abort query for bluetooth devices
bt_cmd_sd_get_device_name Get the name of a bluetooth device
bt_cmd_sd_send_service_search_req Search for a Bluetooth device with a specified
service
bt_cmd_sd_send_service_attribute_req Search for a Bluetooth device with a specified
attribute
bt_cmd_sd_search_service Get one or more parameters
8

80-V0280-1 X4 QUALCOMM Proprietary 3-55


Design DMSS User Interface

1 3.6 Features
2 In the following sections, “Storage” refers to NV storage. Both, Mobile and Portable provide the
3 detail with regard to which system will have the feature.

4 3.6.1 Basic call features

5 Table 3-53 Basic call features

Feature Operation Storage


Answering a call Call received rings phone. —
Any key except END, PWR, or arrow keys answers the call.
SEND answers the call from anywhere in the state machine
Auto-hyphenation Automatic insertion of hyphens in phone numbers during entry NV_AUTO_HYPHEN_I
and display.
Auto-retry Continue to attempt the call when the system is busy. NV_AUTO_RETRY_I
Auto-redial will automatically do this on reorder, intercept or
abbreviated alert. It cannot detect a busy signal. It relies on
the status of the base stations.
Adjustable interval in 10-second steps.
Calls in absence Calls received in absence, when paging is not on, are tallied NV_PAGE_MSG_I
and displayed.
Direct dialing Enter up to 32 digits, press send, phone makes call.
Horn alert Sound horn on incoming call. NV_HORN_ALERT_I
6

7 3.6.2 Call-in-progress features

8 Table 3-54 Call-in-progress features


Feature Operation Storage
DTMF dialing DTMF operation during call. String recall and send. —
Flash with Send takes whatever is in the display and passes it to the —
information Main Control Task.
Minute timer tone Beep 10 seconds before the end of each minute of a call. NV_CALL_BEEP_I
Mute Mute the microphone during a call. Route the output to the —
hands-free speaker.
Page in call Accept pages while in call. Requires switch support. NV_PAGE_MSG_I
Service Area Alert Beep when entering/changing/exiting service area. NV_SVC_AREA_ALERT_I
Silent Pad Allow entry of numbers without DTMFs during the call. —
9

3-56 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.6.3 Calling numbers features

2 Table 3-55 Calling numbers features

Feature Operation Storage


Alphanumeric recall Alphanumeric recall of stored numbers NV_DIAL_I
Most recently called Recall the last 10 numbers called on a stack NV_STACK_I, array of 10
name/number pairs
Number recall Recall one of the above numbers with the RCL NV_DIAL_I
key
Safety dialing Emergency services dialing (for example, 911) will NV_DIAL_I
always work, even if the phone is locked.
Scrolling recall Recall numbers by pressing recall and scrolling. NV_STACK_I
Secret numbers A series of locations that will not display the NV_DIAL_I
stored numbers when they are recalled.
Speed dial Hold down a digit to call a number at that stored NV_STACK_I or NV_DIAL_I
memory location, press SEND for the last called
number, or press a digit then SEND.
Stored numbers Allow storage of numbers in memory locations 0 NV_DIAL_I
to 99 and SD1, SD2, SD3.
3

4 3.6.4 Extra features

5 Table 3-56 Extra features

Feature Operation Storage


Debug “DM in a Handset.” Peek, poke, I/O ports, channel set, and —
whatever else is necessary. No temporal analyzer is planned at
this time. This will be protected by a security code.
Pages Act as a pager – save DTMFs entered and call time. Page recall on NV_PAGE_MSG_I
demand, autodial, and scrolling.
6

80-V0280-1 X4 QUALCOMM Proprietary 3-57


Design DMSS User Interface

1 3.6.5 Information displays

2 Table 3-57 Information displays


Feature Operation Storage
Air time Cumulative-call timer, can be reset. NV_AIR_TIMER_I
Battery display Show remaining battery strength. Warning if the battery is low on —
power-up.
Idle display Display signal strength and idle banner for idle. NV_BANNER_I
Portable: Show battery strength as well.
Life time Life time call timer, cannot be reset. NV_LIFE_TIMER_I
Power display Keep signal strength indicator updated. —
Mobile: Update annunciators at all times.
Portable: Display an idle screen and call-in-progress screen.
Last call time Elapsed time of the last call made. NV_CALL_TIMER_I
3

4 3.6.6 Restrictions

5 Table 3-58 Restrictions


Feature Operation Storage
Phone lock Lock phone so that only emergency dialing may be NV_LOCK_CODE_I is lock code,
done NV_LOCK_I is if locked
Auto lock Automatically lock phone on power off NV_AUTO_LOCK_I
Call restrictions Set restrictions on calls that can be made NV_CALL_RSTRC_I
Security code Security code for special phone features NV_SEC_CODE_I
6

7 3.6.7 System information

8 Table 3-59 System information

Feature Operation Storage


CDMA display CDMA call information. Error rates, current cell, —
handoff status. Debugging only.
Preferred system select Select system preferences for NAMs. NV_PREF_MODE_I
System display Show current system ID. Debugging only. —
Select NAM manually Select NAMs manually. NV_AUTO_NAM_I
Select NAM on roam Select the correct NAM automatically when NV_AUTO_NAM_I
roaming.
Show Own Number Display your own phone number. NV_MIN1_I, NV_MIN2_I
9

3-58 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

1 3.6.8 User preferences

2 Table 3-60 User preferences

Feature Operation Storage


Auto-answer Automatically answer the phone after x number of NV_AUTO_ANSWER_I
rings, hands-free mode.
Continuous/burst DTMF Generate continuous DTMFs as long as keys are held NV_CONT_KEY_DTMF_I
down, or generate burst DTMFs of uniform length.
Display brightness Adjust the brightness of the display. NV_BRIGHT_I
DTMF string-tone time Choose continuous or burst string DTMFs. Simulate it NV_CONT_STR_DTMF_I
in Analog.
DTMF volume Volume of the beep when a key is pressed. NV_BEEP_LVL_I
Earpiece volume Volume of the handset earpiece. NV_EAR_I
Ringer volume Volume of the ringing phone. NV_RINGER_LVL_I
Speaker volume Volume of the speaker (hands-free). NV_SPEAKER_LVL_I
3

80-V0280-1 X4 QUALCOMM Proprietary 3-59


Design DMSS User Interface

1 3.7 Sequence diagrams


2 This section contains several sequence diagrams, which show the interaction between the UI and the
3 CM tasks. The diagrams in this section include:
4 ■ Voice call setup and mobile release
5 ■ Voice call setup and base station release
6 ■ Failed voice call setup
7 ■ Incoming voice call

UI CM

IDLE

CM_CALL_CMD_ORIG()

ORIGINATION

UI_CALL_CONNECTED_F

CONVERSATION

CM_CALL_CMD_END

IDLE

9 Figure 3–2 Voice call setup and mobile release

3-60 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Design

UI CM

IDLE

CM_CALL_CMD_ORIG()

ORIGINATION

UI_CALL_CONNECTED_F

CONVERSATION

UI_CALL_RELEASE_F

IDLE

2 Figure 3–3 Voice call setup and base station release

80-V0280-1 X4 QUALCOMM Proprietary 3-61


Design DMSS User Interface

UI CM

ORIGINATION

UI_REORDER_F
or
UI_INTERCEPT_F
or
UI_CALL_FADE_F

IDLE

2 Figure 3–4 Failed voice call setup

UI CM

IDLE

UI_INCOMING_CALL_F

INCOMING

CM_CALL_CMD_ANSWER()

UI_CALL_CONNECTED_F

CONVERSATION

4 Figure 3–5 Incoming voice call

3-62 QUALCOMM Proprietary 80-V0280-1 X4


4 Modification examples

1 4.1 Adding UI test menus

2 4.1.1 Purpose
3 A new menu can be added to the main menu for testing various phone functions. Within this new
4 menu there can be several sub-menus, each of which performs a testing function in a specific area,
5 such as SMS.

6 4.1.2 Requirements
7 After the addition of the test menus, the following key sequences can be performed to run the tests:
8 1. Make sure that the main screen is displayed. If not, press “Clear” until the screen reaches the
9 main screen.
10 2. Press the MENU soft key. The screen will show the list of main menu items. Scroll down the
11 menu list to view more items.
12 3. Press the number key (such as “8”) that matches the menu item “Tests.” The following menu
13 appears:
1. SMS
2. BC SMS
3. Call Mngr
4. Sound
5. NV
6. UI
7. Analog HFK
8. Bluetooth
9. Other
14

15 4. Press “1” (SMS) to go to the SMS test menu. The following menu appears:
1. Send Msg
2. Get Status
3. Clear All
4. SMS Call
16

80-V0280-1 X4 QUALCOMM Proprietary 4-1


Modification examples DMSS User Interface

1 5. Press “1” (Send Msg). The following menu appears:


1. Send Msg 1
2. Send Msg 2
3. Send Msg 3
4. Send Msg 4
5. Send Msg 5
2

3 6. Press “1” (Send Msg 1). The message “--Msg sent--” is displayed. An SMS message is sent over
4 the access channel if the phone is not in a call, or sent over the traffic channel if the phone is in a
5 call. The screen will return to the previous screen display after 3 seconds.
6 7. Press “Clear” to return to the SMS test menu as in Step 4 above.
7 8. Press “2” (Get Status). The following menu appears:
1. Status 1
2. Status 2
3. Status 3
4. Status 4
5. Status 5
8

9 9. Press “1” (Status 1). The screen will display the status of the message that was just sent. The
10 screen will return to the previous screen display after two seconds.
11 10. Press “Clear” to return to the SMS test menu as in Step 4.
12 11. Press “3” (Clear All). The message “Clearing statuses of all msgs” is displayed. The screen will
13 return to the previous screen display after two seconds.
14 12. Press “4” (SMS Call). The following menu appears:
1. Originate
2. Auto-D ON
3. Auto-D OFF
15

16 13. Press “1” (Originate). The phone will originate an SMS call to the base station. Once the call is
17 connected, the screen will return to the main screen and update the time duration of the call.
18 14. During the call, the user can select the above test menus to perform test functions. For example,
19 the user can send SMS messages over the traffic channel during the SMS call.
20 15. Press “END” to end the call.
21 16. The user can select “Auto-D ON” or “Auto-D OFF” in the “SMS Call” menu as in Step 12 to
22 enable or disable the feature of automatically disconnecting the SMS call if there is no SMS
23 message sent or received within 60 seconds. This menu should be executed before an SMS call is
24 made.
25 Other menu items can be exercised using sequences that are similar to the sequence above.

4-2 QUALCOMM Proprietary 80-V0280-1 X4


DMSS User Interface Modification examples

1 4.1.3 Software modifications

2 4.1.3.1 uiumenu.c

3 In const uimenu_entry_type main_menu [], add a new item as follows:


4 { (byte *)" :Tests ", TRUE, NULL, ( &tests_menu_tier ) }
5 This will add a new item to the main menu on the screen.

6 4.1.3.2 uiutstmn.c

7 This is a newly created file that contains all of the menu and function definitions for the test menus. It
8 has the following parts:

9 Message texts
10 All text strings used for displaying messages in the test menus are defined here. For example, the
11 following text string is for showing the status of a message:
12 const char uintstmn_msg_sms_status_ok_txt[] =
13 "*MSG STATUS* - OK - ";

14 Functions
15 All functions that will be called for menu actions are defined here. A typical function performs the
16 action requested by the user (such as sending a message), and displays a message (such as
17 “--Msg sent--“).

18 Menus
19 All menus/sub-menus are defined here. For example, the menu for SMS calls is as follows:
20

const uimenu_entry_type sms_test_menu [] =


{
/* item 0 of array */
{ (byte *)NULL, TRUE, NULL, NULL },
{ (byte *)" :Send Msg ", TRUE, NULL, & sms_send_menu_tier },
{ (byte *)" :Get Status", TRUE, NULL, & sms_get_menu_tier },
{ (byte *)" :Clear All ", FALSE, uintstmn_sms_clear_all, NULL },
{ (byte *)" :SMS Call ", TRUE, NULL, & sms_call_menu_tier }
};
uimenu_tier_type sms_test_menu_tier =
{
"SMS TEST ",
(void*) sms_test_menu,
sizeof(sms_test_menu) / sizeof(uimenu_entry_type)
};
21

80-V0280-1 X4 QUALCOMM Proprietary 4-3


Modification examples DMSS User Interface

1 4.1.3.3 uiutxt.c

2 In const ui_field_type ui_field_array[ ( (int)UI_DUMMY_F+1)], add an item at the end


3 for each of the new messages to be displayed, as follows:
4 235, 0, 0, FALSE, (UI_WIDE*4)+1, (byte*)ui_sms_sent_rstr,
5 /* UI_MSG_SMS_SENT_F */

6 4.1.3.4 uismenu.c

7 Add a function to display a message on the screen for a period of time and then return to the previous
8 screen.
9

void uinsmenu_display_msg
(
ui_field_item_enum_type msg_id,
byte seconds
)
{
/* Display message for seconds */
ui.msglen = seconds * 1000; // milli-seconds
ui.msg = msg_id;
ret_state = UI_MESSAGE_S;
state = MSGMENU_S ; /* so we will re-display menu */
}
10

11 4.1.3.5 uiutxti.h

12 In ui_field_item_enum_type, add a literal for each of the new messages created, as follows:
13 UI_MSG_SMS_SENT_F, /* SMS msg sent */

14 4.1.3.6 Other files

15 The following header files may need to be changed to declare the new data and the functions that are
16 introduced:
17 ■ uiumenu.h
18 ■ uiutstmn.h
19 ■ uiutxt.h

4-4 QUALCOMM Proprietary 80-V0280-1 X4

You might also like