refactor: replace filename hyphens with underscores

Aligns *.h and *.c to underscore naming convention.

These were kept (with warnings) for backwards compatibility with external boards/shields:
- kscan-mock.h
- matrix-transform.h
They should be removed in the future.

PR: #523
This commit is contained in:
innovaker
2020-12-22 15:56:00 +00:00
committed by Pete Johanson
parent 6927abee6e
commit 842aa5a842
140 changed files with 195 additions and 177 deletions

View File

@@ -4,11 +4,6 @@
* SPDX-License-Identifier: MIT
*/
#pragma once
#warning "kscan-mock.h has been deprecated and superseded by kscan_mock.h"
#define ZMK_MOCK_IS_PRESS(v) ((v & (0x01 << 31)) != 0)
#define ZMK_MOCK_PRESS(row, col, msec) (row + (col << 8) + (msec << 16) + (0x01 << 31))
#define ZMK_MOCK_RELEASE(row, col, msec) (row + (col << 8) + (msec << 16))
#define ZMK_MOCK_ROW(v) (v & 0xFF)
#define ZMK_MOCK_COL(v) ((v >> 8) & 0xFF)
#define ZMK_MOCK_MSEC(v) ((v & ~(0x01 << 31)) >> 16)
#include "kscan_mock.h"

View File

@@ -0,0 +1,14 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#define ZMK_MOCK_IS_PRESS(v) ((v & (0x01 << 31)) != 0)
#define ZMK_MOCK_PRESS(row, col, msec) (row + (col << 8) + (msec << 16) + (0x01 << 31))
#define ZMK_MOCK_RELEASE(row, col, msec) (row + (col << 8) + (msec << 16))
#define ZMK_MOCK_ROW(v) (v & 0xFF)
#define ZMK_MOCK_COL(v) ((v >> 8) & 0xFF)
#define ZMK_MOCK_MSEC(v) ((v & ~(0x01 << 31)) >> 16)

View File

@@ -4,7 +4,6 @@
* SPDX-License-Identifier: MIT
*/
#define KT_ROW(item) (item >> 8)
#define KT_COL(item) (item & 0xFF)
#warning "matrix-transform.h has been deprecated and superseded by matrix_transform.h"
#define RC(row, col) (((row) << 8) + (col))
#include "matrix_transform.h"

View File

@@ -0,0 +1,10 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#define KT_ROW(item) (item >> 8)
#define KT_COL(item) (item & 0xFF)
#define RC(row, col) (((row) << 8) + (col))

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
#include <zmk/activity.h>
struct activity_state_changed {

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
struct battery_state_changed {
struct zmk_event_header header;

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
#include <device.h>
#include <zmk/ble/profile.h>

View File

@@ -9,7 +9,7 @@
#include <zephyr.h>
#include <dt-bindings/zmk/modifiers.h>
#include <dt-bindings/zmk/hid_usage_pages.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
#include <zmk/keys.h>
struct keycode_state_changed {

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
struct layer_state_changed {
struct zmk_event_header header;

View File

@@ -8,7 +8,7 @@
#include <zephyr.h>
#include <zmk/keys.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
struct modifiers_state_changed {
struct zmk_event_header header;

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
struct position_state_changed {
struct zmk_event_header header;

View File

@@ -7,7 +7,7 @@
#pragma once
#include <zephyr.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
#include <device.h>
struct sensor_event {

View File

@@ -9,7 +9,7 @@
#include <zephyr.h>
#include <usb/usb_device.h>
#include <zmk/event-manager.h>
#include <zmk/event_manager.h>
#include <zmk/usb.h>
struct usb_conn_state_changed {