Class module for NCP5623B I2C LED driver

Dependents:   mDotEVBM2X MTDOT-EVB-LinkCheck-AL MTDOT-EVBDemo-DRH MTDOT_BOX_EVB_Blinky ... more

Embed: (wiki syntax)

« Back to documentation index

NCP5623B Class Reference

Using the Multitech MTDOT-EVB. More...

#include <NCP5623B.h>

Public Types

enum  LEDNUM
 

LED number for indexing.

More...
enum  REGISTER
 

The device register map using upper 3 bits.

More...

Public Member Functions

 NCP5623B (I2C &i2c)
 Create the NCP5623B object.
uint8_t shutdown (void) const
 Shutdown LEDS.
uint8_t setLEDCurrent (uint8_t data) const
 Set static LED Current - value of current draw for all LEDs range 0-31.
uint8_t setPWM (LEDNUM lednum, int8_t data) const
 Set PWM mode for specific LED - selects LED - PWM value to set range 0-31 0-100% Pulse width.
uint8_t setDimming (DIMDIRECTION dimdir, uint8_t endstep, uint8_t time) const
 Set Dimming mode for all LEDs - direction of dimming - ending step of ramp up or ramp down range 0-31 - time per step range 0-31 in 8 msec multiples.

Static Public Attributes

static uint8_t const DATAMASK = 0x1F
 DATAMASK.

Detailed Description

Using the Multitech MTDOT-EVB.

Example:

  #include "mbed.h"
  #include "NCP5623B.h"


 
  int main() 
  {

  }

API abstraction for the NCP5623B Triple LED Driver IC initial version will be polling only. Interrupt service and rtos support will be added at a later point

Definition at line 51 of file NCP5623B.h.


Member Enumeration Documentation

enum LEDNUM

LED number for indexing.

Definition at line 65 of file NCP5623B.h.

enum REGISTER

The device register map using upper 3 bits.

Definition at line 86 of file NCP5623B.h.


Constructor & Destructor Documentation

NCP5623B ( I2C &  i2c )

Create the NCP5623B object.

Parameters:
i2c- A defined I2C object

Definition at line 27 of file NCP5623B.cpp.


Member Function Documentation

uint8_t setDimming ( DIMDIRECTION  dimdir,
uint8_t  endstep,
uint8_t  steptime 
) const

Set Dimming mode for all LEDs - direction of dimming - ending step of ramp up or ramp down range 0-31 - time per step range 0-31 in 8 msec multiples.

Returns:
status of command

Definition at line 105 of file NCP5623B.cpp.

uint8_t setLEDCurrent ( uint8_t  data ) const

Set static LED Current - value of current draw for all LEDs range 0-31.

Set static LED Current data - value of current draw for all LEDs range 0-31.

Returns:
status of command

Definition at line 68 of file NCP5623B.cpp.

uint8_t setPWM ( LEDNUM  lednum,
int8_t  data 
) const

Set PWM mode for specific LED - selects LED - PWM value to set range 0-31 0-100% Pulse width.

Returns:
status of command

Definition at line 81 of file NCP5623B.cpp.

uint8_t shutdown ( void   ) const

Shutdown LEDS.

Returns:
status of command

Definition at line 55 of file NCP5623B.cpp.


Field Documentation

uint8_t const DATAMASK = 0x1F [static]

DATAMASK.

Data mask

Definition at line 59 of file NCP5623B.h.