Date:2011-02-14 16:49:44 (8 years 8 months ago)
Author:Werner Almesberger
Commit:10fb0146c3c2b3eac4481ac59af2658bdf4b8006
Message:fw3/: remove probably useless RF debug output code from board.c

- board.h, board.c: removed rf_init, rf_send, and "wr"
Files: atusb/fw3/board.c (1 diff)
atusb/fw3/board.h (1 diff)

Change Details

atusb/fw3/board.c
101101    OUT(nRST_RF); /* resets the transceiver */
102102    OUT(SLP_TR);
103103}
104
105
106static void wr(uint8_t reg, uint8_t val)
107{
108    spi_begin();
109    spi_send(AT86RF230_REG_WRITE | reg);
110    spi_send(val);
111    spi_end();
112}
113
114
115void rf_init(void)
116{
117    wr(REG_TRX_STATE, TRX_CMD_TRX_OFF);
118    wr(REG_IRQ_MASK, 0xff);
119    _delay_us(50);
120}
121
122
123void rf_send(const char *s)
124{
125    const char *p;
126    int len = 0;
127
128    wr(REG_TRX_STATE, TRX_CMD_PLL_ON);
129    for (p = s; *p; p++)
130        len++;
131    spi_begin();
132    spi_send(AT86RF230_BUF_WRITE);
133    spi_send(len);
134    while (*s)
135        spi_send(*s++);
136    spi_end();
137    wr(REG_TRX_STATE, TRX_CMD_TX_START);
138    _delay_ms(10);
139}
atusb/fw3/board.h
6161void panic(void);
6262void board_init(void);
6363
64void rf_init(void);
65void rf_send(const char *s);
66
6764#endif /* !BOARD_H */

Archive Download the corresponding diff file



interactive