
NO.:
W62410 API
VERSION:
A
PAGE
106
With the above command sequence we have moved the message pointer to the third message of the message list
which happens to be a ICM recording. We know that this is an ICM recording by checking the returned message type
parameter of the
ChangeMessagePtr
command. Therefore, we used this returned value as the input type
parameter for the
PlaybackMessage
command. After the CHIPSET has received the
ContPlaybackMessage
command, it will start playing back the ICM message. The current situation is as shown in the figure below with the
CHIPSET playing back ICM #2:
ICM
MEMO
ICM
MEMO
ICM
#1
#1
#2
#2
#3
We now consider the case that the user wants to delete the ICM #2, which he is currently hearing, played back. For
this, the following command sequence can be used.
API commands
Comments on API commands
The above information is the exclusive intellectual property of Winbond Electronics and shall not be
disclosed, or reproduced without permission from Winbond.
MEMO
#3
Most important
returned values
Comments on returned
values
Playback of ICM #2
message is now stopped.
Idle(0, 0, 0)
Stop playback, return in Idle mode
Power-down:
Garbage:
Stages:
Delete message
Type of message:
OGM id:
All messages:
No
No
Not relevant
DeleteMessage(0, 0, 0)
ICM = 0
Not relevant
No
M = 1
We have to remember from
the
ChangeMessagePtr
command, which type of
message has to be deleted
and that has to be passed
through as a argument to the
DeleteMessage
command (in
this case a ICM).
There is at least one message
left over after deleting this
message as indicated by the
“M” flag.
The new messages list, which is maintained by the CHIPSET, is shown in the figure below. As you can see the
CHIPSET will now have moved the message pointer to the next available message of the same type of which we just
have deleted (in this case an ICM message). Therefore, if you would now continue with the playback of the rest of all
the messages using the same command sequence as before the MEMO #2 message would not be played back.
ICM
MEMO
MEMO
ICM
MEMO
#1
#1
#2
#2
#3
A possible workaround to avoid this problem is to manage by yourself a skip counter in the background of your own
application. When using this method, the most important things to remember are:
Always reset the skip counter to zero when skipping to the first message of the list.
Increment by one when skipping one message forward.
Decrement by one when skipping one message backward.
In this example, before deletion and after skip counter reset to zero, the number of
ChangeMessagePtr
commands
called is two. In that way and once deletion has been executed, you just have to execute the following command
sequence:
Jump to the first message (ICM or Memo) of the list and reset the skip counter to zero.
Skip 2 messages (ICM or Memo) forward.
Start new playback