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

Embed: (wiki syntax)

« Back to documentation index

Led6001 Class Reference

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_irqpin name of the XFAULT pin of the component.
currentpin name of the ADC pin of the component responsible for sensing the current flowing through the LED.
pwmpin name of the PWM pin of the component.
analogpin name of the Analog pin of the component.

Definition at line 115 of file Led6001.h.

virtual ~Led6001 ( void   ) [virtual]

Destructor.

Definition at line 131 of file Led6001.h.


Member Function Documentation

void attach_xfault_irq ( void(*)(void)  fptr )

Attaching an interrupt handler to the XFAULT interrupt.

Parameters:
fptrAn interrupt handler.
Return values:
None.

Definition at line 289 of file Led6001.h.

void disable_xfault_irq ( void   )

Disabling the XFAULT interrupt handling.

Parameters:
None.
Return values:
None.

Definition at line 309 of file Led6001.h.

void enable_xfault_irq ( void   )

Enabling the XFAULT interrupt handling.

Parameters:
None.
Return values:
None.

Definition at line 299 of file Led6001.h.

virtual float get_current ( void   ) [virtual]

Getting the current flowing through the LED.

Parameters:
None.
Return values:
Thecurrent 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:
initPointer to device specific initalization structure.
Return values:
0in 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:
None.
Return values:
None.

Definition at line 233 of file Led6001.h.

virtual void power_on ( void   ) [virtual]

Powering ON at maximum light intensity.

Parameters:
None.
Return values:
None.

Definition at line 222 of file Led6001.h.

virtual int read_id ( uint8_t *  id = NULL ) [virtual]

Getting the ID of the component.

Parameters:
idPointer to an allocated variable to store the ID into.
Return values:
0in 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:
dimmingAnalog dimming value, represented as a floating point number in the range [0.0, 1.0].
Return values:
None.

Implements Led.

Definition at line 210 of file Led6001.h.

virtual void set_pwm_dimming ( float  dimming ) [virtual]

Setting PWM dimming value.

Parameters:
dimmingPWM dimming value, represented as a floating point number in the range [0.0, 1.0].
Return values:
None.

Implements Led.

Definition at line 197 of file Led6001.h.

virtual void start_up ( void   ) [virtual]

Starting-up the component.

Parameters:
None.
Return values:
None.

Definition at line 244 of file Led6001.h.