Progmem: use right CONFIG_HAL_BOARD #ifdefs

This commit is contained in:
Andrew Tridgell 2013-01-01 18:25:47 +11:00
parent da10e68e87
commit 57bf6531b4
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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