summaryrefslogtreecommitdiff
path: root/software/hhd70dongle/c1101lib.c
diff options
context:
space:
mode:
authorBernhard Tittelbach <xro@realraum.at>2012-05-20 02:42:47 +0000
committerBernhard Tittelbach <xro@realraum.at>2012-05-20 02:42:47 +0000
commite4ab971cc668d87c46d716d3dc09a2487d53eea3 (patch)
treec05d674838472f0c0bd30dceaa57196b53867e28 /software/hhd70dongle/c1101lib.c
parentadc on/off (diff)
rx/tx test updates
git-svn-id: https://svn.spreadspace.org/mur.sat@450 7de4ea59-55d0-425e-a1af-a3118ea81d4c
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);