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.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c
index 47a446a..b0eed03 100644
--- a/software/hhd70dongle/c1101lib.c
+++ b/software/hhd70dongle/c1101lib.c
@@ -140,11 +140,12 @@ void c1101_spi_dump_registers_to_usb(void)
hhd70_c1101_wait_chip_rdy();
if (c1101_spi_write_byte_ok_get_status(0xC0) < 0)
return;
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"dump all 46 registers:");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"dump all 46 registers:\r\n");
for (c=0; c<47; c++)
{
debug_sprint_int16hex(debug_sb, hhd70_spi_read_byte());
CDC_Device_SendString(&VirtualSerial_CDC_Interface, debug_sb);
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface, "\r\n");
}
hhd70_spi_cs_disable();
}
@@ -317,13 +318,13 @@ void c1101_handleStatusByte(char sb)
if (SPIC1101_SB_RXFIFO_OVERFLOW(sb))
{
c1101_spi_strobe_command(SPIC1101_ADDR_SFRX);
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX fifo flushed");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX fifo flushed\r\n");
}
//on TXFifo Overflow, Flush TX Fifo
if (SPIC1101_SB_TXFIFO_OVERFLOW(sb))
{
c1101_spi_strobe_command(SPIC1101_ADDR_SFTX);
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"TX fifo flushed");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"TX fifo flushed\r\n");
}
}
@@ -336,9 +337,10 @@ char c1101_getStatus(void)
hhd70_spi_cs_disable();
//debug start
char debug_sb[6];
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 status:");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 status:\r\n");
debug_sprint_int16hex(debug_sb, sb);
CDC_Device_SendString(&VirtualSerial_CDC_Interface,debug_sb);
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
//debug end
c1101_handleStatusByte(sb);
return sb;
@@ -351,9 +353,10 @@ char c1101_getMARCState(void)
sb &= 0x1F;
//debug start
char debug_sb[6];
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 MARCSate:");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 MARCSate:\r\n");
debug_sprint_int16hex(debug_sb, sb);
CDC_Device_SendString(&VirtualSerial_CDC_Interface,debug_sb);
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
//debug end
return sb;
}
@@ -463,8 +466,9 @@ void c1101_recieveData(void)
num_leave_in_fifo = (recv_data[0] - num_recv_total < 64)? 0 : 1;
} while (num_recv > 0);
recv_data[num_recv_total]=0;
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX: Data Recieved:");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX: Data Recieved: ");
CDC_Device_SendString(&VirtualSerial_CDC_Interface,recv_data);
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
c1101_getStatus(); // get status and handle possiblble RX Fifo Overflow
}