1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

OP-1312 add a switch to include/exclude the driver

This commit is contained in:
Alessio Morale 2014-04-26 17:28:49 +02:00
parent 46f70a74c8
commit db9435b5ed
3 changed files with 9 additions and 1 deletions

View File

@ -26,12 +26,16 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <pios.h>
#ifdef PIOS_INCLUDE_WS2811
#include "pios_ws2811.h"
#include <stm32f4xx_rcc.h>
#include <pios_stm32.h>
#include "FreeRTOS.h"
#include "task.h"
// framebuffer
static ledbuf_t *fb = 0;
// bitmask with pin to be set/reset using dma
@ -246,3 +250,4 @@ void PIOS_WS2811_DMA_irq_handler(){
DMA_ClearFlag(pios_ws2811_cfg->streamCh1,pios_ws2811_cfg->irq.flags);
}
#endif //PIOS_INCLUDE_WS2811

View File

@ -1810,7 +1810,8 @@ const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID && PIOS_INCLUDE_USB_CDC */
#ifdef PIOS_INCLUDE_WS2811
#include <pios_ws2811.h>
#define PIOS_WS2811_TIM_DIVIDER (PIOS_PERIPHERAL_APB2_CLOCK / (800000 * PIOS_WS2811_TIM_PERIOD))
void DMA2_Stream1_IRQHandler(void) __attribute__((alias("PIOS_WS2811_irq_handler")));
@ -1922,3 +1923,4 @@ void PIOS_WS2811_irq_handler(void)
/* Call into the generic code to handle the IRQ for this specific device */
PIOS_WS2811_DMA_irq_handler();
}
#endif //PIOS_INCLUDE_WS2811

View File

@ -88,6 +88,7 @@
//#define PIOS_INCLUDE_MPXV
//#define PIOS_INCLUDE_ETASV3
/* #define PIOS_INCLUDE_HCSR04 */
#define PIOS_INCLUDE_WS2811
/* PIOS receiver drivers */
#define PIOS_INCLUDE_PWM