mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
avoid the need for additional includes for task interfaces
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "GwButtonTask.h"
|
||||
#include "GwIButtonTask.h"
|
||||
#include "GwHardware.h"
|
||||
#include "GwApi.h"
|
||||
#include "GwLedTask.h"
|
||||
|
||||
@@ -4,4 +4,19 @@
|
||||
//task function
|
||||
void initButtons(GwApi *param);
|
||||
DECLARE_INITFUNCTION(initButtons);
|
||||
|
||||
class IButtonTask : public GwApi::TaskInterfaces::Base
|
||||
{
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
OFF,
|
||||
PRESSED,
|
||||
PRESSED_5, // 5...10s
|
||||
PRESSED_10 //>10s
|
||||
} ButtonState;
|
||||
ButtonState state=OFF;
|
||||
long pressCount=0;
|
||||
};
|
||||
DECLARE_TASKIF(IButtonTask);
|
||||
#endif
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef _GWIBUTTONTASK_H
|
||||
#define _GWIBUTTONTASK_H
|
||||
#include "GwApi.h"
|
||||
class IButtonTask : public GwApi::TaskInterfaces::Base
|
||||
{
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
OFF,
|
||||
PRESSED,
|
||||
PRESSED_5, // 5...10s
|
||||
PRESSED_10 //>10s
|
||||
} ButtonState;
|
||||
ButtonState state=OFF;
|
||||
long pressCount=0;
|
||||
};
|
||||
DECLARE_TASKIF(IButtonTask);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user