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

Driver for the onboard RGB LED controller (TCA62724FMG) 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.cpp:

Go to the source code of this file.

Classes

class  RGBLED
 

Macros

#define ADDR   0x55
 I2C adress of TCA62724FMG. More...
 
#define SUB_ADDR_START   0x01
 write everything (with auto-increment) More...
 
#define SUB_ADDR_PWM0   0x81
 blue (without auto-increment) More...
 
#define SUB_ADDR_PWM1   0x82
 green (without auto-increment) More...
 
#define SUB_ADDR_PWM2   0x83
 red (without auto-increment) More...
 
#define SUB_ADDR_SETTINGS   0x84
 settings (without auto-increment) More...
 
#define SETTING_NOT_POWERSAVE   0x01
 power-save mode not off More...
 
#define SETTING_ENABLE   0x02
 on More...
 

Functions

void rgbled_usage ()
 
__EXPORT int rgbled_main (int argc, char *argv[])
 

Detailed Description

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

Author
Julian Oes julia.nosp@m.n@px.nosp@m.4.io
Anton Babushkin anton.nosp@m..bab.nosp@m.ushki.nosp@m.n@me.nosp@m..com

Definition in file rgbled.cpp.

Macro Definition Documentation

◆ ADDR

#define ADDR   0x55

I2C adress of TCA62724FMG.

Definition at line 53 of file rgbled.cpp.

Referenced by rgbled_main(), and rgbled_usage().

◆ SETTING_ENABLE

#define SETTING_ENABLE   0x02

on

Definition at line 61 of file rgbled.cpp.

Referenced by RGBLED::get(), and RGBLED::send_led_enable().

◆ SETTING_NOT_POWERSAVE

#define SETTING_NOT_POWERSAVE   0x01

power-save mode not off

Definition at line 60 of file rgbled.cpp.

Referenced by RGBLED::get(), and RGBLED::send_led_enable().

◆ SUB_ADDR_PWM0

#define SUB_ADDR_PWM0   0x81

blue (without auto-increment)

Definition at line 55 of file rgbled.cpp.

Referenced by RGBLED::send_led_rgb().

◆ SUB_ADDR_PWM1

#define SUB_ADDR_PWM1   0x82

green (without auto-increment)

Definition at line 56 of file rgbled.cpp.

Referenced by RGBLED::send_led_rgb().

◆ SUB_ADDR_PWM2

#define SUB_ADDR_PWM2   0x83

red (without auto-increment)

Definition at line 57 of file rgbled.cpp.

Referenced by RGBLED::send_led_rgb().

◆ SUB_ADDR_SETTINGS

#define SUB_ADDR_SETTINGS   0x84

settings (without auto-increment)

Definition at line 58 of file rgbled.cpp.

Referenced by RGBLED::send_led_enable().

◆ SUB_ADDR_START

#define SUB_ADDR_START   0x01

write everything (with auto-increment)

Definition at line 54 of file rgbled.cpp.

Function Documentation

◆ rgbled_main()

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

Definition at line 361 of file rgbled.cpp.

References ADDR, OK, RGBLED::RGBLED(), and rgbled_usage().

Here is the call graph for this function:

◆ rgbled_usage()

void rgbled_usage ( )

Definition at line 352 of file rgbled.cpp.

References ADDR.

Referenced by rgbled_main().

Here is the caller graph for this function: