/***************************************************************/ /* */ /* PROJECT NAME : RL78G10_14PIN__0001 */ /* FILE : RL78G10_14PIN__0001.c */ /* DESCRIPTION : Main Program */ /* */ /* This file was generated by e2 studio. */ /* */ /***************************************************************/ #include "iodefine.h" #ifdef CPPAPP //Initialize global constructors extern void __main() { static int initialized; if (! initialized) { typedef void (*pfunc) (); extern pfunc __ctors[]; extern pfunc __ctors_end[]; pfunc *p; initialized = 1; for (p = __ctors_end; p > __ctors; ) (*--p) (); } } #endif int main(void) { #define PMC0_TMP (*(volatile unsigned char *)0xF0060) #define PM0_TMP (*(volatile unsigned char *)0xFFF20) #define P0_TMP (*(volatile unsigned char *)0xFFF00) unsigned int lp,lp1; PMC0_TMP=0b00000000; PM0_TMP =0b00000000; P0_TMP =0b00000000; while(1) { for(lp=0;lp<1000;lp++) for(lp1=0;lp1<10;lp1++) asm("nop"); P0_TMP=0b11111111; for(lp=0;lp<1000;lp++) for(lp1=0;lp1<10;lp1++) asm("nop"); P0_TMP=0b00000000; } return 0; }