47 #include <px4_platform_common/defines.h> 48 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 55 # define UNUSED(a) ((void)(a)) int init() override
Initializes the character device and hardware registers.
void status()
Prints the driver status to the console.
volatile bool _should_run
volatile bool _running
Flag to indicate the current driver status.
void next_note()
Parses the next note out of the string and plays it.
Library for parsing tunes from melody-strings or dedicated tune messages.
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
Abstract class for any character device.
uORB::Subscription _tune_control_sub
void start_note(unsigned frequency)
Starts playing the note.
Driver for the PX4 audio alarm port, /dev/tone_alarm.
void Run() override
Trampoline for the work queue.
int _cbrk
If true, no audio output.
void stop_note()
Stops playing the current note and makes the player 'safe'.
void orb_update()
Updates the uORB topics for local subscribers.
static tune_control_s tune_control
unsigned int _silence_length
If nonzero, silence before next note.