2012-08-20 15:37:46 -03:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_HAL_H__
|
|
|
|
#define __AP_HAL_HAL_H__
|
|
|
|
|
|
|
|
#include "AP_HAL_Namespace.h"
|
|
|
|
|
|
|
|
#include "../AP_HAL/UARTDriver.h"
|
|
|
|
#include "../AP_HAL/SPIDriver.h"
|
|
|
|
#include "../AP_HAL/AnalogIn.h"
|
|
|
|
#include "../AP_HAL/Storage.h"
|
2012-08-31 14:48:37 -03:00
|
|
|
#include "../AP_HAL/Dataflash.h"
|
2012-09-14 14:58:19 -03:00
|
|
|
#include "../AP_HAL/Console.h"
|
2012-08-20 15:37:46 -03:00
|
|
|
#include "../AP_HAL/GPIO.h"
|
2012-08-27 15:44:50 -03:00
|
|
|
#include "../AP_HAL/RCInput.h"
|
|
|
|
#include "../AP_HAL/RCOutput.h"
|
2012-08-20 15:37:46 -03:00
|
|
|
|
|
|
|
class AP_HAL::HAL {
|
|
|
|
public:
|
|
|
|
HAL(AP_HAL::UARTDriver* _uart0,
|
|
|
|
AP_HAL::UARTDriver* _uart1,
|
|
|
|
AP_HAL::UARTDriver* _uart2,
|
|
|
|
AP_HAL::UARTDriver* _uart3,
|
|
|
|
AP_HAL::I2CDriver* _i2c,
|
2012-11-28 21:57:20 -04:00
|
|
|
AP_HAL::SPIDeviceManager* _spi,
|
2012-09-10 23:05:02 -03:00
|
|
|
AP_HAL::AnalogIn* _analogin,
|
2012-08-20 15:37:46 -03:00
|
|
|
AP_HAL::Storage* _storage,
|
2012-08-31 14:48:37 -03:00
|
|
|
AP_HAL::Dataflash* _dataflash,
|
2012-09-14 14:58:19 -03:00
|
|
|
AP_HAL::ConsoleDriver* _console,
|
2012-08-20 15:37:46 -03:00
|
|
|
AP_HAL::GPIO* _gpio,
|
2012-08-27 15:44:50 -03:00
|
|
|
AP_HAL::RCInput* _rcin,
|
|
|
|
AP_HAL::RCOutput* _rcout,
|
2012-08-23 15:36:13 -03:00
|
|
|
AP_HAL::Scheduler* _scheduler)
|
2012-08-20 15:37:46 -03:00
|
|
|
:
|
|
|
|
uart0(_uart0),
|
|
|
|
uart1(_uart1),
|
|
|
|
uart2(_uart2),
|
|
|
|
uart3(_uart3),
|
|
|
|
i2c(_i2c),
|
|
|
|
spi(_spi),
|
2012-09-10 23:05:02 -03:00
|
|
|
analogin(_analogin),
|
2012-08-20 15:37:46 -03:00
|
|
|
storage(_storage),
|
2012-08-31 14:48:37 -03:00
|
|
|
dataflash(_dataflash),
|
2012-08-20 15:37:46 -03:00
|
|
|
console(_console),
|
|
|
|
gpio(_gpio),
|
2012-08-27 15:44:50 -03:00
|
|
|
rcin(_rcin),
|
|
|
|
rcout(_rcout),
|
2012-08-23 15:36:13 -03:00
|
|
|
scheduler(_scheduler)
|
2012-08-20 15:37:46 -03:00
|
|
|
{}
|
|
|
|
|
2012-08-22 21:35:51 -03:00
|
|
|
virtual void init(void* opts) const = 0;
|
|
|
|
|
2012-08-20 15:37:46 -03:00
|
|
|
AP_HAL::UARTDriver* uart0;
|
|
|
|
AP_HAL::UARTDriver* uart1;
|
|
|
|
AP_HAL::UARTDriver* uart2;
|
|
|
|
AP_HAL::UARTDriver* uart3;
|
|
|
|
AP_HAL::I2CDriver* i2c;
|
2012-11-28 21:57:20 -04:00
|
|
|
AP_HAL::SPIDeviceManager* spi;
|
2012-09-10 23:05:02 -03:00
|
|
|
AP_HAL::AnalogIn* analogin;
|
2012-08-20 15:37:46 -03:00
|
|
|
AP_HAL::Storage* storage;
|
2012-08-31 14:48:37 -03:00
|
|
|
AP_HAL::Dataflash* dataflash;
|
2012-09-14 14:58:19 -03:00
|
|
|
AP_HAL::ConsoleDriver* console;
|
2012-08-20 15:37:46 -03:00
|
|
|
AP_HAL::GPIO* gpio;
|
2012-08-27 15:44:50 -03:00
|
|
|
AP_HAL::RCInput* rcin;
|
|
|
|
AP_HAL::RCOutput* rcout;
|
2012-08-23 15:36:13 -03:00
|
|
|
AP_HAL::Scheduler* scheduler;
|
2012-08-20 15:37:46 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AP_HAL_HAL_H__
|
|
|
|
|