From f6dcb75b8e920d483e9a47e97563f20734b3cbad Mon Sep 17 00:00:00 2001 From: bsongis Date: Sun, 26 Apr 2015 13:57:58 +0200 Subject: [PATCH] Another compilation fix (and more boyscout work) --- radio/src/targets/taranis/audio_driver.h | 54 ------------------- radio/src/targets/taranis/board_taranis.h | 14 +++-- radio/src/targets/taranis/bootloader/Makefile | 3 +- 3 files changed, 12 insertions(+), 59 deletions(-) delete mode 100644 radio/src/targets/taranis/audio_driver.h diff --git a/radio/src/targets/taranis/audio_driver.h b/radio/src/targets/taranis/audio_driver.h deleted file mode 100644 index bef2b6b2f..000000000 --- a/radio/src/targets/taranis/audio_driver.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Authors (alphabetical order) - * - Andre Bernet - * - Andreas Weitl - * - Bertrand Songis - * - Bryan J. Rentoul (Gruvin) - * - Cameron Weeks - * - Erez Raviv - * - Gabriel Birkus - * - Jean-Pierre Parisy - * - Karl Szmutny - * - Michael Blandford - * - Michal Hlavinka - * - Pat Mackenzie - * - Philip Moss - * - Rob Thomson - * - Romolo Manfredini - * - Thomas Husterer - * - * opentx is based on code named - * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, - * er9x by Erez Raviv: http://code.google.com/p/er9x/, - * and the original (and ongoing) project by - * Thomas Husterer, th9x: http://code.google.com/p/th9x/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef audio_driver_h -#define audio_driver_h - -void audioInit( void ) ; -void audioEnd( void ) ; -void dacStart(); -void dacStop(); - -extern void setSampleRate(uint32_t frequency); - -#define VOLUME_LEVEL_MAX 23 -#define VOLUME_LEVEL_DEF 12 -extern const int8_t volumeScale[]; - - -void setVolume(uint8_t volume); - -#endif diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index ff0d54f8a..7a2f5cff5 100644 --- a/radio/src/targets/taranis/board_taranis.h +++ b/radio/src/targets/taranis/board_taranis.h @@ -85,10 +85,6 @@ extern "C" { } #endif -#if !defined(BOOT) -#include "audio_driver.h" -#endif - #define FLASHSIZE 0x80000 #define BOOTLOADER_SIZE 0x8000 #define FIRMWARE_ADDRESS 0x08000000 @@ -304,6 +300,16 @@ void debugPutc(const char c); void telemetryPortInit(uint32_t baudrate); void sportSendBuffer(uint8_t *buffer, uint32_t count); +// Audio driver +void audioInit(void) ; +void audioEnd(void) ; +void dacStart(void); +void dacStop(void); +void setSampleRate(uint32_t frequency); +#define VOLUME_LEVEL_MAX 23 +#define VOLUME_LEVEL_DEF 12 +void setVolume(uint8_t volume); + // Haptic driver void hapticInit(void); void hapticOff(void); diff --git a/radio/src/targets/taranis/bootloader/Makefile b/radio/src/targets/taranis/bootloader/Makefile index 4b9b02a55..41e522748 100755 --- a/radio/src/targets/taranis/bootloader/Makefile +++ b/radio/src/targets/taranis/bootloader/Makefile @@ -154,7 +154,7 @@ SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c SRC += $(STM32USBPATH)/STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c -SRC += ../i2c.c ../delays.c +SRC += ../delays.c SRC += $(THIRDPARTY)/FatFs/ff.c $(THIRDPARTY)/FatFs/option/ccsbcs.c SRC += ../usbd_desc.c SRC += ../aspi.c @@ -166,6 +166,7 @@ SRC += init.c CPPSRC = ../lcd_driver.cpp \ ../configure_pins.cpp \ ../keys_driver.cpp \ + ../i2c_driver.cpp \ ../flash_driver.cpp \ ../diskio.cpp \ ../usbd_usr.cpp \