1.1 --- a/test/asic.c Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/test/asic.c Sun Jul 20 11:36:48 2008 +0000
1.7 + * Wait for either of 2 ASIC events.
1.8 + * @return the event id if the event occurred, otherwise -1 if the wait timed out.
1.10 +int asic_wait2( int event1, int event2 )
1.12 + int n1 = event1 >> 5;
1.13 + int n2 = event2 >> 5;
1.14 + unsigned int mask1 = (1<< (event1&0x1f));
1.15 + unsigned int mask2 = (1<< (event2&0x1f));
1.17 + for( i=0; i<TIMEOUT; i++ ) {
1.18 + if( long_read(ASIC_PIRQ(n1)) & mask1 ) {
1.21 + if( long_read(ASIC_PIRQ(n2)) & mask2 ) {
1.25 + return -1; /* Timeout */
1.29 * Clear all asic events