|
|
|
@ -1,11 +1,9 @@
|
|
|
|
#include "button.h"
|
|
|
|
#include "button.h"
|
|
|
|
#include "string.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MultiButton
|
|
|
|
//MultiButton
|
|
|
|
|
|
|
|
|
|
|
|
#define HIGH 1
|
|
|
|
#define HIGH 1
|
|
|
|
#define LOW 0
|
|
|
|
#define LOW 0
|
|
|
|
|
|
|
|
|
|
|
|
#define TICKS_INTERVAL 5 //ms
|
|
|
|
#define TICKS_INTERVAL 5 //ms
|
|
|
|
|
|
|
|
|
|
|
|
const uint8_t kDebounceTicks = 3;
|
|
|
|
const uint8_t kDebounceTicks = 3;
|
|
|
|
@ -14,7 +12,6 @@ const uint16_t kLongTicks = (1000/TICKS_INTERVAL);
|
|
|
|
|
|
|
|
|
|
|
|
static struct Button* head_handle = NULL;
|
|
|
|
static struct Button* head_handle = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Initializes the button struct handle.
|
|
|
|
* @brief Initializes the button struct handle.
|
|
|
|
* @param handle: the button handle strcut.
|
|
|
|
* @param handle: the button handle strcut.
|
|
|
|
|