Date:2013-03-28 18:24:28 (6 years 3 months ago)
Author:Werner Almesberger
Commit:1de233a7c7fb2eca6f61682805aec0dda195a307
Message:tools/: fix artf_at86rf23[01] (should be atrf...) typo

Files: tools/atrf-id/atrf-id.c (2 diffs)
tools/atrf-txrx/atrf-txrx.c (2 diffs)
tools/atrf-xtal/atben.c (2 diffs)
tools/include/atrf.h (2 diffs)
tools/lib/atrf.c (2 diffs)
tools/lib/cwtest.c (5 diffs)
tools/lib/misctxrx.c (3 diffs)

Change Details

tools/atrf-id/atrf-id.c
11/*
22 * atrf-id/atrf-id.c - Identify a ben-wpan AT86RF230 board
33 *
4 * Written 2010-2011 by Werner Almesberger
5 * Copyright 2010-2011 Werner Almesberger
4 * Written 2010-2011, 2013 by Werner Almesberger
5 * Copyright 2010-2011, 2013 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
135135    case atrf_unknown_chip:
136136        printf("???");
137137        break;
138    case artf_at86rf230:
138    case atrf_at86rf230:
139139        printf("AT86RF230");
140140        break;
141    case artf_at86rf231:
141    case atrf_at86rf231:
142142        printf("AT86RF231");
143143        break;
144144    default:
tools/atrf-txrx/atrf-txrx.c
112112    atrf_reg_write(dsc, REG_IRQ_MASK, 0xff);
113113
114114    flush_interrupts(dsc);
115    if (atrf_identify(dsc) == artf_at86rf231)
115    if (atrf_identify(dsc) == atrf_at86rf231)
116116        wait_for_interrupt(dsc, IRQ_CCA_ED_DONE, IRQ_CCA_ED_DONE, 1);
117117            /* according to table 7-1, 37 us max */
118118
...... 
131131    if (!rate)
132132        return;
133133    switch (atrf_identify(dsc)) {
134    case artf_at86rf230:
134    case atrf_at86rf230:
135135        fprintf(stderr, "AT86RF230 only supports 250 kbps\n");
136136        break;
137    case artf_at86rf231:
137    case atrf_at86rf231:
138138        atrf_reg_write(dsc, REG_TRX_CTRL_2, rate);
139139        break;
140140    default:
tools/atrf-xtal/atben.c
11/*
22 * atrf-xtal/atben.c - ATBEN-specific driver and evaluation
33 *
4 * Written 2011 by Werner Almesberger
5 * Copyright 2011 Werner Almesberger
4 * Written 2011, 2013 by Werner Almesberger
5 * Copyright 2011, 2013 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
5959
6060    /* minimum TX power, maximize delays, disable CRC */
6161    switch (atrf_identify(dsc)) {
62    case artf_at86rf230:
62    case atrf_at86rf230:
6363        atrf_reg_write(dsc, REG_PHY_TX_PWR, 0xf);
6464        break;
65    case artf_at86rf231:
65    case atrf_at86rf231:
6666        atrf_reg_write(dsc, REG_PHY_TX_PWR, 0xff);
6767        atrf_reg_write(dsc, REG_TRX_CTRL_1, 0);
6868        break;
tools/include/atrf.h
11/*
22 * include/atrf.h - ATRF access functions library
33 *
4 * Written 2010-2011 by Werner Almesberger
5 * Copyright 2010-2011 Werner Almesberger
4 * Written 2010-2011, 2013 by Werner Almesberger
5 * Copyright 2010-2011, 2013 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
1818
1919enum atrf_chip_id {
2020    atrf_unknown_chip = 0,
21    artf_at86rf230 = 1,
22    artf_at86rf231 = 2,
21    atrf_at86rf230 = 1,
22    atrf_at86rf231 = 2,
2323};
2424
2525
tools/lib/atrf.c
8686        switch (version) {
8787        case 1: /* rev A */
8888        case 2: /* rev B */
89            return artf_at86rf230;
89            return atrf_at86rf230;
9090        default:
9191            return atrf_unknown_chip;
9292        }
...... 
9494    case 3: /* AT86RF231 */
9595        switch (version) {
9696        case 2: /* rev A */
97            return artf_at86rf231;
97            return atrf_at86rf231;
9898        default:
9999            return atrf_unknown_chip;
100100        }
tools/lib/cwtest.c
11/*
22 * lib/cwtest.c - Set up AT86RF230/231 constant wave test mode
33 *
4 * Written 2010-2011 by Werner Almesberger
5 * Copyright 2010-2011 Werner Almesberger
4 * Written 2010-2011, 2013 by Werner Almesberger
5 * Copyright 2010-2011, 2013 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
3030{
3131    if (atrf_usb_handle(dsc))
3232        return 1;
33    if (atrf_identify(dsc) == artf_at86rf230)
33    if (atrf_identify(dsc) == atrf_at86rf230)
3434        return 1;
3535    return 0;
3636}
...... 
111111void cw_test_begin(struct atrf_dsc *dsc, uint8_t cont_tx)
112112{
113113    switch (atrf_identify(dsc)) {
114    case artf_at86rf230:
114    case atrf_at86rf230:
115115        enter_test_mode_230(dsc, cont_tx);
116116        last_cont_tx = cont_tx;
117117        break;
118    case artf_at86rf231:
118    case atrf_at86rf231:
119119        prepare_test_mode_231(dsc, cont_tx);
120120        start_test_mode_231(dsc);
121121        break;
...... 
128128void cw_test_resume(struct atrf_dsc *dsc)
129129{
130130    switch (atrf_identify(dsc)) {
131    case artf_at86rf230:
131    case atrf_at86rf230:
132132        enter_test_mode_230(dsc, last_cont_tx);
133133        break;
134    case artf_at86rf231:
134    case atrf_at86rf231:
135135        start_test_mode_231(dsc);
136136        break;
137137    default:
...... 
142142
143143void cw_test_end(struct atrf_dsc *dsc)
144144{
145    if (atrf_identify(dsc) == artf_at86rf231)
145    if (atrf_identify(dsc) == atrf_at86rf231)
146146        atrf_reg_write(dsc, REG_PART_NUM, 0);
147147
148148    atrf_reg_write(dsc, REG_TRX_STATE, TRX_CMD_FORCE_TRX_OFF);
tools/lib/misctxrx.c
11/*
22 * lib/misctxrx.c - Miscellaenous transceiver helper functions
33 *
4 * Written 2010-2011 by Werner Almesberger
5 * Copyright 2010-2011 Werner Almesberger
4 * Written 2010-2011, 2013 by Werner Almesberger
5 * Copyright 2010-2011, 2013 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
146146    uint8_t tmp;
147147
148148    switch (atrf_identify(dsc)) {
149    case artf_at86rf230:
149    case atrf_at86rf230:
150150        atrf_reg_write(dsc, REG_PHY_TX_PWR,
151151            (crc ? TX_AUTO_CRC_ON_230 : 0) | power);
152152        break;
153    case artf_at86rf231:
153    case atrf_at86rf231:
154154        tmp = atrf_reg_read(dsc, REG_PHY_TX_PWR);
155155        tmp = (tmp & ~TX_PWR_MASK) | power;
156156        atrf_reg_write(dsc, REG_PHY_TX_PWR, tmp);
...... 
166166static const double *tx_power_table(struct atrf_dsc *dsc)
167167{
168168    switch (atrf_identify(dsc)) {
169    case artf_at86rf230:
169    case atrf_at86rf230:
170170        return tx_pwr_230;
171    case artf_at86rf231:
171    case atrf_at86rf231:
172172        return tx_pwr_231;
173173        break;
174174    default:

Archive Download the corresponding diff file



interactive