Library to handle the X-NUCLEO-LED61A1 LED Control Expansion Board based on the LED6001 component.
Dependents:
LedDimming_LED61A1_mbedOS
HelloWorld_LED61A1_mbedOS
LedDimming_LED61A1
HelloWorld_LED61A1
... more
Fork of
X_NUCLEO_LED61A1
by ST Expansion SW Team
« Back to documentation index
Led6001 Class Reference
Class representing a LED6001 component.
More...
#include <Led6001.h >
Inherits Led .
Public Member Functions
Led6001 (PinName xfault_irq, PinName current, PinName pwm, PinName analog)
Constructor.
virtual ~Led6001 (void)
Destructor.
virtual int init (void *init=NULL)
Initializing the component.
virtual int read_id (uint8_t *id=NULL)
Getting the ID of the component.
virtual float get_current (void)
Getting the current flowing through the LED.
virtual void set_pwm_dimming (float dimming)
Setting PWM dimming value.
virtual void set_analog_dimming (float dimming)
Setting Analog dimming value.
virtual void power_on (void)
Powering ON at maximum light intensity.
virtual void power_off (void)
Powering OFF.
virtual void start_up (void)
Starting-up the component.
void attach_xfault_irq (void(*fptr)(void))
Attaching an interrupt handler to the XFAULT interrupt.
void enable_xfault_irq (void)
Enabling the XFAULT interrupt handling.
void disable_xfault_irq (void)
Disabling the XFAULT interrupt handling.
Detailed Description
Class representing a LED6001 component.
Definition at line 101 of file Led6001.h .
Constructor & Destructor Documentation
Led6001
(
PinName
xfault_irq ,
PinName
current ,
PinName
pwm ,
PinName
analog
)
Constructor.
Parameters:
xfault_irq pin name of the XFAULT pin of the component.
current pin name of the ADC pin of the component responsible for sensing the current flowing through the LED.
pwm pin name of the PWM pin of the component.
analog pin name of the Analog pin of the component.
Definition at line 115 of file Led6001.h .
virtual ~Led6001
(
void
)
[virtual]
Member Function Documentation
void attach_xfault_irq
(
void(*)(void)
fptr )
Attaching an interrupt handler to the XFAULT interrupt.
Parameters:
fptr An interrupt handler.
Return values:
Definition at line 289 of file Led6001.h .
void disable_xfault_irq
(
void
)
Disabling the XFAULT interrupt handling.
Parameters:
Return values:
Definition at line 309 of file Led6001.h .
void enable_xfault_irq
(
void
)
Enabling the XFAULT interrupt handling.
Parameters:
Return values:
Definition at line 299 of file Led6001.h .
virtual float get_current
(
void
)
[virtual]
Getting the current flowing through the LED.
Parameters:
Return values:
The current flowing through the LED, represented as a floating point number in the range [0.0, 1.0].
Implements Led .
Definition at line 186 of file Led6001.h .
virtual int init
(
void *
init = NULL
)
[virtual]
Initializing the component.
Parameters:
init Pointer to device specific initalization structure.
Return values:
0 in case of success, an error code otherwise.
Implements Component .
Definition at line 161 of file Led6001.h .
virtual void power_off
(
void
)
[virtual]
Powering OFF.
Parameters:
Return values:
Definition at line 233 of file Led6001.h .
virtual void power_on
(
void
)
[virtual]
Powering ON at maximum light intensity.
Parameters:
Return values:
Definition at line 222 of file Led6001.h .
virtual int read_id
(
uint8_t *
id = NULL
)
[virtual]
Getting the ID of the component.
Parameters:
id Pointer to an allocated variable to store the ID into.
Return values:
0 in case of success, an error code otherwise.
Implements Component .
Definition at line 175 of file Led6001.h .
virtual void set_analog_dimming
(
float
dimming )
[virtual]
Setting Analog dimming value.
Parameters:
dimming Analog dimming value, represented as a floating point number in the range [0.0, 1.0].
Return values:
Implements Led .
Definition at line 210 of file Led6001.h .
virtual void set_pwm_dimming
(
float
dimming )
[virtual]
Setting PWM dimming value.
Parameters:
dimming PWM dimming value, represented as a floating point number in the range [0.0, 1.0].
Return values:
Implements Led .
Definition at line 197 of file Led6001.h .
virtual void start_up
(
void
)
[virtual]
Starting-up the component.
Parameters:
Return values:
Definition at line 244 of file Led6001.h .