AP_HAL_Empty: move implementations of functions to header

Makes it much clearer what's implemented and what's dangling
This commit is contained in:
Peter Barker 2022-06-22 23:09:26 +10:00 committed by Andrew Tridgell
parent 881d9764d4
commit 2d3092407f
2 changed files with 9 additions and 45 deletions

View File

@ -1,36 +0,0 @@
#include "Scheduler.h"
#include <stdarg.h>
using namespace Empty;
extern const AP_HAL::HAL& hal;
Scheduler::Scheduler()
{}
void Scheduler::init()
{}
void Scheduler::delay(uint16_t ms)
{}
void Scheduler::delay_microseconds(uint16_t us)
{}
void Scheduler::register_timer_process(AP_HAL::MemberProc k)
{}
void Scheduler::register_io_process(AP_HAL::MemberProc k)
{}
void Scheduler::register_timer_failsafe(AP_HAL::Proc, uint32_t period_us)
{}
void Scheduler::set_system_initialized()
{}
void Scheduler::reboot(bool hold_in_bootloader) {
for(;;);
}

View File

@ -4,18 +4,18 @@
class Empty::Scheduler : public AP_HAL::Scheduler {
public:
Scheduler();
void init() override;
void delay(uint16_t ms) override;
void delay_microseconds(uint16_t us) override;
void register_timer_process(AP_HAL::MemberProc) override;
void register_io_process(AP_HAL::MemberProc) override;
Scheduler() {}
void init() override {}
void delay(uint16_t ms) override {}
void delay_microseconds(uint16_t us) override {}
void register_timer_process(AP_HAL::MemberProc) override {}
void register_io_process(AP_HAL::MemberProc) override {}
void register_timer_failsafe(AP_HAL::Proc, uint32_t period_us) override;
void register_timer_failsafe(AP_HAL::Proc, uint32_t period_us) override {}
void set_system_initialized() override;
void set_system_initialized() override {}
bool is_system_initialized() override { return true; }
void reboot(bool hold_in_bootloader) override;
void reboot(bool hold_in_bootloader) override { for (;;); }
};