source: soft/giet_vm/hello/main.c @ 352

Last change on this file since 352 was 297, checked in by alain, 11 years ago

Bug fix in both _tty_rx_isr() and _bdv_isr():
The ISR must do nothing it the status indicates that
there is no pending ISR.

File size: 670 bytes
RevLine 
[191]1#include "stdio.h"
[295]2#include "hard_config.h"
[191]3
4__attribute__((constructor)) void main()
5{
6        char                byte;
[295]7    unsigned int    procid     = giet_procid();
8    unsigned int    cluster_xy = procid/NB_PROCS_MAX;
9    unsigned int    lpid       = procid%NB_PROCS_MAX;
10    unsigned int    x          = cluster_xy >> Y_WIDTH;
11    unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
12
13    giet_tty_printf( "*** Starting task hello on processor[%d,%d,%d] at cycle %d\n\n", 
14                      x, y, lpid, giet_proctime() );
15
[199]16        while (1)
[191]17        {
[295]18                giet_tty_printf(" hello world\n");
[199]19        giet_tty_getc((void*)&byte);
[191]20        if ( byte == 'q' ) giet_exit();
21        }
22} // end main
23
Note: See TracBrowser for help on using the repository browser.