#include #include #include "mtask.h" #include "3048f.h" #include "initperi.h" #include "console.h" #include "debug.h" #include "lcd.h" #include "itu.h" #include "sio0.h" #include "sio1.h" #include "wastloop.h" #include "monitor.h" void LedLoop( void); //volatile char* const P4DR = ( char* )0xffffc7 ; void Led( int Status ) { if( Status == 0 ) { P4DR = ( P4DR ) | 0x40 ; } else { P4DR = ( P4DR ) & ( ~0x40 ) ; } } int main() { GetStack( 0 ) ;asm( "mov.l er0,sp");//マルチタスク用にスタックを初期化 InitDebugPort( PutcSio1 ) ; InitPeripheral() ; initITU() ; InitSioChannel1() ; //デバッグポート InitSioChannel0() ; //出力ポート InitPort9() ; EnableIRQ ; InitMultiTaskSystem() ; InitConsole() ; StartTask( 6, Monitor) ;//38400bps data8bit stop1bit pari-noneでモニターが動く StartTask( 1, LedLoop ) ; tprintf( "\n\nyajikita OK?" ) ; LcdLocate(1,0); printlcd( "next is doronjo"); for(;;){ LcdLocate(0,0); lcdprintf("yajikita OK %d", 100); Sleep(500); LcdLocate(0,0); lcdprintf(" "); Sleep(500); } } void LedLoop( void) { for(;;){ Led(1); Sleep(3000); Led(0); Sleep(1000); } }