Renesas M3T-MR100 用户手册
![Renesas](https://files.manualsbrain.com/attachments/59153266feca598c11e08bf1f143ccfcf45441a4/common/fit/150/50/d3d06de51d338eb4f916b44a9629f9d48697a59cd7344be40cf24bae01c5/brand_logo.gif)
- 208 -
#include <itron.h>
#include <kernel.h>
#include "kernel_id.h"
void main() /* main task */
{
#include <kernel.h>
#include "kernel_id.h"
void main() /* main task */
{
printf("LBP start simulation \n");
sta_tsk(ID_idle,1);
/* activate idle task */
sta_tsk(ID_image,1);
/* activate image expansion task */
sta_tsk(ID_printer,1); /* activate printer engine task */
}
void image() /* activate image expansion task */
{
void image() /* activate image expansion task */
{
while(1){
wai_flg(ID_pagein,waiptn,TWF_ANDW, &flgptn);/* wait for 1-page input */
printf(" bit map expansion processing \n");
wup_tsk(ID_printer);
/* wake up printer engine task */
}
}
void printer() /* printer engine task */
{
void printer() /* printer engine task */
{
while(1){
slp_tsk();
printf(" printer engine operation \n");
}
}
void sent_in() /* Centronics interface handler */
{
void sent_in() /* Centronics interface handler */
{
/* Process input from Centronics interface */
if ( /* 1-page input completed */ )
iset_flg(ID_pagein,setptn);
}
Figure 6.2 Program Example
6.2.2
Configuration File Preparation
Create a configuration file which has defined in it the task entry address, stack size, etc. Use of the GUI configurator avail-
able for MR100 helps to create a configuration file easily without having to learn how to write it.
able for MR100 helps to create a configuration file easily without having to learn how to write it.
shows an example configuration file for a laser beam printer simulation program (filename "lbp.cfg").