update credits
[librepilot.git] / flight / pios / inc / pios_wavplay.h
blobe3fbb77571e7ded96b719bd5a913ca61017aaf8e
1 /**
2 ******************************************************************************
3 * @addtogroup PIOS PIOS Core hardware abstraction layer
4 * @{
5 * @addtogroup PIOS_WAVPLAY Code for wave audio generator
6 * @brief Wave audio generator
7 * @{
9 * @file pios_wavplay.h
10 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
11 * @brief audio generator
12 * @see The GNU Public License (GPL) Version 3
14 ******************************************************************************
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 3 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 * for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #ifndef PIOS_WAVPLAY_H
33 #define PIOS_WAVPLAY_H
35 #include <pios_stm32.h>
37 #define BUFFERSIZE 512 // Defines the buffer size to hold data from the SD card.
39 struct pios_dac_cfg {
40 TIM_TypeDef *timer;
41 TIM_TimeBaseInitTypeDef time_base_init;
42 struct stm32_irq irq;
43 struct stm32_dma dma;
44 uint32_t channel;
45 DAC_InitTypeDef dac_init;
46 struct stm32_gpio dac_io;
49 extern void PIOS_WavPlay_Init(const struct pios_dac_cfg *cfg);
50 extern uint8_t WavePlayer_Start(void);
52 #endif /* PIOS_WAVPLAY_H */