1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-29 11:47:11 +02:00

atusb/fw/include/at86rf230.h: make 231-centric

- at86rf230.h (TX_AUTO_CRC_ON): changed to TX_AUTO_CRC_ON_230
- at86rf230.h (TX_AUTO_CRC_ON_231): changed to TX_AUTO_CRC_ON
- tools/atrf-txrx/atrf-txrx.c: updated for above changes
This commit is contained in:
Werner Almesberger 2011-01-07 14:31:27 -03:00
parent f67a79b04e
commit 309a5ed6d5
2 changed files with 4 additions and 4 deletions

View File

@ -180,7 +180,7 @@ enum {
#define PA_EXT_EN (1 << 7) #define PA_EXT_EN (1 << 7)
#define IRQ_2_EXT_EN (1 << 6) #define IRQ_2_EXT_EN (1 << 6)
#define TX_AUTO_CRC_ON_231 (1 << 5) /* 231 location */ #define TX_AUTO_CRC_ON (1 << 5) /* 231 location */
#define RX_BL_CTRL (1 << 4) #define RX_BL_CTRL (1 << 4)
#define SPI_CMD_MODE_SHIFT 2 #define SPI_CMD_MODE_SHIFT 2
@ -198,7 +198,7 @@ enum {
/* --- PHY_TX_PWR ---------------------------------------------------------- */ /* --- PHY_TX_PWR ---------------------------------------------------------- */
#define TX_AUTO_CRC_ON (1 << 7) /* 230 location */ #define TX_AUTO_CRC_ON_230 (1 << 7) /* 230 location */
#define PA_BUF_LT_SHIFT 6 #define PA_BUF_LT_SHIFT 6
#define PA_BUF_LT_MASK 3 #define PA_BUF_LT_MASK 3

View File

@ -116,14 +116,14 @@ static void set_power(struct atrf_dsc *dsc, double power, int crc)
switch (atrf_identify(dsc)) { switch (atrf_identify(dsc)) {
case artf_at86rf230: case artf_at86rf230:
atrf_reg_write(dsc, REG_PHY_TX_PWR, atrf_reg_write(dsc, REG_PHY_TX_PWR,
(crc ? TX_AUTO_CRC_ON : 0) | n); (crc ? TX_AUTO_CRC_ON_230 : 0) | n);
break; break;
case artf_at86rf231: case artf_at86rf231:
tmp = atrf_reg_read(dsc, REG_PHY_TX_PWR); tmp = atrf_reg_read(dsc, REG_PHY_TX_PWR);
tmp = (tmp & ~TX_PWR_MASK) | n; tmp = (tmp & ~TX_PWR_MASK) | n;
atrf_reg_write(dsc, REG_PHY_TX_PWR, tmp); atrf_reg_write(dsc, REG_PHY_TX_PWR, tmp);
atrf_reg_write(dsc, REG_TRX_CTRL_1, atrf_reg_write(dsc, REG_TRX_CTRL_1,
crc ? TX_AUTO_CRC_ON_231 : 0); crc ? TX_AUTO_CRC_ON : 0);
break; break;
default: default:
abort(); abort();