Date:2010-08-25 02:03:39 (9 years 4 months ago)
Author:Werner Almesberger
Commit:bb7b049f00c45e7c3cdd7dae67d10a26bf9383dc
Message:Literature consistently calls the Link Quality Indication LQI, not LQ. So do we now.

- atrf/fw/atspi/ep0.c: changed LQ to LQI in comments
- atrf/tools/atspi-txrx/atspi-txrx.c (receive): changed LQ to LQI in comment
and in diagnostic output
Files: atrf/fw/atspi/ep0.c (2 diffs)
atrf/tools/atspi-txrx/atspi-txrx.c (2 diffs)

Change Details

atrf/fw/atspi/ep0.c
5858
5959
6060static const uint8_t id[] = { EP0ATSPI_MAJOR, EP0ATSPI_MINOR, HW_TYPE };
61static __xdata uint8_t buf[MAX_PSDU+3]; /* command, PHDR, and LQ */
61static __xdata uint8_t buf[MAX_PSDU+3]; /* command, PHDR, and LQI */
6262static uint8_t size;
6363
6464
...... 
172172        return 1;
173173    case ATSPI_FROM_DEV(ATSPI_BUF_READ):
174174        debug("ATSPI_BUF_READ\n");
175        if (setup->wLength < 2) /* PHR+LQ */
175        if (setup->wLength < 2) /* PHR+LQI */
176176            return 0;
177        if (setup->wLength > MAX_PSDU+2) /* PHR+PSDU+LQ */
177        if (setup->wLength > MAX_PSDU+2) /* PHR+PSDU+LQI */
178178            return 0;
179179        nSS = 0;
180180        spi_send(AT86RF230_BUF_READ);
atrf/tools/atspi-txrx/atspi-txrx.c
8282static void receive(usb_dev_handle *dev)
8383{
8484    uint8_t irq;
85    uint8_t buf[MAX_PSDU+1]; /* PSDU+LQ */
85    uint8_t buf[MAX_PSDU+1]; /* PSDU+LQI */
8686    int n, ok, i;
8787    uint8_t lq;
8888
...... 
124124    }
125125    ok = !!(atspi_reg_read(dev, REG_PHY_RSSI) & RX_CRC_VALID);
126126    lq = buf[n-1];
127    fprintf(stderr, "%d bytes payload, CRC %s, LQ %u\n",
127    fprintf(stderr, "%d bytes payload, CRC %s, LQI %u\n",
128128        n-3, ok ? "OK" : "BAD", lq);
129129    for (i = 0; i != n-3; i++)
130130        putchar(buf[i] < ' ' || buf[i] > '~' ? '?' : buf[i]);

Archive Download the corresponding diff file



interactive