2012-12-17 15:54:55 -04:00
|
|
|
|
|
|
|
#include "Scheduler.h"
|
|
|
|
|
2015-10-22 14:15:05 -03:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2012-12-17 15:54:55 -04:00
|
|
|
using namespace Empty;
|
|
|
|
|
2012-12-17 20:28:22 -04:00
|
|
|
extern const AP_HAL::HAL& hal;
|
|
|
|
|
2012-12-17 15:54:55 -04:00
|
|
|
EmptyScheduler::EmptyScheduler()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptyScheduler::init(void* machtnichts)
|
|
|
|
{}
|
|
|
|
|
2012-12-19 22:16:10 -04:00
|
|
|
void EmptyScheduler::delay(uint16_t ms)
|
2012-12-17 15:54:55 -04:00
|
|
|
{}
|
|
|
|
|
2014-08-19 18:59:21 -03:00
|
|
|
uint64_t EmptyScheduler::millis64() {
|
2012-12-17 15:54:55 -04:00
|
|
|
return 10000;
|
|
|
|
}
|
|
|
|
|
2014-08-19 18:59:21 -03:00
|
|
|
uint64_t EmptyScheduler::micros64() {
|
2012-12-17 15:54:55 -04:00
|
|
|
return 200000;
|
|
|
|
}
|
|
|
|
|
2014-08-19 18:59:21 -03:00
|
|
|
uint32_t EmptyScheduler::millis() {
|
|
|
|
return millis64();
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t EmptyScheduler::micros() {
|
|
|
|
return micros64();
|
|
|
|
}
|
|
|
|
|
2012-12-17 15:54:55 -04:00
|
|
|
void EmptyScheduler::delay_microseconds(uint16_t us)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptyScheduler::register_delay_callback(AP_HAL::Proc k,
|
|
|
|
uint16_t min_time_ms)
|
|
|
|
{}
|
|
|
|
|
2013-09-30 07:35:52 -03:00
|
|
|
void EmptyScheduler::register_timer_process(AP_HAL::MemberProc k)
|
2012-12-17 15:54:55 -04:00
|
|
|
{}
|
|
|
|
|
2013-09-30 07:35:52 -03:00
|
|
|
void EmptyScheduler::register_io_process(AP_HAL::MemberProc k)
|
2013-09-22 03:00:15 -03:00
|
|
|
{}
|
|
|
|
|
2013-09-30 07:35:52 -03:00
|
|
|
void EmptyScheduler::register_timer_failsafe(AP_HAL::Proc, uint32_t period_us)
|
2012-12-17 15:54:55 -04:00
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptyScheduler::suspend_timer_procs()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptyScheduler::resume_timer_procs()
|
|
|
|
{}
|
|
|
|
|
2013-01-10 17:50:42 -04:00
|
|
|
bool EmptyScheduler::in_timerprocess() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-12-17 15:54:55 -04:00
|
|
|
void EmptyScheduler::begin_atomic()
|
|
|
|
{}
|
|
|
|
|
|
|
|
void EmptyScheduler::end_atomic()
|
|
|
|
{}
|
|
|
|
|
2013-01-10 17:50:42 -04:00
|
|
|
bool EmptyScheduler::system_initializing() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void EmptyScheduler::system_initialized()
|
|
|
|
{}
|
|
|
|
|
2015-10-26 08:25:44 -03:00
|
|
|
void EmptyScheduler::panic(const char *errormsg, ...)
|
2015-10-22 14:15:05 -03:00
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, errormsg);
|
2015-10-25 16:53:31 -03:00
|
|
|
hal.console->vprintf(errormsg, ap);
|
2015-10-22 14:15:05 -03:00
|
|
|
va_end(ap);
|
2015-10-25 17:10:41 -03:00
|
|
|
hal.console->printf("\n");
|
2015-10-22 14:15:05 -03:00
|
|
|
|
2012-12-17 20:28:22 -04:00
|
|
|
for(;;);
|
|
|
|
}
|
|
|
|
|
2013-09-03 22:58:13 -03:00
|
|
|
void EmptyScheduler::reboot(bool hold_in_bootloader) {
|
2012-12-17 15:54:55 -04:00
|
|
|
for(;;);
|
|
|
|
}
|