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

BlinkM driver API. More...

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

Go to the source code of this file.

Macros

#define BLINKM0_DEVICE_PATH   "/dev/blinkm0"
 
#define _BLINKMIOCBASE   (0x2900)
 
#define _BLINKMIOC(_n)   (_PX4_IOC(_BLINKMIOCBASE, _n))
 
#define BLINKM_PLAY_SCRIPT_NAMED   _BLINKMIOC(1)
 play the named script in *(char *)arg, repeating forever More...
 
#define BLINKM_PLAY_SCRIPT   _BLINKMIOC(2)
 play the numbered script in (arg), repeating forever More...
 
#define BLINKM_SET_USER_SCRIPT   _BLINKMIOC(3)
 Set the user script; (arg) is a pointer to an array of script lines, where each line is an array of four bytes giving <duration>, <command>, arg[0-2]. More...
 

Detailed Description

BlinkM driver API.

This could probably become a more generalised API for multi-colour LED driver systems, or be merged with the generic LED driver.

Definition in file drv_blinkm.h.

Macro Definition Documentation

◆ _BLINKMIOC

#define _BLINKMIOC (   _n)    (_PX4_IOC(_BLINKMIOCBASE, _n))

Definition at line 56 of file drv_blinkm.h.

◆ _BLINKMIOCBASE

#define _BLINKMIOCBASE   (0x2900)

Definition at line 55 of file drv_blinkm.h.

◆ BLINKM0_DEVICE_PATH

#define BLINKM0_DEVICE_PATH   "/dev/blinkm0"

Definition at line 49 of file drv_blinkm.h.

Referenced by blinkm_main().

◆ BLINKM_PLAY_SCRIPT

#define BLINKM_PLAY_SCRIPT   _BLINKMIOC(2)

play the numbered script in (arg), repeating forever

Definition at line 62 of file drv_blinkm.h.

Referenced by BlinkM::ioctl().

◆ BLINKM_PLAY_SCRIPT_NAMED

#define BLINKM_PLAY_SCRIPT_NAMED   _BLINKMIOC(1)

play the named script in *(char *)arg, repeating forever

Definition at line 59 of file drv_blinkm.h.

Referenced by blinkm_main(), and BlinkM::ioctl().

◆ BLINKM_SET_USER_SCRIPT

#define BLINKM_SET_USER_SCRIPT   _BLINKMIOC(3)

Set the user script; (arg) is a pointer to an array of script lines, where each line is an array of four bytes giving <duration>, <command>, arg[0-2].

The script is terminated by a zero command.

Definition at line 70 of file drv_blinkm.h.

Referenced by BlinkM::ioctl().