mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 02:33:58 -04:00
HAL_AVR: use memcheck for available_memory()
This commit is contained in:
parent
172398a971
commit
75cb04dd8b
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "Scheduler.h"
|
#include "Scheduler.h"
|
||||||
#include "utility/ISRRegistry.h"
|
#include "utility/ISRRegistry.h"
|
||||||
|
#include "memcheck.h"
|
||||||
using namespace AP_HAL_AVR;
|
using namespace AP_HAL_AVR;
|
||||||
|
|
||||||
extern const AP_HAL::HAL& hal;
|
extern const AP_HAL::HAL& hal;
|
||||||
@ -53,6 +54,8 @@ void AVRScheduler::init(void* _isrregistry) {
|
|||||||
|
|
||||||
/* Turn on global interrupt flag, AVR interupt system will start from this point */
|
/* Turn on global interrupt flag, AVR interupt system will start from this point */
|
||||||
sei();
|
sei();
|
||||||
|
|
||||||
|
memcheck_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t AVRScheduler::micros() {
|
uint32_t AVRScheduler::micros() {
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
|
|
||||||
#include <AP_HAL.h>
|
#include <AP_HAL.h>
|
||||||
#include "AP_HAL_AVR_Namespace.h"
|
#include "AP_HAL_AVR_Namespace.h"
|
||||||
|
#include "memcheck.h"
|
||||||
|
|
||||||
class AP_HAL_AVR::AVRUtil : public AP_HAL::Util {
|
class AP_HAL_AVR::AVRUtil : public AP_HAL::Util {
|
||||||
public:
|
public:
|
||||||
bool run_debug_shell(AP_HAL::BetterStream *stream) { return false; }
|
bool run_debug_shell(AP_HAL::BetterStream *stream) { return false; }
|
||||||
|
uint16_t available_memory(void) { return memcheck_available_memory(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __AP_HAL_AVR_UTIL_H__
|
#endif // __AP_HAL_AVR_UTIL_H__
|
||||||
|
Loading…
Reference in New Issue
Block a user