Browse Source
* 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.master
Pat Hickey
13 years ago
committed by
Andrew Tridgell
10 changed files with 53 additions and 54 deletions
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
|
||||
#ifndef __AP_HAL_DATAFLASH_H__ |
||||
#define __AP_HAL_DATAFLASH_H__ |
||||
|
||||
#include "AP_HAL_Namespace.h" |
||||
|
||||
class AP_HAL::Dataflash { |
||||
public: |
||||
virtual void init(int machtnicht) = 0; |
||||
}; |
||||
|
||||
#endif // __AP_HAL_DATAFLASH_H__
|
||||
|
@ -1,14 +0,0 @@
@@ -1,14 +0,0 @@
|
||||
|
||||
#ifndef __AP_HAL_LOG_H__ |
||||
#define __AP_HAL_LOG_H__ |
||||
|
||||
#include "AP_HAL_Namespace.h" |
||||
|
||||
class AP_HAL::Log{ |
||||
public: |
||||
Log() {} |
||||
virtual void init(int machtnicht) = 0; |
||||
}; |
||||
|
||||
#endif // __AP_HAL_LOG_H__
|
||||
|
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef __AP_HAL_AVR_DATAFLASH_H__ |
||||
#define __AP_HAL_AVR_DATAFLASH_H__ |
||||
|
||||
#include <AP_HAL.h> |
||||
#include "AP_HAL_AVR_Namespace.h" |
||||
|
||||
class AP_HAL_AVR::APM1Dataflash : public AP_HAL::Dataflash { |
||||
public: |
||||
APM1Dataflash() : _init(0) {} |
||||
void init(int machtnicht) { _init = 1; } |
||||
private: |
||||
int _init; |
||||
}; |
||||
|
||||
class AP_HAL_AVR::APM2Dataflash : public AP_HAL::Dataflash { |
||||
public: |
||||
APM2Dataflash() : _init(0) {} |
||||
void init(int machtnicht) { _init = 2; } |
||||
private: |
||||
int _init; |
||||
}; |
||||
|
||||
#endif // __AP_HAL_AVR_DATAFLASH_H__
|
||||
|
@ -1,25 +0,0 @@
@@ -1,25 +0,0 @@
|
||||
|
||||
#ifndef __AP_HAL_AVR_LOG_H__ |
||||
#define __AP_HAL_AVR_LOG_H__ |
||||
|
||||
#include <AP_HAL.h> |
||||
#include "AP_HAL_AVR_Namespace.h" |
||||
|
||||
class AP_HAL_AVR::DataFlashAPM1Log : public AP_HAL::Log { |
||||
public: |
||||
DataFlashAPM1Log() : _init(0) {} |
||||
void init(int machtnicht) { _init = 1; } |
||||
private: |
||||
int _init; |
||||
}; |
||||
|
||||
class AP_HAL_AVR::DataFlashAPM2Log : public AP_HAL::Log { |
||||
public: |
||||
DataFlashAPM2Log() : _init(0) {} |
||||
void init(int machtnicht) { _init = 2; } |
||||
private: |
||||
int _init; |
||||
}; |
||||
|
||||
#endif // __AP_HAL_AVR_LOG_H__
|
||||
|
Loading…
Reference in new issue