2011-11-13 02:42:20 -04:00
|
|
|
|
|
|
|
#ifndef __AP_PERIODIC_PROCESS_STUB_H__
|
|
|
|
#define __AP_PERIODIC_PROCESS_STUB_H__
|
|
|
|
|
|
|
|
#include "PeriodicProcess.h"
|
|
|
|
#include "../Arduino_Mega_ISR_Registry/Arduino_Mega_ISR_Registry.h"
|
|
|
|
|
|
|
|
|
|
|
|
class AP_PeriodicProcessStub : public AP_PeriodicProcess
|
|
|
|
{
|
|
|
|
public:
|
2011-12-26 16:24:36 -04:00
|
|
|
AP_PeriodicProcessStub(uint8_t period = 0);
|
2011-11-13 02:42:20 -04:00
|
|
|
void init( Arduino_Mega_ISR_Registry * isr_reg );
|
2011-12-21 08:21:39 -04:00
|
|
|
void register_process(ap_procedure proc);
|
|
|
|
void set_failsafe(ap_procedure proc);
|
2011-11-13 02:42:20 -04:00
|
|
|
static void run(void);
|
|
|
|
protected:
|
2011-12-26 16:24:36 -04:00
|
|
|
static uint8_t _period;
|
2011-11-13 02:42:20 -04:00
|
|
|
static void (*_proc)(void);
|
2011-12-21 08:21:39 -04:00
|
|
|
static void (*_failsafe)(void);
|
2011-11-13 02:42:20 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|