PX4 Firmware
PX4 Autopilot Software http://px4.io
drv_board_led.h File Reference

LED driver API to control the onboard LED(s) via ioctl() interface. More...

#include <px4_platform_common/defines.h>
#include <stdint.h>
#include <sys/ioctl.h>
Include dependency graph for drv_board_led.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LED_BASE_DEVICE_PATH   "/dev/led"
 
#define LED0_DEVICE_PATH   "/dev/led0"
 
#define _LED_BASE   0x2800
 
#define LED_AMBER   1
 
#define LED_RED   1 /* some boards have red rather than amber */
 
#define LED_BLUE   0
 
#define LED_SAFETY   2
 
#define LED_GREEN   3
 
#define LED_ON   _PX4_IOC(_LED_BASE, 0)
 
#define LED_OFF   _PX4_IOC(_LED_BASE, 1)
 
#define LED_TOGGLE   _PX4_IOC(_LED_BASE, 2)
 

Functions

__BEGIN_DECLS __EXPORT void drv_led_start (void)
 

Detailed Description

LED driver API to control the onboard LED(s) via ioctl() interface.

Definition in file drv_board_led.h.

Macro Definition Documentation

◆ _LED_BASE

#define _LED_BASE   0x2800

Definition at line 49 of file drv_board_led.h.

◆ LED0_DEVICE_PATH

#define LED0_DEVICE_PATH   "/dev/led0"

Definition at line 47 of file drv_board_led.h.

Referenced by led_init(), and test_led().

◆ LED_AMBER

#define LED_AMBER   1

Definition at line 52 of file drv_board_led.h.

Referenced by failsafe_blink(), led_init(), registers_set_one(), test_led(), and user_start().

◆ LED_BASE_DEVICE_PATH

#define LED_BASE_DEVICE_PATH   "/dev/led"

Definition at line 46 of file drv_board_led.h.

Referenced by LED::_measure().

◆ LED_BLUE

#define LED_BLUE   0

Definition at line 54 of file drv_board_led.h.

Referenced by heartbeat_blink(), led_init(), test_led(), and user_start().

◆ LED_GREEN

#define LED_GREEN   3

Definition at line 56 of file drv_board_led.h.

Referenced by led_init().

◆ LED_OFF

#define LED_OFF   _PX4_IOC(_LED_BASE, 1)

Definition at line 60 of file drv_board_led.h.

Referenced by LED::devIOCTL(), LED::ioctl(), led_off(), and test_led().

◆ LED_ON

#define LED_ON   _PX4_IOC(_LED_BASE, 0)

Definition at line 59 of file drv_board_led.h.

Referenced by LED::devIOCTL(), LED::ioctl(), led_init(), led_on(), and test_led().

◆ LED_RED

#define LED_RED   1 /* some boards have red rather than amber */

Definition at line 53 of file drv_board_led.h.

◆ LED_SAFETY

#define LED_SAFETY   2

Definition at line 55 of file drv_board_led.h.

Referenced by safety_check_button(), and user_start().

◆ LED_TOGGLE

#define LED_TOGGLE   _PX4_IOC(_LED_BASE, 2)

Definition at line 61 of file drv_board_led.h.

Referenced by LED::devIOCTL(), LED::ioctl(), and led_toggle().

Function Documentation

◆ drv_led_start()

__BEGIN_DECLS __EXPORT void drv_led_start ( void  )

Definition at line 118 of file led.cpp.

References LED::init(), and LED::LED().

Referenced by Simulator::start().

Here is the call graph for this function:
Here is the caller graph for this function: