summaryrefslogtreecommitdiff
path: root/software/hhd70dongle/c1101lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/hhd70dongle/c1101lib.c')
-rw-r--r--software/hhd70dongle/c1101lib.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c
index 1b463ab..88c5c2f 100644
--- a/software/hhd70dongle/c1101lib.c
+++ b/software/hhd70dongle/c1101lib.c
@@ -229,6 +229,7 @@ void c1101_init(void)
c1101_spi_write_register(SPIC1101_ADDR_DEVIATN, 0x07);
// MCSM0 Main Radio Control State Machine Configuration
c1101_spi_write_register(SPIC1101_ADDR_MCSM0, 0x18);
+ c1101_spi_write_register(SPIC1101_ADDR_MCSM1, 0b00111100); // State RX after recieving packet-> stay in RX; State TX after sending packet -> IDLE
// FOCCFG Frequency Offset Compensation Configuration
c1101_spi_write_register(SPIC1101_ADDR_FOCCFG, 0x16);
// WORCTRL Wake On Radio Control
@@ -344,11 +345,11 @@ void c1101_transmitData(char *buffer, unsigned int len)
{
uint8_t debug_sb[6];
uint8_t num_written = 0;
- uint8_t mcsm1 = c1101_spi_read_register(SPIC1101_ADDR_MCSM1);
- //configure state machine to automatically go to IDLE, once packet was transmitted
- mcsm1 = (mcsm1 & 0b11111100) | 0b00;
- c1101_spi_write_register(SPIC1101_ADDR_MCSM1, 0x18);
- c1101_spi_write_register(SPIC1101_ADDR_PKTCTRL0, 0b0000000001); //crc disabled; use FIFOs; variable packet length mode (first TX FIFO byte must be length)
+ //~ uint8_t mcsm1 = c1101_spi_read_register(SPIC1101_ADDR_MCSM1);
+ //~ //configure state machine to automatically go to IDLE, once packet was transmitted
+ //~ mcsm1 = (mcsm1 & 0b11111100) | 0b00;
+ //~ c1101_spi_write_register(SPIC1101_ADDR_MCSM1, 0x18);
+ //~ c1101_spi_write_register(SPIC1101_ADDR_PKTCTRL0, 0b0000000001); //crc disabled; use FIFOs; variable packet length mode (first TX FIFO byte must be length)
// flush TX FIFO
num_written = c1101_spi_strobe_command(SPIC1101_ADDR_SFTX);
usb_rawhid_send((uint8_t*)"Flush TX Fifo",255);