Files
OpenIris-ESPIDF/components/SerialManager/SerialManager/SerialManager.hpp
Lorow b7bae7fb3e Add Proof of concept switching between UVC and Wi-Fi streaming based on the presence of Wi-Fi creds, rewrite restart task to esp_timer
TODO: Think about letting people set the mode explicitly so the board comes online faster
2025-05-20 23:09:06 +02:00

34 lines
776 B
C++

#pragma once
#ifndef SERIALMANAGER_HPP
#define SERIALMANAGER_HPP
#include <stdio.h>
#include <string>
#include <memory>
#include <CommandManager.hpp>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/uart.h"
#include "esp_log.h"
#include "driver/gpio.h"
#include "driver/usb_serial_jtag.h"
#include "esp_vfs_usb_serial_jtag.h"
#include "esp_vfs_dev.h"
class SerialManager
{
public:
explicit SerialManager(std::shared_ptr<CommandManager> commandManager, esp_timer_handle_t *timerHandle);
void setup();
void try_receive();
private:
std::shared_ptr<CommandManager> commandManager;
esp_timer_handle_t *timerHandle;
uint8_t *data;
uint8_t *temp_data;
};
void HandleSerialManagerTask(void *pvParameters);
#endif