diff --git a/platforms/nuttx/src/px4/nxp/kinetis/tone_alarm/ToneAlarmInterface.cpp b/platforms/nuttx/src/px4/nxp/kinetis/tone_alarm/ToneAlarmInterface.cpp index 1090305abedb..a96180a429ea 100644 --- a/platforms/nuttx/src/px4/nxp/kinetis/tone_alarm/ToneAlarmInterface.cpp +++ b/platforms/nuttx/src/px4/nxp/kinetis/tone_alarm/ToneAlarmInterface.cpp @@ -39,7 +39,7 @@ #include "kinetis_tpm.h" #include -#include +#include #include #include diff --git a/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfaceGPIO.cpp b/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfaceGPIO.cpp index eb5f6a342c74..c1d9603e9bb1 100644 --- a/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfaceGPIO.cpp +++ b/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfaceGPIO.cpp @@ -31,7 +31,7 @@ * ****************************************************************************/ -#include +#include #include #include diff --git a/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfacePWM.cpp b/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfacePWM.cpp index 6073068ee624..da29ce28f487 100644 --- a/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfacePWM.cpp +++ b/platforms/nuttx/src/px4/stm/stm32_common/tone_alarm/ToneAlarmInterfacePWM.cpp @@ -32,7 +32,7 @@ ****************************************************************************/ #include -#include +#include #include #include diff --git a/src/drivers/drv_tone_alarm.h b/src/drivers/drv_tone_alarm.h index 7d389cd7fe30..f22d4798422c 100644 --- a/src/drivers/drv_tone_alarm.h +++ b/src/drivers/drv_tone_alarm.h @@ -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 diff --git a/src/drivers/tone_alarm/ToneAlarm.h b/src/drivers/tone_alarm/ToneAlarm.h index 90cb46db4598..a9e6da94cf3a 100644 --- a/src/drivers/tone_alarm/ToneAlarm.h +++ b/src/drivers/tone_alarm/ToneAlarm.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/src/lib/drivers/CMakeLists.txt b/src/lib/drivers/CMakeLists.txt index 81e7612b73dd..3995d705bf38 100644 --- a/src/lib/drivers/CMakeLists.txt +++ b/src/lib/drivers/CMakeLists.txt @@ -41,4 +41,3 @@ add_subdirectory(linux_gpio) add_subdirectory(magnetometer) add_subdirectory(rangefinder) add_subdirectory(smbus) -add_subdirectory(tone_alarm) diff --git a/src/lib/drivers/tone_alarm/CMakeLists.txt b/src/lib/drivers/tone_alarm/CMakeLists.txt deleted file mode 100644 index 53b343a25e7e..000000000000 --- a/src/lib/drivers/tone_alarm/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################ -# -# Copyright (c) 2015-2019 PX4 Development Team. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name PX4 nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# ToneAlarmInterface Library - Intentionally Blank diff --git a/src/lib/drivers/tone_alarm/ToneAlarmInterface.h b/src/lib/drivers/tone_alarm/ToneAlarmInterface.h deleted file mode 100644 index 9d2b35d3bd72..000000000000 --- a/src/lib/drivers/tone_alarm/ToneAlarmInterface.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - * - * Copyright (C) 2013-2019 PX4 Development Team. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name PX4 nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/** - * @file ToneAlarmInterface.cpp - */ - -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