diff options
Diffstat (limited to 'mpm/tools/eeprom-id.c')
-rw-r--r-- | mpm/tools/eeprom-id.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mpm/tools/eeprom-id.c b/mpm/tools/eeprom-id.c index 0b2c78f26..151b38aff 100644 --- a/mpm/tools/eeprom-id.c +++ b/mpm/tools/eeprom-id.c @@ -1,17 +1,23 @@ // -// Copyright 2017 Ettus Research, a National Instruments Company +// Copyright 2017-2018 Ettus Research, a National Instruments Company // // SPDX-License-Identifier: GPL-3.0-or-later // #include <stdio.h> #include <stdlib.h> +#include <arpa/inet.h> #include "eeprom.h" +#define N310_PID 0x4242 +#define N300_PID 0x4240 + static void usrp_sulfur_eeprom_print_id(struct usrp_sulfur_eeprom *ep) { - if (ep->pid == 0x4242) + if (ntohs(ep->pid) == N310_PID) printf("product=ni,n310-rev%x\n", ntohs(ep->rev)+1); + else if (ntohs(ep->pid) == N300_PID) + printf("product=ni,n300-rev%x\n", ntohs(ep->rev)+1); else printf("product=unknown-(%04x)\n", ntohs(ep->pid)); |