LEDDriver_NXP_Arduino
0.5.3
LED driver device operation sample code for Arduino
Loading...
Searching...
No Matches
src
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
20
class
GradationControl
21
{
22
public
:
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
94
private
:
95
PCA995x
* devp;
96
const
int
group;
97
static
const
float
HOLDTIME[];
98
};
99
100
#endif
// ARDUINO_GRADATION_CONTROL_NXP_ARD_H
GradationControl
Definition
GradationControl.h:21
GradationControl::start
void start(bool continuous=true)
Definition
GradationControl.cpp:170
GradationControl::stop
void stop(void)
Definition
GradationControl.cpp:175
GradationControl::gradation_channel_enable
void gradation_channel_enable(uint32_t bitmap)
Definition
GradationControl.cpp:87
GradationControl::gradation_group_assign
void gradation_group_assign(uint32_t bitmap)
Definition
GradationControl.cpp:101
GradationControl::~GradationControl
virtual ~GradationControl()
Definition
GradationControl.cpp:10
GradationControl::cycle
float cycle
Definition
GradationControl.h:34
GradationControl::add_channel
void add_channel(uint8_t ch)
Definition
GradationControl.cpp:125
GradationControl::control
control
Definition
GradationControl.h:26
GradationControl::set_gradation
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)
Definition
GradationControl.cpp:14
PCA995x
Definition
LEDDriver.h:95
Generated by
1.9.7