summaryrefslogtreecommitdiff
path: root/software/hhd70dongle/hhd70dongle.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/hhd70dongle/hhd70dongle.c')
-rw-r--r--software/hhd70dongle/hhd70dongle.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/software/hhd70dongle/hhd70dongle.c b/software/hhd70dongle/hhd70dongle.c
index 4e5560d..7e5b0ed 100644
--- a/software/hhd70dongle/hhd70dongle.c
+++ b/software/hhd70dongle/hhd70dongle.c
@@ -147,7 +147,7 @@ int main(void)
c1101_spi_strobe_command(SPIC1101_ADDR_SRX); // enter RX - Mode
_delay_ms(1000);
- if (hhd70_rx_data_available() == 1)
+ if (hhd70_rx_data_available())
{
led_on();
CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX: GDO2 pin HIGH\r\n");
@@ -159,16 +159,34 @@ int main(void)
led_off();
}
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 rssi:\r\n");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 rssi: ");
debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_RSSI));
CDC_Device_SendString(&VirtualSerial_CDC_Interface,write_buffer);
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 tx bytes:\r\n");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 tx bytes: ");
debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_TXBYTES));
CDC_Device_SendString(&VirtualSerial_CDC_Interface,write_buffer);
- CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 rx bytes:\r\n");
- debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_RXBYTES));
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 rx bytes: ");
+ int16_t num_rx_bytes = c1101_spi_read_register(SPIC1101_ADDR_RXBYTES);
+ debug_sprint_int16hex(write_buffer, num_rx_bytes);
CDC_Device_SendString(&VirtualSerial_CDC_Interface,write_buffer);
- c1101_spi_dump_registers_to_usb();
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
+
+ //~ if (num_rx_bytes > 0)
+ //~ {
+ //~ led_on();
+ //~ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"RX Buffer Non-Empty\r\n");
+ //~ c1101_recieveData();
+ //~ led_off();
+ //~ }
+
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"c1101 status byte: ");
+ debug_sprint_int16hex(write_buffer, c1101_getStatus());
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,write_buffer);
+ CDC_Device_SendString(&VirtualSerial_CDC_Interface,"\r\n");
+
+ //~ c1101_spi_dump_registers_to_usb();
write_buffer[0]='T';
write_buffer[1]='e';
write_buffer[2]='m';