forked from xuos/xiuos
Fix tests for edu-riscv64 textbook and edu-arm32 textbook
This commit is contained in:
@@ -28,10 +28,14 @@ void TvocTb600bTvoc10(void)
|
||||
{
|
||||
struct SensorQuantity *tvoc = SensorQuantityFind(SENSOR_QUANTITY_TB600B_TVOC, SENSOR_QUANTITY_TVOC);
|
||||
SensorQuantityOpen(tvoc);
|
||||
int32_t result = 0;
|
||||
|
||||
result = SensorQuantityReadValue(tvoc);
|
||||
for(int i = 0; i < 10;i++)
|
||||
{
|
||||
PrivTaskDelay(1000);
|
||||
SensorQuantityReadValue(tvoc);
|
||||
}
|
||||
|
||||
printf("tvoc concentration is : %dppb\n", result);
|
||||
SensorQuantityClose(tvoc);
|
||||
}
|
||||
}
|
||||
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0),tvoc, TvocTb600bTvoc10, read data from tvoc sensor);
|
||||
Reference in New Issue
Block a user