chore: clang-format the codebase.

* Use the LLVM style
* Override indent width (8) and column limit (100)
* Fixes #142.
This commit is contained in:
Pete Johanson
2020-09-13 22:53:24 -04:00
parent 296a89ce63
commit 191a2d755a
51 changed files with 2171 additions and 2547 deletions

View File

@@ -18,10 +18,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/ble.h>
static int on_keymap_binding_pressed(struct device *dev, u32_t position, u32_t command, u32_t arg)
{
switch (command)
{
static int on_keymap_binding_pressed(struct device *dev, u32_t position, u32_t command, u32_t arg) {
switch (command) {
case BT_CLR_CMD:
return zmk_ble_clear_bonds();
case BT_NXT_CMD:
@@ -37,13 +35,10 @@ static int on_keymap_binding_pressed(struct device *dev, u32_t position, u32_t c
return -ENOTSUP;
}
static int behavior_bt_init(struct device *dev)
{
return 0;
};
static int behavior_bt_init(struct device *dev) { return 0; };
static int on_keymap_binding_released(struct device *dev, u32_t position, u32_t command, u32_t arg)
{
static int on_keymap_binding_released(struct device *dev, u32_t position, u32_t command,
u32_t arg) {
return 0;
}
@@ -52,9 +47,5 @@ static const struct behavior_driver_api behavior_bt_driver_api = {
.binding_released = on_keymap_binding_released,
};
DEVICE_AND_API_INIT(behavior_bt, DT_INST_LABEL(0),
behavior_bt_init,
NULL,
NULL,
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
&behavior_bt_driver_api);
DEVICE_AND_API_INIT(behavior_bt, DT_INST_LABEL(0), behavior_bt_init, NULL, NULL, APPLICATION,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_bt_driver_api);