Skip to content

Commit

Permalink
ToneAlarmInterface: move to drivers/drv_tone_alarm
Browse files Browse the repository at this point in the history
It belongs there since it's not a library providing the implementation, but
just declaring the interface.
  • Loading branch information
bkueng committed Aug 30, 2019
1 parent f3fccf5 commit 3bdfd8c
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "kinetis_tpm.h"

#include <drivers/device/device.h>
#include <lib/drivers/tone_alarm/ToneAlarmInterface.h>
#include <drivers/drv_tone_alarm.h>
#include <px4_defines.h>
#include <systemlib/px4_macros.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
****************************************************************************/

#include <lib/drivers/tone_alarm/ToneAlarmInterface.h>
#include <drivers/drv_tone_alarm.h>
#include <px4_defines.h>
#include <board_config.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
****************************************************************************/

#include <drivers/device/device.h>
#include <lib/drivers/tone_alarm/ToneAlarmInterface.h>
#include <drivers/drv_tone_alarm.h>
#include <px4_defines.h>
#include <cmath>

Expand Down
20 changes: 20 additions & 0 deletions src/drivers/drv_tone_alarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,23 @@ enum {
TONE_HOME_SET,
TONE_NUMBER_OF_TUNES
};

namespace ToneAlarmInterface
{

/**
* @brief Activates/configures the hardware registers.
*/
void init();

/**
* @brief Starts playing the note.
*/
void start_note(unsigned frequency);

/**
* @brief Stops playing the current note and makes the player 'safe'.
*/
void stop_note();

} // ToneAlarmInterface
1 change: 0 additions & 1 deletion src/drivers/tone_alarm/ToneAlarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <circuit_breaker/circuit_breaker.h>
#include <drivers/device/device.h>
#include <drivers/drv_tone_alarm.h>
#include <lib/drivers/tone_alarm/ToneAlarmInterface.h>
#include <lib/tunes/tunes.h>
#include <px4_defines.h>
#include <px4_work_queue/ScheduledWorkItem.hpp>
Expand Down
1 change: 0 additions & 1 deletion src/lib/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ add_subdirectory(linux_gpio)
add_subdirectory(magnetometer)
add_subdirectory(rangefinder)
add_subdirectory(smbus)
add_subdirectory(tone_alarm)
34 changes: 0 additions & 34 deletions src/lib/drivers/tone_alarm/CMakeLists.txt

This file was deleted.

54 changes: 0 additions & 54 deletions src/lib/drivers/tone_alarm/ToneAlarmInterface.h

This file was deleted.

0 comments on commit 3bdfd8c

Please sign in to comment.