AP_HAL: make timed processes take void *argument

this allows the class to be passed in, meaning that drivers that use
register_timer_process() and register_io_process() don't need to use
static members. That results in simpler, easier to read code
This commit is contained in:
Andrew Tridgell 2013-09-28 16:23:34 +10:00
parent 1fd0f73e3f
commit f0f5761e8d
2 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ namespace AP_HAL {
/* Typdefs for function pointers (Procedure, Timed Procedure) */
typedef void(*Proc)(void);
typedef void(*TimedProc)(uint32_t);
typedef void(*TimedProc)(void *);
/**
* Global names for all of the existing SPI devices on all platforms.

View File

@ -19,10 +19,10 @@ public:
uint16_t min_time_ms) = 0;
// register a high priority timer task
virtual void register_timer_process(AP_HAL::TimedProc) = 0;
virtual void register_timer_process(AP_HAL::TimedProc, void *) = 0;
// register a low priority IO task
virtual void register_io_process(AP_HAL::TimedProc) = 0;
virtual void register_io_process(AP_HAL::TimedProc, void *) = 0;
// suspend and resume both timer and IO processes
virtual void suspend_timer_procs() = 0;