diff options
Diffstat (limited to 'software/hhd70dongle/c1101lib.c')
-rw-r--r-- | software/hhd70dongle/c1101lib.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c index 7c309cd..d19f8d4 100644 --- a/software/hhd70dongle/c1101lib.c +++ b/software/hhd70dongle/c1101lib.c @@ -223,8 +223,11 @@ void c1101_init(void) // MDMCFGn Modem Configuration c1101_spi_write_register(SPIC1101_ADDR_MDMCFG4, 0xF8); c1101_spi_write_register(SPIC1101_ADDR_MDMCFG3, 0x83); - c1101_spi_write_register(SPIC1101_ADDR_MDMCFG2, 0x13); + c1101_spi_write_register(SPIC1101_ADDR_MDMCFG2, 0x12); //gfsk, 15/16 sync word c1101_spi_write_register(SPIC1101_ADDR_MDMCFG1, 0x00); + //Sync Word + c1101_spi_write_register(SPIC1101_ADDR_SYNC1, 0x21); + c1101_spi_write_register(SPIC1101_ADDR_SYNC0, 0x42); // DEVIATN Modem Deviation Setting c1101_spi_write_register(SPIC1101_ADDR_DEVIATN, 0x07); // MCSM0 Main Radio Control State Machine Configuration @@ -416,6 +419,14 @@ void c1101_transmitData(char *buffer, unsigned int len) } while (len > 0); //disable Power Amplifier + //FIXME, instead use PTT function of GPO0 -> interrupt handler -> toggle rx/tx + //wait until RX finished + do + { + c1101_state = c1101_getMARCState(); + _delay_ms(1); + } + while (c1101_state == 19 || c1101_state == 20); hhd70_palna_rxmode(); } |