LEDDriver_NXP_Arduino 0.5.3
LED driver device operation sample code for Arduino
Loading...
Searching...
No Matches
GradationControl.h
1
8#ifndef ARDUINO_GRADATION_CONTROL_NXP_ARD_H
9#define ARDUINO_GRADATION_CONTROL_NXP_ARD_H
10
11#include <LEDDriver.h>
12
21{
22public:
23
25 enum control : int
26 {
27 STOP,
28 DUMMY,
29 ONE_SHOT,
30 CONTINUOUS,
31 };
32
34 float cycle;
35
42 GradationControl( PCA995x* devp, int num_group, uint32_t bitmap = 0x0000 );
43
45 virtual ~GradationControl();
46
59 float set_gradation( float max_iref, float time, bool up = true, bool down = true, float on = 0.0, float off = 0.0, bool hold_on = true, bool hold_off = true );
60
65 void gradation_group_assign( uint32_t bitmap );
66
71 void add_channel( uint8_t ch );
72
77 void gradation_channel_enable( uint32_t bitmap );
78
83 void control( int ctrl );
84
89 void start( bool continuous = true );
90
92 void stop( void );
93
94private:
95 PCA995x* devp;
96 const int group;
97 static const float HOLDTIME[];
98};
99
100#endif // ARDUINO_GRADATION_CONTROL_NXP_ARD_H
void start(bool continuous=true)
void gradation_channel_enable(uint32_t bitmap)
void gradation_group_assign(uint32_t bitmap)
void add_channel(uint8_t ch)
float set_gradation(float max_iref, float time, bool up=true, bool down=true, float on=0.0, float off=0.0, bool hold_on=true, bool hold_off=true)