mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL: don't include Semaphore headers while building C source
This commit is contained in:
parent
24c5fe54df
commit
350f718745
@ -59,12 +59,14 @@
|
|||||||
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
|
#define HAL_WITH_EKF_DOUBLE HAL_HAVE_HARDWARE_DOUBLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
// allow for static semaphores
|
// allow for static semaphores
|
||||||
#include <AP_HAL_ChibiOS/Semaphores.h>
|
#include <AP_HAL_ChibiOS/Semaphores.h>
|
||||||
#define HAL_Semaphore ChibiOS::Semaphore
|
#define HAL_Semaphore ChibiOS::Semaphore
|
||||||
|
|
||||||
#include <AP_HAL/EventHandle.h>
|
#include <AP_HAL/EventHandle.h>
|
||||||
#define HAL_EventHandle AP_HAL::EventHandle
|
#define HAL_EventHandle AP_HAL::EventHandle
|
||||||
|
#endif
|
||||||
|
|
||||||
/* string names for well known SPI devices */
|
/* string names for well known SPI devices */
|
||||||
#define HAL_BARO_MS5611_NAME "ms5611"
|
#define HAL_BARO_MS5611_NAME "ms5611"
|
||||||
|
@ -23,9 +23,11 @@
|
|||||||
#define O_CLOEXEC 0
|
#define O_CLOEXEC 0
|
||||||
#define HAL_STORAGE_SIZE (16384)
|
#define HAL_STORAGE_SIZE (16384)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
// allow for static semaphores
|
// allow for static semaphores
|
||||||
#include <AP_HAL_ESP32/Semaphores.h>
|
#include <AP_HAL_ESP32/Semaphores.h>
|
||||||
#define HAL_Semaphore ESP32::Semaphore
|
#define HAL_Semaphore ESP32::Semaphore
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HAL_NUM_CAN_IFACES 0
|
#define HAL_NUM_CAN_IFACES 0
|
||||||
#define HAL_MEM_CLASS HAL_MEM_CLASS_192
|
#define HAL_MEM_CLASS HAL_MEM_CLASS_192
|
||||||
|
@ -380,10 +380,13 @@
|
|||||||
#define HAL_LINUX_I2C_EXTERNAL_BUS_MASK 0xFFFF
|
#define HAL_LINUX_I2C_EXTERNAL_BUS_MASK 0xFFFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// only include if compiling C++ code
|
||||||
|
#ifdef __cplusplus
|
||||||
#include <AP_HAL_Linux/Semaphores.h>
|
#include <AP_HAL_Linux/Semaphores.h>
|
||||||
#define HAL_Semaphore Linux::Semaphore
|
#define HAL_Semaphore Linux::Semaphore
|
||||||
#include <AP_HAL/EventHandle.h>
|
#include <AP_HAL/EventHandle.h>
|
||||||
#define HAL_EventHandle AP_HAL::EventHandle
|
#define HAL_EventHandle AP_HAL::EventHandle
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAL_HAVE_HARDWARE_DOUBLE
|
#ifndef HAL_HAVE_HARDWARE_DOUBLE
|
||||||
#define HAL_HAVE_HARDWARE_DOUBLE 1
|
#define HAL_HAVE_HARDWARE_DOUBLE 1
|
||||||
|
@ -50,12 +50,15 @@
|
|||||||
#define HAL_HAVE_SERVO_VOLTAGE 1
|
#define HAL_HAVE_SERVO_VOLTAGE 1
|
||||||
#define HAL_HAVE_SAFETY_SWITCH 0
|
#define HAL_HAVE_SAFETY_SWITCH 0
|
||||||
|
|
||||||
|
// only include if compiling C++ code
|
||||||
|
#ifdef __cplusplus
|
||||||
// allow for static semaphores
|
// allow for static semaphores
|
||||||
#include <AP_HAL_SITL/Semaphores.h>
|
#include <AP_HAL_SITL/Semaphores.h>
|
||||||
#define HAL_Semaphore HALSITL::Semaphore
|
#define HAL_Semaphore HALSITL::Semaphore
|
||||||
|
|
||||||
#include <AP_HAL/EventHandle.h>
|
#include <AP_HAL/EventHandle.h>
|
||||||
#define HAL_EventHandle AP_HAL::EventHandle
|
#define HAL_EventHandle AP_HAL::EventHandle
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAL_NUM_CAN_IFACES
|
#ifndef HAL_NUM_CAN_IFACES
|
||||||
#define HAL_NUM_CAN_IFACES 0
|
#define HAL_NUM_CAN_IFACES 0
|
||||||
|
Loading…
Reference in New Issue
Block a user