From deccab5a1b90df299b7b194bfef9da046f8f319b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 12 Jan 2018 17:11:05 -0800 Subject: mpm: Add EEPROM utilities for N310 Actually-written-by: Moritz Fischer --- mpm/tools/db-dump.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 mpm/tools/db-dump.c (limited to 'mpm/tools/db-dump.c') diff --git a/mpm/tools/db-dump.c b/mpm/tools/db-dump.c new file mode 100644 index 000000000..f4190a2aa --- /dev/null +++ b/mpm/tools/db-dump.c @@ -0,0 +1,31 @@ +// +// Copyright 2017 Ettus Research, a National Instruments Company +// +// SPDX-License-Identifier: GPL-3.0 +// + +#include "eeprom.h" +#include + +int main(int argc, char *argv[]) +{ + struct usrp_sulfur_db_eeprom *ep; + int which_slot = 0; + + if (argc != 2) + return EXIT_FAILURE; + + which_slot = atoi(argv[1]); + + if (!which_slot) + ep = usrp_sulfur_db_eeprom_from_file(NVMEM_PATH_SLOT_A); + else + ep = usrp_sulfur_db_eeprom_from_file(NVMEM_PATH_SLOT_B); + + if (!ep) + return EXIT_FAILURE; + usrp_sulfur_db_eeprom_print(ep); + free(ep); + + return 0; +} -- cgit v1.2.3