PX4 Firmware
PX4 Autopilot Software http://px4.io
rgbled_ncp5623c.cpp File Reference

Driver for the onboard RGB LED controller (NCP5623C) connected via I2C. More...

#include <string.h>
#include <drivers/device/i2c.h>
#include <lib/led/led.h>
#include <lib/parameters/param.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <uORB/Subscription.hpp>
#include <uORB/topics/parameter_update.h>
Include dependency graph for rgbled_ncp5623c.cpp:

Go to the source code of this file.

Classes

class  RGBLED_NPC5623C
 

Macros

#define ADDR   0x39
 I2C adress of NCP5623C. More...
 
#define NCP5623_LED_CURRENT   0x20
 Current register. More...
 
#define NCP5623_LED_PWM0   0x40
 pwm0 register More...
 
#define NCP5623_LED_PWM1   0x60
 pwm1 register More...
 
#define NCP5623_LED_PWM2   0x80
 pwm2 register More...
 
#define NCP5623_LED_BRIGHT   0x1f
 full brightness More...
 
#define NCP5623_LED_OFF   0x00
 off More...
 

Functions

void rgbled_ncp5623c_usage ()
 
__EXPORT int rgbled_ncp5623c_main (int argc, char *argv[])
 

Detailed Description

Driver for the onboard RGB LED controller (NCP5623C) connected via I2C.

Author
CUAVcaijie caiji.nosp@m.e@cu.nosp@m.av.ne.nosp@m.t

Definition in file rgbled_ncp5623c.cpp.

Macro Definition Documentation

◆ ADDR

#define ADDR   0x39

I2C adress of NCP5623C.

Definition at line 53 of file rgbled_ncp5623c.cpp.

Referenced by rgbled_ncp5623c_main(), and rgbled_ncp5623c_usage().

◆ NCP5623_LED_BRIGHT

#define NCP5623_LED_BRIGHT   0x1f

full brightness

Definition at line 60 of file rgbled_ncp5623c.cpp.

Referenced by RGBLED_NPC5623C::Run().

◆ NCP5623_LED_CURRENT

#define NCP5623_LED_CURRENT   0x20

Current register.

Definition at line 55 of file rgbled_ncp5623c.cpp.

Referenced by RGBLED_NPC5623C::probe(), and RGBLED_NPC5623C::send_led_rgb().

◆ NCP5623_LED_OFF

#define NCP5623_LED_OFF   0x00

off

Definition at line 61 of file rgbled_ncp5623c.cpp.

◆ NCP5623_LED_PWM0

#define NCP5623_LED_PWM0   0x40

pwm0 register

Definition at line 56 of file rgbled_ncp5623c.cpp.

Referenced by RGBLED_NPC5623C::send_led_rgb().

◆ NCP5623_LED_PWM1

#define NCP5623_LED_PWM1   0x60

pwm1 register

Definition at line 57 of file rgbled_ncp5623c.cpp.

Referenced by RGBLED_NPC5623C::send_led_rgb().

◆ NCP5623_LED_PWM2

#define NCP5623_LED_PWM2   0x80

pwm2 register

Definition at line 58 of file rgbled_ncp5623c.cpp.

Referenced by RGBLED_NPC5623C::send_led_rgb().

Function Documentation

◆ rgbled_ncp5623c_main()

int rgbled_ncp5623c_main ( int  argc,
char *  argv[] 
)

Definition at line 274 of file rgbled_ncp5623c.cpp.

References ADDR, OK, rgbled_ncp5623c_usage(), and RGBLED_NPC5623C::RGBLED_NPC5623C().

Here is the call graph for this function:

◆ rgbled_ncp5623c_usage()

void rgbled_ncp5623c_usage ( )

Definition at line 265 of file rgbled_ncp5623c.cpp.

References ADDR.

Referenced by rgbled_ncp5623c_main().

Here is the caller graph for this function: