Back in Action!!
This commit is contained in:
parent
2cfd0720d5
commit
88943b0aee
7 changed files with 28 additions and 19 deletions
|
@ -76,7 +76,7 @@ target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
|||
target_sources(app PRIVATE src/endpoints.c)
|
||||
target_sources(app PRIVATE src/hid_listener.c)
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_IS31FL3733 app PRIVATE src/led_perkey.c)
|
||||
add_subdirectory(src/display/)
|
||||
|
||||
zephyr_cc_option(-Wfatal-errors)
|
||||
|
|
8
app/drivers/gpio/CMakeLists.txt
Normal file
8
app/drivers/gpio/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
zephyr_library_named(zmk__drivers__gpio)
|
||||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
zephyr_library_sources_ifdef(CONFIG_GPIO_MCP23017 gpio_mcp23017.c)
|
||||
zephyr_library_sources_ifndef(CONFIG_GPIO_MCP23017 ${ZEPHYR_BASE}/misc/empty_file.c)
|
|
@ -1,16 +1,8 @@
|
|||
|
||||
# Copyright (c) 2020 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
#zephyr_library()
|
||||
zephyr_library()
|
||||
|
||||
#zephyr_library_sources(led.c)
|
||||
>>>>>>> Stashed changes
|
||||
=======
|
||||
#zephyr_library()
|
||||
|
||||
#zephyr_library_sources(led.c)
|
||||
>>>>>>> Stashed changes
|
||||
add_subdirectory_ifdef(CONFIG_IS31FL3733 is31fl3733)
|
||||
zephyr_library_sources(led.c)
|
||||
add_subdirectory_ifdef(CONFIG_IS31FL3733 is31fl3733)
|
0
app/drivers/led/led.c
Normal file
0
app/drivers/led/led.c
Normal file
9
app/include/zmk/led_perkey.h
Normal file
9
app/include/zmk/led_perkey.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
int led_perkey_init(char *name);
|
|
@ -80,11 +80,8 @@ void zmk_kscan_process_msgxq(struct k_work *item) {
|
|||
else{
|
||||
set_led_rgb(led_lookup_matrix[position], led_base_color);
|
||||
}
|
||||
pos_evx = new_position_state_changed();
|
||||
pos_evx->state = pressed;
|
||||
pos_evx->position = position;
|
||||
pos_evx->timestamp = k_uptime_get();
|
||||
ZMK_EVENT_RAISE(pos_evx);
|
||||
ZMK_EVENT_RAISE(new_zmk_position_state_changed((struct zmk_position_state_changed){
|
||||
.state = pressed, .position = position, .timestamp = k_uptime_get()}));
|
||||
}
|
||||
}
|
||||
void set_all_on(const struct device *dev){
|
||||
|
|
|
@ -16,6 +16,7 @@ LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/kscan.h>
|
||||
#include <zmk/display.h>
|
||||
#include <drivers/ext_power.h>
|
||||
#include <zmk/led_perkey.h>
|
||||
|
||||
#define ZMK_KSCAN_DEV DT_LABEL(ZMK_MATRIX_NODE_ID)
|
||||
|
||||
|
@ -25,7 +26,9 @@ void main(void) {
|
|||
if (zmk_kscan_init(ZMK_KSCAN_DEV) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IS31FL3733
|
||||
led_perkey_init(ZMK_KSCAN_DEV);
|
||||
#endif /* CONFIG_IS31fl3733 */
|
||||
#ifdef CONFIG_ZMK_DISPLAY
|
||||
zmk_display_init();
|
||||
#endif /* CONFIG_ZMK_DISPLAY */
|
||||
|
|
Loading…
Add table
Reference in a new issue