changeset 611:bbe2b0d17d1e

gsm-fw/L1/audio_cfile/l1audio_init.c: hack to pass compilation w/o AUDIO_TASK
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 29 Aug 2014 05:44:42 +0000
parents 3121e35f422c
children 700d450bb8da
files gsm-fw/L1/audio_cfile/l1audio_init.c
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/L1/audio_cfile/l1audio_init.c	Fri Aug 29 05:18:05 2014 +0000
+++ b/gsm-fw/L1/audio_cfile/l1audio_init.c	Fri Aug 29 05:44:42 2014 +0000
@@ -142,8 +142,25 @@
   #endif
 #endif
 #if(L1_BT_AUDIO ==1)
-extern T_L1_BT_AUDIO bt_audio;
+  extern T_L1_BT_AUDIO bt_audio;
 #endif
+
+/*
+ * FreeCalypso hack: the version of l1_confg.h in the Leonardo semi-src
+ * sets AUDIO_TASK to 1 unconditionally, thus it appears that by the
+ * time TCS211 came around, TI stopped supporting and testing the
+ * sans-AUDIO_TASK configuration.  We do wish to support it in FreeCalypso
+ * though.  Attempting to compile this module w/o AUDIO_TASK failed
+ * because some preprocessor constant definitions were missing.
+ * All 3 offending constants are defined in l1audio_const.h, but only
+ * when AUDIO_TASK is enabled.  The following hack is our workaround.
+ */
+#if !AUDIO_TASK
+  #define C_BGD_RECOGN  5
+  #define C_BGD_ALIGN   6
+  #define NO_MELODY_SELECTED    (0)
+#endif
+
   /**************************************/
   /* Prototypes for L1 initialization   */
   /**************************************/