altos: Actually write cc1120 register values
authorKeith Packard <keithp@keithp.com>
Sat, 16 Jun 2012 05:28:55 +0000 (22:28 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 16 Jun 2012 05:28:55 +0000 (22:28 -0700)
Helps to not use 'read' mode when writing.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_cc1120.c

index 5156b7b2c22a3fdcbd5d933a2f29be6d633a18fb..d2820e5145bda40dddb5fc7100e0f2ae80e7429c 100644 (file)
@@ -77,13 +77,13 @@ ao_radio_reg_write(uint16_t addr, uint8_t value)
        printf("\t\tao_radio_reg_write (%04x): %02x\n", addr, value);
 #endif
        if (CC1120_IS_EXTENDED(addr)) {
-               data[0] = ((1 << CC1120_READ)  |
+               data[0] = ((0 << CC1120_READ)  |
                           (0 << CC1120_BURST) |
                           CC1120_EXTENDED);
                data[1] = addr;
                d = 2;
        } else {
-               data[0] = ((1 << CC1120_READ)  |
+               data[0] = ((0 << CC1120_READ)  |
                           (0 << CC1120_BURST) |
                           addr);
                d = 1;