- 207 -
6.2 Development Procedure Example
This chapter outlines the development procedures on the basis of a typical MR100 application example.
6.2.1
Applications Program Coding
Figure 6.2 shows a program that simulates laser beam printer operations. Let us assume that the file describing the laser
beam printer simulation program is named lbp.c. This program consists of the following three tasks and one interrupt han-
dler.
•
Main Task
•
Image expansion task
•
Printer engine task
•
Centronics interface interrupt handler
This program uses the following MR100 library functions.
•
sta_tsk()
Starts a task. Give the appropriate ID number as the argument to select the task to be activated. When the ker-
nel_id.h file, which is generated by the configurator, is included, it is possible to specify the task by name (char-
acter string).
•
wai_flg()
Waits until the eventflag is set up. In the example, this function is used to wait until one page of data is entered into the
buffer via the Centronics interface.
•
wup_tsk()
Wakes up a specified task from the WAITING state. This function is used to start the printer engine task.
•
slp_tsk()
Causes a task in the RUNNING state to enter the WAITING state. In the example, this function is used to make
the printer engine task wait for image expansion.
•
iset_flg()
Sets the eventflag. In the example, this function is used to notify the image expansion task of the completion of
one-page data input.
39
The configurator converts the ID number to the associated name(character string) in accordance with the information entered int the con-
figuration file.
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...