Commit cde36392 authored by Jamie McCrae's avatar Jamie McCrae Committed by Dominik Ermel
Browse files

zephyr: serial_recovery: Make receive buffers configurable



This allows making the number of receive buffers configurable
instead of being fixed at 2.

Signed-off-by: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent 453e8bd7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -71,6 +71,13 @@ config BOOT_SERIAL_MAX_RECEIVE_SIZE
	help
	  Maximum length of received commands via the serial port.

config BOOT_LINE_BUFS
	int "Number of receive buffers"
	range 2 128
	default 2
	help
	  Number of receive buffers for data received via the serial port.

config BOOT_SERIAL_DETECT_PORT
	string "GPIO device to trigger serial recovery mode (DEPRECATED)"
	default GPIO_0 if SOC_FAMILY_NRF
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017 Nordic Semiconductor ASA
 * Copyright (c) 2017-2023 Nordic Semiconductor ASA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ struct line_input {
};

static struct device const *uart_dev;
static struct line_input line_bufs[2];
static struct line_input line_bufs[CONFIG_BOOT_LINE_BUFS];

static sys_slist_t avail_queue;
static sys_slist_t lines_queue;