changeset 3977:841bf310b65f

driver/si446x: allow use of a TCXO
author Alexandre Becoulet <alexandre.becoulet@free.fr>
date Mon, 09 Jul 2018 16:58:18 +0200
parents 106f55578f7b
children c968e80489a0
files drivers/rfpacket/si446x/si446x.c drivers/rfpacket/si446x/si446x.config
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/rfpacket/si446x/si446x.c	Mon Jul 09 18:13:50 2018 +0200
+++ b/drivers/rfpacket/si446x/si446x.c	Mon Jul 09 16:58:18 2018 +0200
@@ -1642,11 +1642,14 @@
   0x08, 0x05, 0xbe, 0x88, 0x63, 0x91, 0xf3, 0x61, 0x13,
 #endif
 
-  //#ifdef CONFIG_DRIVER_RFPACKET_SI446X_PATCH
-  0x07, 0x02, 0x81, 0x00, GET_SI446X_XO_BYTE(3), GET_SI446X_XO_BYTE(2), GET_SI446X_XO_BYTE(1), GET_SI446X_XO_BYTE(0),
-//#else
-//  0x07, 0x02, 0x01, 0x00, GET_SI446X_XO_BYTE(3), GET_SI446X_XO_BYTE(2), GET_SI446X_XO_BYTE(1), GET_SI446X_XO_BYTE(0),
-//#endif
+  /* Power UP */
+  0x07, 0x02, 0x81,
+#ifdef CONFIG_DRIVER_RFPACKET_SI446X_TCXO
+  0x01,
+#else
+  0x00,
+#endif
+  GET_SI446X_XO_BYTE(3), GET_SI446X_XO_BYTE(2), GET_SI446X_XO_BYTE(1), GET_SI446X_XO_BYTE(0),
 
   /* global config */
   0x08, 0x11, 0x00, 0x04, 0x00, SI446X_X0_TUNE_VALUE, 0x00, 0x18, 0x60,
--- a/drivers/rfpacket/si446x/si446x.config	Mon Jul 09 18:13:50 2018 +0200
+++ b/drivers/rfpacket/si446x/si446x.config	Mon Jul 09 16:58:18 2018 +0200
@@ -91,3 +91,7 @@
   default defined
 %config end
 
+%config CONFIG_DRIVER_RFPACKET_SI446X_TCXO
+  desc Configure the SI446X to use a TCXO instead of a XTAL
+  parent CONFIG_DRIVER_RFPACKET_SI446X
+%config end