Skip to content

Commit

Permalink
修正 G84-4100 的 LEDMAP 编译配置无法正常编译的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-kirisame committed Jul 13, 2020
1 parent adde9ea commit 4772892
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions application/main/project/app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ OPT += $(OPT_DEFS)

# C flags common to all targets
CFLAGS += $(OPT)
CFLAGS += -DNRF52_APP
CFLAGS += -DNRF52_PAN_74
CFLAGS += -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3
CFLAGS += -DNRF_DFU_SVCI_ENABLED
Expand Down
12 changes: 9 additions & 3 deletions keyboard/g84-4100/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#pragma once

#include "driver/ledmap/ledmap.h"
#include <stdint.h>

#ifdef NRF52_APP
#include "ledmap/ledmap.h"
#endif

/* USB和蓝牙的显示参数 */
#define VENDOR_ID 0x1209 /* USB VID */
#define PRODUCT_ID 0x0514 /* USB PID */
Expand Down Expand Up @@ -85,8 +88,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_DFU_START 24
#define LED_DFU_FINISH 23
// #define LED_DFU_POSITIVE
// 定义两个LED灯
static const struct ledmap_led ledmap_leds[] = { { .dir = 0, .pin = 25 }, { .dir = 0, .pin = 23 } };

// USB UART 传输配置
#define HAS_USB // 启用与CH554的通信支持
Expand Down Expand Up @@ -115,6 +116,10 @@ static const uint8_t column_pin_array[MATRIX_COLS] = { 16, 17, 18, 19, 20, 21, 2
#define DEBOUNCE 5 /* 硬件消抖次数,设置为0则不消抖 */
#define MATRIX_SCAN_DELAY_CYCLE 36 /* 按键扫描等待IO稳定的延时时长 */

#ifdef NRF52_APP
// 定义两个LED灯
static const struct ledmap_led ledmap_leds[] = { { .dir = 0, .pin = 25 }, { .dir = 0, .pin = 23 } };

// LED事件
static const struct ledmap_event ledmap_events[] = {
{
Expand Down Expand Up @@ -185,3 +190,4 @@ static const struct ledmap_event ledmap_events[] = {
.action = { .priority = 0, .action = TRIG_LED_ON },
},
};
#endif

0 comments on commit 4772892

Please sign in to comment.