mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
Progmem: use right CONFIG_HAL_BOARD #ifdefs
This commit is contained in:
parent
da10e68e87
commit
57bf6531b4
@ -5,11 +5,11 @@
|
||||
//
|
||||
// Note: use new/delete with caution. The heap is small and
|
||||
// easily fragmented.
|
||||
//
|
||||
|
||||
#include <AP_HAL.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef PX4FMU_BUILD
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
|
||||
void * operator new(size_t size)
|
||||
{
|
||||
@ -49,5 +49,5 @@ void __cxa_guard_release (__guard *g){
|
||||
void __cxa_guard_abort (__guard *) {
|
||||
};
|
||||
|
||||
#endif // PX4FMU_BUILD
|
||||
#endif // CONFIG_HAL_BOARD
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
#include <AP_HAL_Boards.h>
|
||||
#if defined(__AVR__)
|
||||
#include "AP_Progmem_AVR.h"
|
||||
#elif defined(PX4FMU_BUILD) || (CONFIG_HAL_BOARD==HAL_BOARD_AVR_SITL)
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||
#include "AP_Progmem_Identity.h"
|
||||
#else
|
||||
#error "this build type is unknown"
|
||||
#error "this build type is unknown - please edit AP_Progmem.h"
|
||||
#endif
|
||||
|
||||
#define PROGMEM_STRING(_v, _s) static const char _v[] PROGMEM = _s
|
||||
|
Loading…
Reference in New Issue
Block a user