HAL_ChibiOS: fixed bootloader build

This commit is contained in:
Andrew Tridgell 2018-08-07 18:47:10 +10:00
parent a26e534654
commit d3af854949
6 changed files with 29 additions and 8 deletions

View File

@ -17,13 +17,14 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/utility/OwnPtr.h>
#include <stdio.h>
#if HAL_USE_I2C == TRUE || HAL_USE_SPI == TRUE
#include "Scheduler.h"
#include "Semaphores.h"
#include "Util.h"
#include "hwdef/common/stm32_util.h"
#if HAL_USE_I2C == TRUE || HAL_USE_SPI == TRUE
using namespace ChibiOS;
static const AP_HAL::HAL &hal = AP_HAL::get_HAL();

View File

@ -17,6 +17,10 @@
#include <inttypes.h>
#include <AP_HAL/HAL.h>
#include "Semaphores.h"
#include "AP_HAL_ChibiOS.h"
#if HAL_USE_I2C == TRUE || HAL_USE_SPI == TRUE
#include "Scheduler.h"
#include "shared_dma.h"
#include "hwdef/common/bouncebuffer.h"
@ -57,3 +61,6 @@ private:
};
}
#endif // I2C or SPI

View File

@ -17,14 +17,15 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_Math/AP_Math.h>
#include "Util.h"
#if HAL_USE_I2C == TRUE
#include "Scheduler.h"
#include "hwdef/common/stm32_util.h"
#include "ch.h"
#include "hal.h"
#if HAL_USE_I2C == TRUE
static const struct I2CInfo {
struct I2CDriver *i2c;
uint8_t dma_channel_rx;

View File

@ -24,12 +24,14 @@
#include <AP_HAL/HAL.h>
#include <AP_HAL/I2CDevice.h>
#include <AP_HAL/utility/OwnPtr.h>
#include "AP_HAL_ChibiOS.h"
#if HAL_USE_I2C == TRUE
#include "Semaphores.h"
#include "Device.h"
#include "shared_dma.h"
#if HAL_USE_I2C == TRUE
namespace ChibiOS {
class I2CBus : public DeviceBus {

View File

@ -17,12 +17,14 @@
#include <inttypes.h>
#include <AP_HAL/HAL.h>
#include <AP_HAL/SPIDevice.h>
#include "AP_HAL_ChibiOS.h"
#if HAL_USE_SPI == TRUE
#include "Semaphores.h"
#include "Scheduler.h"
#include "Device.h"
#if HAL_USE_SPI == TRUE
namespace ChibiOS {
class SPIBus : public DeviceBus {

View File

@ -1025,6 +1025,14 @@ def write_hwdef_header(outfilename):
#pragma once
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
''')
write_mcu_config(f)