Skip to content

Commit

Permalink
mbtn definitions variable name change
Browse files Browse the repository at this point in the history
  • Loading branch information
smartmx committed Feb 28, 2022
1 parent dda3fe2 commit eb9cf39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ MFBD_NBTN_DEFINE(test_nbtn1, GPIO_Pin_14, 3, 0, 150, 0x1401, 0x1400, 0x1402, NUL
```c
/* use #define to declare the mfbd button object easily. */
#define MFBD_MBTN_DEFINE(NAME, BTN_INDEX, FILTER_TIME, REPEAT_TIME, LONG_TIME, MULTICLICK_TIME, BTN_UP_CODE, BTN_LONG_CODE, NEXT, BTN_DOWN_CODE,...) \
static const mfbd_btn_code_t NAME##_CodeDown[MFBD_MULTI_MAX_CLICK + 1] = {BTN_DOWN_CODE,__VA_ARGS__}; \
static const mfbd_btn_code_t NAME##_down_codes[MFBD_MULTI_MAX_CLICK + 1] = {BTN_DOWN_CODE,__VA_ARGS__}; \
static const mfbd_mbtn_info_t NAME##_info = { \
FILTER_TIME, \
REPEAT_TIME, \
LONG_TIME, \
MULTICLICK_TIME, \
NAME##_CodeDown, \
NAME##_down_codes, \
BTN_UP_CODE, \
BTN_LONG_CODE, \
BTN_INDEX, \
Expand Down
4 changes: 2 additions & 2 deletions mfbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ extern void mfbd_mbtn_scan(const mfbd_group_t *_pbtn_group);

/* use #define to declare the mfbd button object easily. */
#define MFBD_MBTN_DEFINE(NAME, BTN_INDEX, FILTER_TIME, REPEAT_TIME, LONG_TIME, MULTICLICK_TIME, BTN_UP_CODE, BTN_LONG_CODE, NEXT, BTN_DOWN_CODE,...) \
static const mfbd_btn_code_t NAME##_CodeDown[MFBD_MULTI_MAX_CLICK + 1] = {BTN_DOWN_CODE,__VA_ARGS__}; \
static const mfbd_btn_code_t NAME##_down_codes[MFBD_MULTI_MAX_CLICK + 1] = {BTN_DOWN_CODE,__VA_ARGS__}; \
static const mfbd_mbtn_info_t NAME##_info = { \
FILTER_TIME, \
REPEAT_TIME, \
LONG_TIME, \
MULTICLICK_TIME, \
NAME##_CodeDown, \
NAME##_down_codes, \
BTN_UP_CODE, \
BTN_LONG_CODE, \
BTN_INDEX, \
Expand Down

0 comments on commit eb9cf39

Please sign in to comment.