Changeset 264 for soft/giet_vm/router/main.c
- Timestamp:
- Dec 19, 2013, 10:13:04 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/router/main.c
r191 r264 27 27 } 28 28 29 // main loop : display token value = departure index29 // main loop : display token value = source index 30 30 for(n = 0 ; n < NMAX ; n++) 31 31 { … … 75 75 __attribute__ ((constructor)) void router() 76 76 { 77 unsigned int buf [2];77 unsigned int buf; 78 78 unsigned int x; 79 79 unsigned int tempo; … … 108 108 while(1) 109 109 { 110 mwmr_read( mwmr_in , buf , 2);110 mwmr_read( mwmr_in , &buf , 1 ); 111 111 tempo = giet_rand() >> 6; 112 112 for ( x = 0 ; x < tempo ; x++ ) asm volatile (""); 113 giet_tty_printf( "token value : %d / temporisation = %d\n", buf[0], tempo); 114 giet_tty_printf( "token value : %d / temporisation = %d\n", buf[1], tempo); 115 mwmr_write( mwmr_out, buf , 2 ); 113 giet_tty_printf( "token value : %d / temporisation = %d\n", buf, tempo); 114 mwmr_write( mwmr_out, &buf , 1 ); 116 115 } 117 116 }
Note: See TracChangeset
for help on using the changeset viewer.