Library for KT0915, DSP radio IC

Revision:
2:108a1ae04859
Parent:
1:bf3cbe137051
Child:
3:a86c8f7a4e47
--- a/KT0915.h	Tue Jan 09 11:48:49 2018 +0000
+++ b/KT0915.h	Wed Jan 10 08:49:24 2018 +0000
@@ -69,6 +69,14 @@
     */
     void set_freq(bool mode,int freq);
 
+    /**set xtal frequency
+    *
+    *xtal=32,38,12000,24000 (KHz)
+    *
+    *If your xtal is 32.768Khz,set to 32.
+    */
+    void set_xtal(int xtal);
+
     /**read RSSI (dB)
     *
     *AM...mode=0
@@ -77,6 +85,18 @@
     */
     int get_rssi(bool mode);
 
+    /**set channel space
+    *
+    *AM...mode=0, space=1,9,10 (KHz)
+    *
+    *If space=1, bandwidth sets 2KHz.
+    *
+    *If space=9 or 10, bandwidth sets 6KHz.
+    *
+    *FM...mode=1, space=50,100,200 (KHz)
+    */
+    void set_space(bool mode,int space);
+
     /**read SNR (dB)
     *
     *for FM only
@@ -96,8 +116,9 @@
 
 private:
     I2C _KT0915;
-    void write_reg(int memory_address,int data1,int data2);
-    void read_reg(int memory_address,int *data1,int *data2);
+    void write_reg(int memory_address,int byte1,int byte2);
+    void read_reg(int memory_address,int *byte1,int *byte2);
+    int data1,data2;
 };
 
 #endif