summaryrefslogtreecommitdiff
path: root/software/hhd70dongle/c1101lib.c
diff options
context:
space:
mode:
authorBernhard Tittelbach <xro@realraum.at>2012-07-12 20:44:26 +0000
committerBernhard Tittelbach <xro@realraum.at>2012-07-12 20:44:26 +0000
commit5bf1049842637cf2f86580d0a5325e8b1d990690 (patch)
tree797c0729eed0e3ccc812c7a858c76f605d4c994a /software/hhd70dongle/c1101lib.c
parentsettings from rfstudio for comparision (diff)
power ramping init
git-svn-id: https://svn.spreadspace.org/mur.sat@580 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/hhd70dongle/c1101lib.c')
-rw-r--r--software/hhd70dongle/c1101lib.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/software/hhd70dongle/c1101lib.c b/software/hhd70dongle/c1101lib.c
index 077b631..6d4d876 100644
--- a/software/hhd70dongle/c1101lib.c
+++ b/software/hhd70dongle/c1101lib.c
@@ -209,6 +209,24 @@ int c1101_spi_write_txfifo(char *buffer, int len)
return num_written;
}
+//patable muste be char array of length 8
+int c1101_spi_write_patable(char const patable[])
+{
+ int16_t sb;
+ int8_t len = 8;
+ hhd70_spi_cs_enable();
+ hhd70_c1101_wait_chip_rdy();
+ sb = c1101_spi_write_byte_ok_get_status(SPIC1101_ADDR_PATABLE_WRITE_BURST);
+ if (sb < 0)
+ return -1;
+ while (len-- > 0)
+ {
+ sb = c1101_spi_write_byte_ok_get_status(*patable);
+ patable++;
+ }
+ hhd70_spi_cs_disable();
+ return sb;
+}
/**** External Functions ****/
@@ -277,6 +295,9 @@ void c1101_init(void)
// note: for now: assume f_xosc to be 26 Mhz
// for ~433.125 Mhz -> freq = 1091741, freq_offset = 0
//c1101_setFrequency(1091741,0,15);
+
+ //AFU Satellite Band: 435.000 - 438.000 kHz
+ //AFU Salellite Band Max Bandwith: 20 kHz
}
//Note for comparision:
@@ -303,7 +324,7 @@ void c1101_init_w_rfstudiosettings1(void)
// Modulated = true
// Channel number = 0
// PA table
-#define PA_TABLE {0x00,0x12,0x0e,0x34,0x60,0xc5,0xc1,0xc0,}
+ char const pa_table[8] = {0x00,0x12,0x0e,0x34,0x60,0xc5,0xc1,0xc0};
//
// Rf settings for CC1101
//
@@ -319,7 +340,7 @@ void c1101_init_w_rfstudiosettings1(void)
c1101_spi_write_register(SPIC1101_ADDR_IOCFG2, 0x41 ); //0x40, 0x42, 0x44, 0x47
//Values from SmartRFStudio:
-
+ c1101_spi_write_patable(pa_table);
}