This component is a port of the original remo2hbo SpO2 firmware. It controls the analog filters and uses the ESP internal ADCs to sample the output.
Instantiate the SpO2 task & queue and initialize them to start the task.
#include "spo2.h"
static uint8_t spo2_queue_buffer[SPO2_QUEUE_BUFFER_SIZE];
static StackType_t spo2_task_stack[SPO2_TASK_STACK_SIZE];
_spo2_queue spo2_queue = {
.length = SPO2_QUEUE_LENGTH,
.item_size = SPO2_QUEUE_ITEM_SIZE,
.buffer = spo2_queue_buffer
};
_spo2_task spo2_task = {
.name = SPO2_TASK_NAME,
.priority = tskIDLE_PRIORITY,
.stack = spo2_task_stack
};
#include "spo2.h"
void app_main() {
spo2_init(&spo2_task, &spo2_queue);
}