AP_SerialLED: add defines for some AP_Notify LED libraries

allow ProfiLEDs (serial and SPI) and NeoPixel to be compiled out
This commit is contained in:
Peter Barker 2023-03-01 13:57:09 +11:00 committed by Andrew Tridgell
parent d9aa0c9cf0
commit 9fd4298377
3 changed files with 20 additions and 0 deletions

View File

@ -17,6 +17,9 @@
*/
#include "AP_SerialLED.h"
#if AP_SERIALLED_ENABLED
#include <AP_Math/AP_Math.h>
#include "SRV_Channel/SRV_Channel.h"
@ -65,3 +68,5 @@ void AP_SerialLED::send(uint8_t chan)
}
}
#endif // AP_SERIALLED_ENABLED

View File

@ -17,6 +17,12 @@
*/
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#include "AP_SerialLED_config.h"
#if AP_SERIALLED_ENABLED
#include <stdint.h>
// limit number of LEDs, mostly to keep DMA memory consumption within
@ -46,3 +52,5 @@ public:
private:
static AP_SerialLED singleton;
};
#endif // AP_SERIALLED_ENABLED

View File

@ -0,0 +1,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_SERIALLED_ENABLED
#define AP_SERIALLED_ENABLED 1
#endif