mirror of
https://git.aixiao.me/aixiao/Danger-alarm.git
synced 2025-07-29 19:13:39 +08:00
FreeRTOS Add Boot Time
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "ZE07CO.hpp"
|
||||
#include "MHZ14B.hpp"
|
||||
#include "HC-12.hpp"
|
||||
#include "boot_time.hpp"
|
||||
|
||||
#ifndef PICO_DEFAULT_LED_PIN
|
||||
#warning pio/hello_pio example requires a board with a regular LED
|
||||
@@ -109,6 +110,7 @@ int main(int argc, char *argv[])
|
||||
TaskHandle_t CH4_xHandle = NULL;
|
||||
TaskHandle_t CO_xHandle = NULL;
|
||||
TaskHandle_t CO2_xHandle = NULL;
|
||||
TaskHandle_t BOOT_TIME_xHandle = NULL;
|
||||
|
||||
|
||||
// 板载CPU温度
|
||||
@@ -146,6 +148,12 @@ int main(int argc, char *argv[])
|
||||
if (xReturned == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY) {
|
||||
printf("CO2() Task Error!");
|
||||
}
|
||||
|
||||
// Boot Time
|
||||
xReturned = xTaskCreate(BOOT_TIME, "BOOT_TIME task", 512, NULL, tskIDLE_PRIORITY, &BOOT_TIME_xHandle);
|
||||
if (xReturned == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY) {
|
||||
printf("CO2() Task Error!");
|
||||
}
|
||||
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
Reference in New Issue
Block a user