From c7a6f065d2a48730e05eb95bb44ca6a7032d2a31 Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 1 Nov 2012 11:19:29 +0000 Subject: hla: add ability to configure read/write buffer size Other adapters (TI ICDI) that use this driver can use a larger read/write buffer size than the original stlink could. Change-Id: I9beb7748049097cbe29a2340799c450bd74e199d Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/948 Tested-by: jenkins --- src/jtag/hla/hla_layout.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/jtag/hla/hla_layout.c') diff --git a/src/jtag/hla/hla_layout.c b/src/jtag/hla/hla_layout.c index 04b50d7f..55657294 100644 --- a/src/jtag/hla/hla_layout.c +++ b/src/jtag/hla/hla_layout.c @@ -50,6 +50,12 @@ static int hl_layout_open(struct hl_interface_s *adapter) return res; } + /* make sure adapter has set the buffer size */ + if (!adapter->param.max_buffer) { + LOG_ERROR("buffer size not set"); + return ERROR_FAIL; + } + return ERROR_OK; } -- cgit v1.2.3-18-g5258