mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-06 16:08:28 -04:00
3b697fe299
* I'd love to build a proper abstraction for logging, but I don't have the time to do so right now. * The dataflash libs need to be pushed into the AP_HAL_AVR anyway, so I'll do that now and replace the interface with a better logging driver later.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
|
|
#ifndef __AP_HAL_AVR_HAL_AVR_H__
|
|
#define __AP_HAL_AVR_HAL_AVR_H__
|
|
|
|
#include <AP_HAL.h>
|
|
#include "AP_HAL_AVR_Namespace.h"
|
|
#include "utility/ISRRegistry.h"
|
|
|
|
/**
|
|
* HAL_AVR class derives from HAL but provides an AVR-specific
|
|
* init method.
|
|
*/
|
|
|
|
class AP_HAL_AVR::HAL_AVR : public AP_HAL::HAL {
|
|
public:
|
|
HAL_AVR(
|
|
AP_HAL::UARTDriver* _uart0,
|
|
AP_HAL::UARTDriver* _uart1,
|
|
AP_HAL::UARTDriver* _uart2,
|
|
AP_HAL::UARTDriver* _uart3,
|
|
AP_HAL::I2CDriver* _i2c,
|
|
AP_HAL::SPIDriver* _spi,
|
|
AP_HAL::AnalogIn* _analogIn,
|
|
AP_HAL::Storage* _storage,
|
|
AP_HAL::Dataflash* _dataflash,
|
|
AP_HAL::BetterStream* _console,
|
|
AP_HAL::GPIO* _gpio,
|
|
AP_HAL::RCInput* _rcin,
|
|
AP_HAL::RCOutput* _rcout,
|
|
AP_HAL::Scheduler* _scheduler)
|
|
: AP_HAL::HAL( _uart0, _uart1, _uart2, _uart3,
|
|
_i2c, _spi, _analogIn, _storage,
|
|
_dataflash, _console, _gpio, _rcin,
|
|
_rcout, _scheduler) {}
|
|
|
|
void init(void* opts) const;
|
|
AP_HAL_AVR::ISRRegistry isr_registry;
|
|
};
|
|
#endif // __AP_HAL_AVR_HAL_AVR_H__
|
|
|