DelayTimer.cpp Код (C++): #include "DelayTimer.h" DelayTimer::DelayTimer() { m_running = false; m_count = 0; } void DelayTimer::add(unsigned int delay_ms, callback f, void *param = NULL) { struct task * const slot = DelayTimer::slotFree(); if (slot){ slot->callback = f; slot->param = param; slot->start = millis(); slot->delay = delay_ms; m_count++; } } void DelayTimer::start() { m_running = true; } void DelayTimer::stop() { m_running = false; } void DelayTimer::clear() { for (size_t i = 0; i < TIMER_MAX_TASKS; ++i) { struct task * const task = &tasks[i]; remove(task); } m_count = 0; } void DelayTimer::remove(struct task *task) { task->callback = NULL; task->param = NULL; task->start = 0; task->delay = 0; m_count--; if(m_count < 1 ) m_running = false; } void DelayTimer::loop() { if(m_running){ unsigned long now = millis(); for (size_t i = 0; i < TIMER_MAX_TASKS; ++i) { struct task * const task = &tasks[i]; const unsigned long duration = now - task->start; if (task->callback && duration >= task->delay) { task->callback(task->param); remove(task); } } } } struct task *DelayTimer::slotFree() { for (size_t i = 0; i < TIMER_MAX_TASKS; ++i) { struct task * const slot = &tasks[i]; if (slot->callback == NULL) return slot; } return NULL; } DelayTimer.h Код (C++): #ifndef DelayTimer_h #define DelayTimer_h #if ARDUINO >= 100 #include <Arduino.h> #else #include <WProgram.h> #endif #define TIMER_MAX_TASKS 0x32 typedef void (*callback)(void *param); class DelayTimer { public: DelayTimer(); void add(unsigned int, callback, void *); void start(); void stop(); void clear(); void loop(); private: struct task { callback callback; unsigned long start, delay; void *param; } tasks[TIMER_MAX_TASKS]; boolean m_running; unsigned int m_count; void remove(struct task *task); struct task *slotFree(); }; #endif ошибка DelayTimer.cpp:67:14: error: prototype for 'task* DelayTimer::slotFree()' does not match any in class 'DelayTimer' struct task *DelayTimer::slotFree() что я делаю не так?