From e4ab971cc668d87c46d716d3dc09a2487d53eea3 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 20 May 2012 02:42:47 +0000 Subject: rx/tx test updates git-svn-id: https://svn.spreadspace.org/mur.sat@450 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/hhd70dongle/c1101lib.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'software/hhd70dongle/c1101lib.c') 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); -- cgit v1.2.3