Skip to content

Commit 3bc9319

Browse files
vikrant8052jhedberg
authored andcommitted
sample: mesh: nrf52: coding style improvement
Adjusted lines which are crssing limit of 80 characters to remove check Warnings. Signed-off-by: Vikrant More <[email protected]>
1 parent 3ed87e4 commit 3bc9319

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/src/app_gpio.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ void app_gpio_init(void)
5555
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
5656
GPIO_PUD_PULL_UP |
5757
GPIO_INT_DEBOUNCE | GPIO_INT_ACTIVE_LOW));
58-
gpio_init_callback(&button_cb[0], button_pressed, BIT(DT_ALIAS_SW0_GPIOS_PIN));
58+
gpio_init_callback(&button_cb[0],
59+
button_pressed,
60+
BIT(DT_ALIAS_SW0_GPIOS_PIN));
5961
gpio_add_callback(button_device[0], &button_cb[0]);
6062
gpio_pin_enable_callback(button_device[0], DT_ALIAS_SW0_GPIOS_PIN);
6163

@@ -64,7 +66,9 @@ void app_gpio_init(void)
6466
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
6567
GPIO_PUD_PULL_UP |
6668
GPIO_INT_DEBOUNCE | GPIO_INT_ACTIVE_LOW));
67-
gpio_init_callback(&button_cb[1], button_pressed, BIT(DT_ALIAS_SW1_GPIOS_PIN));
69+
gpio_init_callback(&button_cb[1],
70+
button_pressed,
71+
BIT(DT_ALIAS_SW1_GPIOS_PIN));
6872
gpio_add_callback(button_device[1], &button_cb[1]);
6973
gpio_pin_enable_callback(button_device[1], DT_ALIAS_SW1_GPIOS_PIN);
7074

@@ -73,7 +77,9 @@ void app_gpio_init(void)
7377
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
7478
GPIO_PUD_PULL_UP |
7579
GPIO_INT_DEBOUNCE | GPIO_INT_ACTIVE_LOW));
76-
gpio_init_callback(&button_cb[2], button_pressed, BIT(DT_ALIAS_SW2_GPIOS_PIN));
80+
gpio_init_callback(&button_cb[2],
81+
button_pressed,
82+
BIT(DT_ALIAS_SW2_GPIOS_PIN));
7783
gpio_add_callback(button_device[2], &button_cb[2]);
7884
gpio_pin_enable_callback(button_device[2], DT_ALIAS_SW2_GPIOS_PIN);
7985

@@ -82,7 +88,9 @@ void app_gpio_init(void)
8288
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
8389
GPIO_PUD_PULL_UP |
8490
GPIO_INT_DEBOUNCE | GPIO_INT_ACTIVE_LOW));
85-
gpio_init_callback(&button_cb[3], button_pressed, BIT(DT_ALIAS_SW3_GPIOS_PIN));
91+
gpio_init_callback(&button_cb[3],
92+
button_pressed,
93+
BIT(DT_ALIAS_SW3_GPIOS_PIN));
8694
gpio_add_callback(button_device[3], &button_cb[3]);
8795
gpio_pin_enable_callback(button_device[3], DT_ALIAS_SW3_GPIOS_PIN);
8896
}

samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/src/mesh/no_transition_work_handler.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ static void no_transition_work_handler(struct k_work *work)
6868
update_led_gpio();
6969
}
7070

71-
k_timer_start(&unsolicitedly_publish_states_timer, K_MSEC(5000), K_NO_WAIT);
71+
k_timer_start(&unsolicitedly_publish_states_timer,
72+
K_MSEC(5000),
73+
K_NO_WAIT);
7274
}
7375

7476
K_WORK_DEFINE(no_transition_work, no_transition_work_handler);

samples/boards/nrf52/mesh/onoff_level_lighting_vnd_app/src/mesh/publisher.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ void publish(struct k_work *work)
5858
net_buf_simple_add_u8(vnd_models[0].pub->msg, tid_vnd++);
5959
err = bt_mesh_model_publish(&vnd_models[0]);
6060
#endif
61-
} else if (button_read(button_device[1], DT_ALIAS_SW1_GPIOS_PIN) == 0U) {
61+
} else if (button_read(button_device[1], DT_ALIAS_SW1_GPIOS_PIN) ==
62+
0U) {
6263
#if defined(ONOFF)
6364
bt_mesh_model_msg_init(root_models[3].pub->msg,
6465
BT_MESH_MODEL_OP_GEN_ONOFF_SET_UNACK);
@@ -80,7 +81,8 @@ void publish(struct k_work *work)
8081
net_buf_simple_add_u8(vnd_models[0].pub->msg, tid_vnd++);
8182
err = bt_mesh_model_publish(&vnd_models[0]);
8283
#endif
83-
} else if (button_read(button_device[2], DT_ALIAS_SW2_GPIOS_PIN) == 0U) {
84+
} else if (button_read(button_device[2], DT_ALIAS_SW2_GPIOS_PIN) ==
85+
0U) {
8486
#if defined(GENERIC_LEVEL)
8587
bt_mesh_model_msg_init(root_models[5].pub->msg,
8688
BT_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK);
@@ -150,7 +152,8 @@ void publish(struct k_work *work)
150152
net_buf_simple_add_u8(root_models[16].pub->msg, tid_level++);
151153
err = bt_mesh_model_publish(&root_models[16]);
152154
#endif
153-
} else if (button_read(button_device[3], DT_ALIAS_SW3_GPIOS_PIN) == 0U) {
155+
} else if (button_read(button_device[3], DT_ALIAS_SW3_GPIOS_PIN) ==
156+
0U) {
154157
#if defined(GENERIC_LEVEL)
155158
bt_mesh_model_msg_init(root_models[5].pub->msg,
156159
BT_MESH_MODEL_OP_GEN_LEVEL_SET_UNACK);

0 commit comments

Comments
 (0)