DualLedController/components/LedController/LedController.h

16 lines
344 B
C
Raw Normal View History

2024-05-17 01:08:15 +08:00
#ifndef __LEDCONTROLLER_H__
#define __LEDCONTROLLER_H__
#include <driver/ledc.h>
class LedController {
public:
static LedController *instance();
bool initialize();
void setDuty(int32_t channel, int32_t duty);
protected:
LedController();
ledc_channel_config_t m_channels[2];
};
#endif // __LEDCONTROLLER_H__