forked from xuos/xiuos
Merge branch 'prepare_for_master' of https://gitlink.org.cn/xuos/xiuos into prepare_for_master
This commit is contained in:
@@ -24,23 +24,10 @@
|
||||
#include "lv_demo_calendar.h"
|
||||
#include <transform.h>
|
||||
|
||||
// extern void lv_example_chart_2(void);
|
||||
// extern void lv_example_img_1(void);
|
||||
// extern void lv_example_img_2(void);
|
||||
// extern void lv_example_img_3(void);
|
||||
// extern void lv_example_img_4(void);
|
||||
// extern void lv_example_line_1(void);
|
||||
extern void lv_example_xiuos(void);
|
||||
extern void lv_example_show(void);
|
||||
void* lvgl_thread(void *parameter)
|
||||
{
|
||||
/* display demo; you may replace with your LVGL application at here */
|
||||
// lv_demo_calendar();
|
||||
// lv_example_img_1();
|
||||
// lv_example_chart_2();
|
||||
// lv_example_table_1();
|
||||
// lv_example_line_1();
|
||||
lv_example_xiuos();
|
||||
/* handle the tasks of LVGL */
|
||||
lv_example_show();
|
||||
while(1)
|
||||
{
|
||||
lv_task_handler();
|
||||
@@ -53,7 +40,7 @@ static int lvgl_demo_init(void)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
attr.schedparam.sched_priority = 25;
|
||||
attr.stacksize = 4096;
|
||||
attr.stacksize = 8192;
|
||||
|
||||
PrivTaskCreate(&lvgl_task, &attr, lvgl_thread, NULL);
|
||||
|
||||
|
||||
@@ -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