2012-08-22 21:40:19 -03:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_AVR_HAL_AVR_H__
|
|
|
|
#define __AP_HAL_AVR_HAL_AVR_H__
|
|
|
|
|
|
|
|
#include <AP_HAL.h>
|
|
|
|
#include "AP_HAL_AVR_Namespace.h"
|
2012-08-27 15:45:42 -03:00
|
|
|
#include "utility/ISRRegistry.h"
|
2012-08-22 21:40:19 -03:00
|
|
|
|
2012-08-27 15:44:50 -03:00
|
|
|
/**
|
|
|
|
* HAL_AVR class derives from HAL but provides an AVR-specific
|
2012-08-22 21:40:19 -03:00
|
|
|
* init method.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class AP_HAL_AVR::HAL_AVR : public AP_HAL::HAL {
|
|
|
|
public:
|
|
|
|
HAL_AVR(
|
2012-12-04 18:16:14 -04:00
|
|
|
AP_HAL::UARTDriver* _uartA,
|
|
|
|
AP_HAL::UARTDriver* _uartB,
|
|
|
|
AP_HAL::UARTDriver* _uartC,
|
2012-08-22 21:40:19 -03:00
|
|
|
AP_HAL::I2CDriver* _i2c,
|
2012-11-28 21:57:20 -04:00
|
|
|
AP_HAL::SPIDeviceManager* _spi,
|
2012-09-10 23:05:22 -03:00
|
|
|
AP_HAL::AnalogIn* _analogin,
|
2012-08-22 21:40:19 -03:00
|
|
|
AP_HAL::Storage* _storage,
|
2012-08-31 14:48:37 -03:00
|
|
|
AP_HAL::Dataflash* _dataflash,
|
2012-09-14 14:58:55 -03:00
|
|
|
AP_HAL::ConsoleDriver* _console,
|
2012-08-22 21:40:19 -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-12-04 18:16:14 -04:00
|
|
|
: AP_HAL::HAL( _uartA, _uartB, _uartC,
|
2012-09-10 23:05:22 -03:00
|
|
|
_i2c, _spi, _analogin, _storage,
|
2012-08-31 14:48:37 -03:00
|
|
|
_dataflash, _console, _gpio, _rcin,
|
2012-08-27 15:44:50 -03:00
|
|
|
_rcout, _scheduler) {}
|
2012-08-22 21:40:19 -03:00
|
|
|
|
|
|
|
void init(void* opts) const;
|
2012-08-27 15:45:42 -03:00
|
|
|
AP_HAL_AVR::ISRRegistry isr_registry;
|
2012-08-22 21:40:19 -03:00
|
|
|
};
|
|
|
|
#endif // __AP_HAL_AVR_HAL_AVR_H__
|
|
|
|
|