From a062596819369ff85cae4c3852ee8a37a8de8236 Mon Sep 17 00:00:00 2001 From: Dominic Spill Date: Wed, 9 Sep 2015 12:08:28 +0100 Subject: [PATCH] Default SPI flash read length to size of SPI flash Fixes #214 --- host/hackrf-tools/src/hackrf_spiflash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/hackrf-tools/src/hackrf_spiflash.c b/host/hackrf-tools/src/hackrf_spiflash.c index 098d2ade..20a50d3f 100644 --- a/host/hackrf-tools/src/hackrf_spiflash.c +++ b/host/hackrf-tools/src/hackrf_spiflash.c @@ -87,7 +87,7 @@ static void usage() { printf("Usage:\n"); printf("\t-a, --address : starting address (default: 0)\n"); - printf("\t-l, --length : number of bytes to read (default: 0)\n"); + printf("\t-l, --length : number of bytes to read (default: %d)\n", MAX_LENGTH); printf("\t-r : Read data into file.\n"); printf("\t-w : Write data from file.\n"); printf("\t-d : Serial number of device, if multiple devices\n"); @@ -98,7 +98,7 @@ int main(int argc, char** argv) { int opt; uint32_t address = 0; - uint32_t length = 0; + uint32_t length = MAX_LENGTH; uint32_t tmp_length; uint16_t xfer_len = 0; const char* path = NULL;