mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Compilation error fixed
This commit is contained in:
parent
197708c967
commit
5e6cd0ee76
4 changed files with 22 additions and 17 deletions
|
@ -638,7 +638,7 @@ ifeq ($(PCB), TARANIS)
|
|||
BOARDSRC = targets/taranis/board_taranis.cpp
|
||||
EXTRABOARDSRC += targets/taranis/lcd_driver.cpp targets/taranis/aspi.c targets/taranis/i2c.c targets/taranis/delays.c
|
||||
SRC += CoOS/kernel/core.c CoOS/kernel/hook.c CoOS/kernel/task.c CoOS/kernel/event.c CoOS/kernel/time.c CoOS/kernel/timer.c CoOS/kernel/flag.c CoOS/kernel/mutex.c CoOS/kernel/serviceReq.c CoOS/portable/GCC/port.c CoOS/portable/arch.c
|
||||
SRC += targets/taranis/pwr_driver.c
|
||||
SRC += targets/taranis/pwr_driver.c targets/taranis/usb_driver.c
|
||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp eeprom_conversions.cpp
|
||||
PULSESSRC = protocols/pulses_arm.cpp protocols/ppm_arm.cpp protocols/pxx_arm.cpp
|
||||
CPPSRC += audio_arm.cpp
|
||||
|
@ -1104,7 +1104,7 @@ endif
|
|||
# build bootloader
|
||||
.PHONY bootloader.lbm:
|
||||
@echo "Building bootloader..."
|
||||
$(MAKE) -C bootloader PCB=$(PCB)
|
||||
$(MAKE) -C bootloader PCB=TARANIS
|
||||
$(BIN2LBM) bootloader.lbm bootloader/bootloader_ramBoot.bin
|
||||
|
||||
tra: translations/en.h translations/cz.h translations/de.h translations/es.h translations/fi.h translations/fr.h translations/it.h translations/pl.h translations/pt.h translations/se.h
|
||||
|
|
|
@ -111,6 +111,20 @@ bool dacQueue(AudioBuffer *buffer)
|
|||
}
|
||||
}
|
||||
|
||||
void dacStart()
|
||||
{
|
||||
DMA1->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5 | DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5 ; // Write ones to clear bits
|
||||
DMA1_Stream5->CR |= DMA_SxCR_CIRC | DMA_SxCR_EN ; // Enable DMA channel
|
||||
DAC->SR = DAC_SR_DMAUDR1 ; // Write 1 to clear flag
|
||||
DAC->CR |= DAC_CR_EN1 | DAC_CR_DMAEN1 ; // Enable DAC
|
||||
}
|
||||
|
||||
void dacStop()
|
||||
{
|
||||
DMA1_Stream5->CR &= ~DMA_SxCR_CIRC ;
|
||||
}
|
||||
|
||||
|
||||
// Sound routines
|
||||
void audioInit()
|
||||
{
|
||||
|
|
|
@ -37,26 +37,15 @@
|
|||
#ifndef audio_driver_h
|
||||
#define audio_driver_h
|
||||
|
||||
extern void audioInit( void ) ;
|
||||
extern void audioEnd( void ) ;
|
||||
void audioInit( void ) ;
|
||||
void audioEnd( void ) ;
|
||||
void dacStart();
|
||||
void dacStop();
|
||||
|
||||
extern void setSampleRate(uint32_t frequency);
|
||||
|
||||
extern int dacIdle;
|
||||
|
||||
inline void dacStart()
|
||||
{
|
||||
DMA1->HIFCR = DMA_HIFCR_CTCIF5 | DMA_HIFCR_CHTIF5 | DMA_HIFCR_CTEIF5 | DMA_HIFCR_CDMEIF5 | DMA_HIFCR_CFEIF5 ; // Write ones to clear bits
|
||||
DMA1_Stream5->CR |= DMA_SxCR_CIRC | DMA_SxCR_EN ; // Enable DMA channel
|
||||
DAC->SR = DAC_SR_DMAUDR1 ; // Write 1 to clear flag
|
||||
DAC->CR |= DAC_CR_EN1 | DAC_CR_DMAEN1 ; // Enable DAC
|
||||
}
|
||||
|
||||
inline void dacStop()
|
||||
{
|
||||
DMA1_Stream5->CR &= ~DMA_SxCR_CIRC ;
|
||||
}
|
||||
|
||||
#define VOLUME_LEVEL_MAX 23
|
||||
#define VOLUME_LEVEL_DEF 12
|
||||
static const int8_t volumeScale[VOLUME_LEVEL_MAX+1] =
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
*/
|
||||
|
||||
#include "board_taranis.h"
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_dcd_int.h"
|
||||
#include "STM32_USB-Host-Device_Lib_V2.1.0/Libraries/STM32_USB_OTG_Driver/inc/usb_bsp.h"
|
||||
|
||||
int usbPlugged(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue