X hits on this document

PDF document

February 10, 2006 - page 206 / 238

590 views

0 shares

0 downloads

0 comments

206 / 238

194

APPENDIX I. SAMPLE PROGRAM SHOWING EVENT SETUP

i f ( i p m i _ i s _ d i s c r e t e _ e v e n t _ s e t ( s t a t e s , i , d i v = ""; else r ) )

v=

" not";

printf(" i

,

bit %d %s was%s enabled\n",

i p m i _ g e t _ e v e n t _ d i r _ s t r i n g ( d i v); r ) ,

i p m i _ d i s c r e t e _ e v e n t _ s e t ( s d a t a - > e s , i , d i r ) ;

}

}

}

r v = i p m i _ s e n s o r _ s e t _ e v e n t _ e n a b l e s ( s e n s o r , s d a t a - event_set_done, sdata); if (rv) { printf("Error 0x%x enabling events for sensor %s\n", err, sdata->name); goto out_err; > e s ,

}

return;

r out_err: e l e a s e _ s d a t a ( s d a t a ) ;

}

static void t h r e s h o l d s _ s e t ( i p m i _ s e n s o r _ t * s e n s o r , i n t e r r , v o i d * c b _ d a t a { )

s d a t a _ t * s d a t a = c b _ d a t a ;

if (err) { printf("Error 0x%x setting thresholds for sensor %s\n", err, sdata->name); goto out;

}

printf("Thresholds set for sensor %s\n", sdata->name);

out: r e l e a s e _ s d a t a ( s d a t a ) ;

}

static void

Document info
Document views590
Page views590
Page last viewedTue Dec 06 09:42:18 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments