Date:2016-03-30 22:12:10 (3 years 3 months ago)
Author:Stefan Schmidt
Commit:dee10c1eb903c95b65d388abd2d8dd41c05dad4b
Message:atusb: fw: make the ifdefs in mac handling transceiver specific and not board specific

There could be different combinations here. E.g. there is a rzusb like board
with the transceiver replaced with an at86rf233.
Files: atusb/fw/Makefile (1 diff)
atusb/fw/mac.c (4 diffs)

Change Details

atusb/fw/Makefile
2020
2121ifeq ($(NAME),rzusb)
2222CHIP=at90usb1287
23CFLAGS += -DRZUSB
23CFLAGS += -DRZUSB -DAT86RF230
2424else
2525CHIP=atmega32u2
26CFLAGS += -DATUSB
26CFLAGS += -DATUSB -DAT86RF230
2727endif
2828HOST=jlime
2929BOOT_ADDR=0x7000
atusb/fw/mac.c
113113    led(0);
114114    next_buf(&rx_out);
115115    usb_next();
116#ifdef RZUSB
116#ifdef AT86RF230
117117    /* slap at86rf230 - reduce fragmentation issue */
118118    change_state(TRX_STATUS_RX_AACK_ON);
119119#endif
...... 
126126    uint8_t *buf;
127127
128128    spi_begin();
129#ifdef ATUSB
129#ifdef AT86RF231
130130    if (!(spi_io(AT86RF230_BUF_READ) & RX_CRC_VALID)) {
131131        spi_end();
132132        return;
133133    }
134134#endif
135#ifdef RZUSB
135#ifdef AT86RF230
136136    spi_io(AT86RF230_BUF_READ);
137137#endif
138138
...... 
216216    }
217217    while (status != TRX_STATUS_RX_ON && status != TRX_STATUS_RX_AACK_ON);
218218
219#ifdef ATUSB
219#ifdef AT86RF231
220220    /*
221221     * We use TRX_CMD_FORCE_PLL_ON instead of TRX_CMD_PLL_ON because a new
222222     * reception may have begun while we were still working on the previous
...... 
224224     */
225225    reg_write(REG_TRX_STATE, TRX_CMD_FORCE_PLL_ON);
226226#endif
227#ifdef RZUSB
227#ifdef AT86RF230
228228    /*
229229     * at86rf230 doesn't support force change, nevetherless this works
230230     * somehow

Archive Download the corresponding diff file



interactive