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.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c
index 06c825c..0578099 100644
--- a/software/hhd70dongle/c1101lib.c
+++ b/software/hhd70dongle/c1101lib.c
@@ -161,9 +161,9 @@ int spi_c1101_write_txfifo(char *buffer, int len)
uint8_t debug_sb[6];
while (len-- > 0 && SPIC1101_SB_FIFO_BYTES_AVAILABLE(sb) > 2)
{
- usb_rawhid_send((uint8_t*)"TXFifo bytes available",255);
- debug_sprint_int16hex(debug_sb, SPIC1101_SB_FIFO_BYTES_AVAILABLE(sb));
- usb_rawhid_send(debug_sb,255);
+ //~ usb_rawhid_send((uint8_t*)"TXFifo bytes available",255);
+ //~ debug_sprint_int16hex(debug_sb, SPIC1101_SB_FIFO_BYTES_AVAILABLE(sb));
+ //~ usb_rawhid_send(debug_sb,255);
sb = spi_c1101_write_byte_ok_get_status(buffer[num_written++]);
}
spi_cs_disable();
@@ -377,30 +377,28 @@ void c1101_transmitData(char *buffer, unsigned int len)
uint8_t c1101_state=0;
do
{
+ c1101_getStatus();
+ num_written = spi_c1101_write_txfifo(buffer, len );
+ buffer += num_written;
+ len -= num_written;
c1101_state = c1101_getMARCState();
if (c1101_state == 1)
{
//from idle state, go to RX state
num_written = spi_c1101_strobe_command(SPIC1101_ADDR_STX);
- usb_rawhid_send((uint8_t*)"Strobe STX",255);
- debug_sprint_int16hex(debug_sb, num_written);
- usb_rawhid_send(debug_sb,255);
+ //~ usb_rawhid_send((uint8_t*)"Strobe STX",255);
+ //~ debug_sprint_int16hex(debug_sb, num_written);
+ //~ usb_rawhid_send(debug_sb,255);
}
-
- c1101_getStatus();
- num_written = spi_c1101_write_txfifo(buffer, len );
- buffer += num_written;
- len -= num_written;
-
- usb_rawhid_send((uint8_t*)"TX2 num written",255);
- debug_sprint_int16hex(debug_sb, num_written);
- usb_rawhid_send(debug_sb,255);
- usb_rawhid_send((uint8_t*)"TX2 len",255);
- debug_sprint_int16hex(debug_sb, len);
- usb_rawhid_send(debug_sb,255);
- usb_rawhid_send((uint8_t*)"TX2 bytes",255);
- debug_sprint_int16hex(debug_sb, c1101_getNumBytesInTXFifo());
- usb_rawhid_send(debug_sb,255);
+ //~ usb_rawhid_send((uint8_t*)"TX2 num written",255);
+ //~ debug_sprint_int16hex(debug_sb, num_written);
+ //~ usb_rawhid_send(debug_sb,255);
+ //~ usb_rawhid_send((uint8_t*)"TX2 len",255);
+ //~ debug_sprint_int16hex(debug_sb, len);
+ //~ usb_rawhid_send(debug_sb,255);
+ //~ usb_rawhid_send((uint8_t*)"TX2 bytes",255);
+ //~ debug_sprint_int16hex(debug_sb, c1101_getNumBytesInTXFifo());
+ //~ usb_rawhid_send(debug_sb,255);
} while (len > 0);
}