feat: Add WPM calculator and display widget

This commit is contained in:
Ally Parker
2021-01-22 16:23:21 +00:00
committed by Pete Johanson
parent c0cab57c2d
commit a4aaa73f06
20 changed files with 306 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <kernel.h>
struct zmk_widget_wpm_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_wpm_status_init(struct zmk_widget_wpm_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_wpm_status_obj(struct zmk_widget_wpm_status *widget);

View File

@@ -0,0 +1,17 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <zephyr.h>
#include <zmk/event_manager.h>
#include <zmk/wpm.h>
struct zmk_wpm_state_changed {
int state;
};
ZMK_EVENT_DECLARE(zmk_wpm_state_changed);

9
app/include/zmk/wpm.h Normal file
View File

@@ -0,0 +1,9 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
int zmk_wpm_get_state();