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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/software/hhd70dongle/hhd70dongle.c b/software/hhd70dongle/hhd70dongle.c
index da1c882..d89f1c4 100644
--- a/software/hhd70dongle/hhd70dongle.c
+++ b/software/hhd70dongle/hhd70dongle.c
@@ -35,7 +35,7 @@
#include "led.h"
#include "util.h"
-#include "spi.h"
+#include "hhd70.h"
#include "c1101lib.h"
#include "usb_rawhid.h"
@@ -58,7 +58,7 @@ int main(void)
{
CPU_PRESCALE(0);
led_init();
- spi_init();
+ hhd70_init();
usb_init();
// set PB5/ADC12 to INPUT (c1101 temp sensor)
DDRB &= ~(1<<DDB5);
@@ -89,30 +89,30 @@ int main(void)
}
usb_rawhid_send((uint8_t*)"c1101 rssi:",255);
- debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_RSSI));
+ debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_RSSI));
usb_rawhid_send(write_buffer,255);
usb_rawhid_send((uint8_t*)"c1101 tx bytes:",255);
- debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_TXBYTES));
+ debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_TXBYTES));
usb_rawhid_send(write_buffer,255);
usb_rawhid_send((uint8_t*)"c1101 rx bytes:",255);
- debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_RXBYTES));
+ debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_RXBYTES));
usb_rawhid_send(write_buffer,255);
//usb_rawhid_send((uint8_t*)"c1101 IOCFG2:",255);
- //debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_IOCFG2));
+ //debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_IOCFG2));
//usb_rawhid_send(write_buffer,255);
//usb_rawhid_send((uint8_t*)"c1101 IOCFG1:",255);
- //debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_IOCFG1));
+ //debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_IOCFG1));
//usb_rawhid_send(write_buffer,255);
//usb_rawhid_send((uint8_t*)"c1101 IOCFG0:",255);
- //debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_IOCFG0));
+ //debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_IOCFG0));
//usb_rawhid_send(write_buffer,255);
//usb_rawhid_send((uint8_t*)"c1101 FIFOTHR:",255);
- //debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_FIFOTHR));
+ //debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_FIFOTHR));
//usb_rawhid_send(write_buffer,255);
usb_rawhid_send((uint8_t*)"c1101 PKTLEN:",255);
- debug_sprint_int16hex(write_buffer, spi_c1101_read_register(SPIC1101_ADDR_PKTLEN));
+ debug_sprint_int16hex(write_buffer, c1101_spi_read_register(SPIC1101_ADDR_PKTLEN));
usb_rawhid_send(write_buffer,255);
- spi_c1101_dump_registers_to_usb();
+ c1101_spi_dump_registers_to_usb();
write_buffer[0]='T';
write_buffer[1]='e';
write_buffer[2]='m';