esp-who/examples/esp32-s3-eye/main/include/app_led.hpp

23 lines
383 B
C++
Raw Normal View History

2022-03-02 19:38:29 +08:00
#pragma once
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "freertos/task.h"
#include "driver/gpio.h"
2022-03-03 14:35:04 +08:00
#include "app_button.hpp"
2022-03-02 19:38:29 +08:00
#include "app_speech.hpp"
2022-03-03 14:35:04 +08:00
class AppLED : public Observer
2022-03-02 19:38:29 +08:00
{
private:
const gpio_num_t pin;
2022-03-03 14:35:04 +08:00
AppButton *key;
2022-03-02 19:38:29 +08:00
AppSpeech *sr;
public:
2022-03-03 14:35:04 +08:00
AppLED(const gpio_num_t pin, AppButton *key, AppSpeech *sr);
2022-03-02 19:38:29 +08:00
void update();
};