LEDDriver_NXP_Arduino 0.5.0
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
57 float set_gradation( float max_iref, float time, bool up = true, bool down = true, float on = 0.0, float off = 0.0 );
58
63 void gradation_group_assign( uint32_t bitmap );
64
69 void add_channel( uint8_t ch );
70
75 void gradation_channel_enable( uint32_t bitmap );
76
81 void control( int ctrl );
82
87 void start( bool continuous = true );
88
90 void stop( void );
91
92private:
93 PCA995x* devp;
94 const int group;
95 static const float HOLDTIME[];
96};
97
98#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)
virtual ~GradationControl()
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)