source: soft/tp14/correction/main.c @ 85

Last change on this file since 85 was 42, checked in by alain, 13 years ago

Improving the _barrier_init function in drivers.c

File size: 656 bytes
Line 
1
2#include "stdio.h"
3
4int main()
5{
6    int i;
7    char        byte;
8
9    if( timer_set_period(0, 500000) ) 
10    {
11        tty_puts("echec timer_set_period\n");
12        exit();
13    }
14    if( timer_set_mode(0,0x3) )
15    {
16        tty_puts("echec timer_set_mode\n");
17        exit();
18    }
19    for( i=0 ; i<1000 ; i++ )
20    {
21        if( tty_printf(" hello world : %d\n",i) )
22        {
23            tty_puts("echec tty_printf\n");
24            exit();
25        }
26        if( tty_getc_irq((void*)&byte) )
27        {
28            tty_puts("echec tty_getc_irq\n");
29            exit();
30        }
31        if(byte == 'q') exit();
32    }
33
34    exit();
35
36    return 0;
37} // end main
38
Note: See TracBrowser for help on using the repository browser.