Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

adds/app/term

Explain how to use term driver.

 //register TERM device
 if (NutRegisterDevice(&devTerm0, 0, 0)) {
 NutPrintFormat(0, "Registering term device failed.\r\n");
 } else {
 NutPrintFormat(0, "Registering term device sucess.\r\n");
 }

 //open TERM
 devTerm = NutDeviceOpen("term0");
 //init TERM
 (*devTerm->dev_init)(devTerm);

 //set reading time interwal for TERM
 SetReadTempInterval(devTerm, 1);

 NutSleep(1000);
 //read temperature
 float f = ReadTemp(devTerm);


Generated on Thu Jan 30 22:30:43 2003 for EduNet by doxygen1.2.18