Skip to content

Commit 477ed81

Browse files
martinjaegernvlsianpu
authored andcommitted
boot: zephyr: main: fix indentation
No functional changes. Signed-off-by: Martin Jäger <[email protected]>
1 parent 888e261 commit 477ed81

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

boot/zephyr/main.c

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,13 @@ static const struct gpio_dt_spec led0 = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
136136

137137
void led_init(void)
138138
{
139+
if (!device_is_ready(led0.port)) {
140+
BOOT_LOG_ERR("Didn't find LED device referred by the LED0_NODE\n");
141+
return;
142+
}
139143

140-
if (!device_is_ready(led0.port)) {
141-
BOOT_LOG_ERR("Didn't find LED device referred by the LED0_NODE\n");
142-
return;
143-
}
144-
145-
gpio_pin_configure_dt(&led0, GPIO_OUTPUT);
146-
gpio_pin_set_dt(&led0, 0);
147-
144+
gpio_pin_configure_dt(&led0, GPIO_OUTPUT);
145+
gpio_pin_set_dt(&led0, 0);
148146
}
149147
#endif /* CONFIG_MCUBOOT_INDICATION_LED */
150148

@@ -290,7 +288,7 @@ static void do_boot(struct boot_rsp *rsp)
290288
static void do_boot(struct boot_rsp *rsp)
291289
{
292290
void *start;
293-
291+
294292
#if defined(MCUBOOT_RAM_LOAD)
295293
start = (void *)(rsp->br_hdr->ih_load_addr + rsp->br_hdr->ih_hdr_size);
296294
#else
@@ -326,30 +324,30 @@ void boot_log_thread_func(void *dummy1, void *dummy2, void *dummy3)
326324
(void)dummy2;
327325
(void)dummy3;
328326

329-
log_init();
327+
log_init();
330328

331-
while (1) {
332-
if (log_process(false) == false) {
333-
if (boot_log_stop) {
334-
break;
335-
}
336-
k_sleep(BOOT_LOG_PROCESSING_INTERVAL);
337-
}
338-
}
329+
while (1) {
330+
if (log_process(false) == false) {
331+
if (boot_log_stop) {
332+
break;
333+
}
334+
k_sleep(BOOT_LOG_PROCESSING_INTERVAL);
335+
}
336+
}
339337

340-
k_sem_give(&boot_log_sem);
338+
k_sem_give(&boot_log_sem);
341339
}
342340

343341
void zephyr_boot_log_start(void)
344342
{
345-
/* start logging thread */
346-
k_thread_create(&boot_log_thread, boot_log_stack,
347-
K_THREAD_STACK_SIZEOF(boot_log_stack),
348-
boot_log_thread_func, NULL, NULL, NULL,
349-
K_HIGHEST_APPLICATION_THREAD_PRIO, 0,
350-
BOOT_LOG_PROCESSING_INTERVAL);
351-
352-
k_thread_name_set(&boot_log_thread, "logging");
343+
/* start logging thread */
344+
k_thread_create(&boot_log_thread, boot_log_stack,
345+
K_THREAD_STACK_SIZEOF(boot_log_stack),
346+
boot_log_thread_func, NULL, NULL, NULL,
347+
K_HIGHEST_APPLICATION_THREAD_PRIO, 0,
348+
BOOT_LOG_PROCESSING_INTERVAL);
349+
350+
k_thread_name_set(&boot_log_thread, "logging");
353351
}
354352

355353
void zephyr_boot_log_stop(void)

0 commit comments

Comments
 (0)