16 lines
344 B
C
16 lines
344 B
C
|
#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__
|