Last change
on this file since 43 was
42,
checked in by alain, 14 years ago
|
Improving the _barrier_init function in drivers.c
|
File size:
656 bytes
|
Rev | Line | |
---|
[14] | 1 | |
---|
| 2 | #include "stdio.h" |
---|
| 3 | |
---|
| 4 | int main() |
---|
| 5 | { |
---|
[42] | 6 | int i; |
---|
| 7 | char byte; |
---|
[14] | 8 | |
---|
[42] | 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) ) |
---|
[14] | 22 | { |
---|
[42] | 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 | } |
---|
[14] | 33 | |
---|
[42] | 34 | exit(); |
---|
[14] | 35 | |
---|
[42] | 36 | return 0; |
---|
[14] | 37 | } // end main |
---|
| 38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.