view src/aci2/bmi/mmiMelody_data.c @ 600:8f50b202e81f

board preprocessor conditionals: prep for more FC hw in the future This change eliminates the CONFIG_TARGET_FCDEV3B preprocessor symbol and all preprocessor conditionals throughout the code base that tested for it, replacing them with CONFIG_TARGET_FCFAM or CONFIG_TARGET_FCMODEM. These new symbols are specified as follows: CONFIG_TARGET_FCFAM is intended to cover all hardware designs created by Mother Mychaela under the FreeCalypso trademark. This family will include modem products (repackagings of the FCDEV3B, possibly with RFFE or even RF transceiver changes), and also my desired FreeCalypso handset product. CONFIG_TARGET_FCMODEM is intended to cover all FreeCalypso modem products (which will be firmware-compatible with the FCDEV3B if they use TI Rita transceiver, or will require a different fw build if we switch to one of Silabs Aero transceivers), but not the handset product. Right now this CONFIG_TARGET_FCMODEM preprocessor symbol is used to conditionalize everything dealing with MCSI. At the present moment the future of FC hardware evolution is still unknown: it is not known whether we will ever have any beyond-FCDEV3B hardware at all (contingent on uncertain funding), and if we do produce further FC hardware designs, it is not known whether they will retain the same FIC modem core (triband), if we are going to have a quadband design that still retains the classic Rita transceiver, or if we are going to switch to Silabs Aero II or some other transceiver. If we produce a quadband modem that still uses Rita, it will run exactly the same fw as the FCDEV3B thanks to the way we define TSPACT signals for the RF_FAM=12 && CONFIG_TARGET_FCFAM combination, and the current fcdev3b build target will be renamed to fcmodem. OTOH, if that putative quadband modem will be Aero-based, then it will require a different fw build target, the fcdev3b target will stay as it is, and the two targets will both define CONFIG_TARGET_FCFAM and CONFIG_TARGET_FCMODEM, but will have different RF_FAM numbers. But no matter which way we are going to evolve, it is not right to have conditionals on CONFIG_TARGET_FCDEV3B in places like ACI, and the present change clears the way for future evolution.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 01 Apr 2019 01:05:24 +0000
parents 3c2acfa1a72f
children
line wrap: on
line source

/*******************************************************************************

          CONDAT (UK)

********************************************************************************

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.

********************************************************************************

 $Project name: Basic MMI
 $Project code: BMI (6349)
 $Module:   PhoneBook
 $File:       MmiMelody_Data.c
 $Revision:   1.0

 $Author:   Condat(UK)
 $Date:       25/10/00

********************************************************************************

 Description:

********************************************************************************

 $History: MmiMelody_data.c

  25/10/00      Original Condat(UK) BMI version.

 $End

*******************************************************************************/

#define ENTITY_MFW

/* includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#if defined (NEW_FRAME)

#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"

#else

#include "STDDEFS.H"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"

#endif

#include "MmiBuzzer.h"

typedef struct
{
  USHORT      command_1;
  USHORT      command_2;
  USHORT      length;
} T_DESCR;

#define DEF_MELODY(name) const T_DESCR name[] = {

#define END_MELODY BZ_TERM,0 };

//#include "tb1.hm"

#ifdef USE_PWT
#else

const UINT16 MELODY_BUZ_FREQ[] =  {
  0, // REST
//    A    A#  B  C  C#  D   D#  E    F   F#  G   G#
    27,  29,  31,  33,  35,  37,  39,  41,  44,  46,  49,  52,
    55,  58,  62,  65,  69,  73,  78,  82,  87,  92,  98,  104,
   110, 117, 123, 131, 139, 147, 156, 165, 175, 185, 196, 208,
   220, 233, 247, 262, 277, 294, 311, 330, 349, 370, 392, 415,
   440, 466, 494, 523, 554, 587, 622, 659, 698, 740, 784, 831,  // MIDDLE
   880, 932, 988,1047,1109,1175,1245,1319,1397,1480,1568,1661,
  1760,1865,1976,2093,2217,2349,2489,2637,2794,2960,3136,3322,
  3520,3729,3951,4186,4435,4699,4978,5274,5588,5920,6272,6645,
  7040,7459,7902,8372,8870,9397,9956,10548,11175,11840,12544,13290
};

#endif

/*
  abc tune notation
  =================

The following letters are used to represent notes:-


                                                      d'
                                                -c'- ----
                                             b
                                        -a- --- ---- ----
                                       g
 ------------------------------------f-------------------
                                   e
 --------------------------------d-----------------------
                               c
 ----------------------------B---------------------------
                           A
 ------------------------G-------------------------------
                       F
 --------------------E-----------------------------------
                   D
 ---- ---- ---- -C-
            B,
 ---- -A,-
  G,
*/

#define TDMA_12 55

DEF_MELODY(rising_chromatic)
f1, 0,TDMA_12,
fs1, 0,TDMA_12,
g1, 0,TDMA_12,
gs1, 0,TDMA_12,
a1, 0,TDMA_12,
as1, 0,TDMA_12,
b1, 0,TDMA_12,
c2, 0,TDMA_12,
cs2, 0,TDMA_12,
d2, 0,TDMA_12,
ds2, 0,TDMA_12,
e2, 0,TDMA_12,
f2, 0,TDMA_12,
fs2, 0,TDMA_12,
g2, 0,TDMA_12,
gs2, 0,TDMA_12,
a2, 0,TDMA_12,
as2, 0,TDMA_12,
b2, 0,TDMA_12,
c3, 0,TDMA_12,
cs3, 0,TDMA_12,
d3, 0,TDMA_12,
ds3, 0,TDMA_12,
e3, 0,TDMA_12,
f3, 0,TDMA_12,
fs3, 0,TDMA_12,
g3, 0,TDMA_12,
gs3, 0,TDMA_12,
a3, 0,TDMA_12,
as3, 0,TDMA_12,
b3, 0,TDMA_12,
c4, 0,TDMA_12,
cs4, 0,TDMA_12,
d4, 0,TDMA_12,
ds4, 0,TDMA_12,
e4, 0,TDMA_12,
f4, 0,TDMA_12,
fs4, 0,TDMA_12,
g4, 0,TDMA_12,
gs4, 0,TDMA_12,
a4, 0,TDMA_12,
as4, 0,TDMA_12,
b4, 0,TDMA_12,
c5, 0,TDMA_12,
cs5, 0,TDMA_12,
d5, 0,TDMA_12,
ds5, 0,TDMA_12,
e5, 0,TDMA_12,
END_MELODY

DEF_MELODY(rising_cscale)
f1, 0,TDMA_12,
g1, 0,TDMA_12,
a1, 0,TDMA_12,
b1, 0,TDMA_12,
c2, 0,TDMA_12,
d2, 0,TDMA_12,
e2, 0,TDMA_12,
f2, 0,TDMA_12,
g2, 0,TDMA_12,
a2, 0,TDMA_12,
b2, 0,TDMA_12,
c3, 0,TDMA_12,
d3, 0,TDMA_12,
e3, 0,TDMA_12,
f3, 0,TDMA_12,
g3, 0,TDMA_12,
a3, 0,TDMA_12,
b3, 0,TDMA_12,
c4, 0,TDMA_12,
d4, 0,TDMA_12,
e4, 0,TDMA_12,
f4, 0,TDMA_12,
g4, 0,TDMA_12,
a4, 0,TDMA_12,
b4, 0,TDMA_12,
c5, 0,TDMA_12,
d5, 0,TDMA_12,
e5, 0,TDMA_12,
END_MELODY

// Coca cola
DEF_MELODY(MELODY_ONE)
 fs3,0,TDMA_12,
 fs3,0,TDMA_12,
 fs3,0,TDMA_12,
 fs3,0,TDMA_12,
 g3,0,TDMA_12,
 fs3,0,TDMA_12,
 e3,0,TDMA_12,
 e3,0,TDMA_12,
 a3,0,TDMA_12,
 fs3,0,TDMA_12,
 d3,0,TDMA_12,
 0xFFFF,0xFFFF,0,
END_MELODY

DEF_MELODY(The_Ale_is_dear)
fs4,30,TDMA_12,        e4,30,TDMA_12, fs4,30,TDMA_12, b3,30,TDMA_12,        fs4,30,TDMA_12, e4,30,TDMA_12,
fs4,30,TDMA_12, gs4,30,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, cs4,30,TDMA_12, a4,30,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
fs4,60,TDMA_12,        e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12,        cs4,30,TDMA_12, e4,30,TDMA_12,
fs4,30,TDMA_12, e4,30,TDMA_12, d4,30,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,  cs3,30,TDMA_12, d3,30,TDMA_12, cs3,30,TDMA_12,

fs4,60,TDMA_12,        e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12,        fs4,30,TDMA_12, e4,30,TDMA_12,
fs4,30,TDMA_12, g4,30,TDMA_12, e4,30,TDMA_12, fs4,30,TDMA_12, cs4,30,TDMA_12, a4,30,TDMA_12, cs4,30,TDMA_12, e4,30,TDMA_12,
fs4,60,TDMA_12,        e4,30,TDMA_12, fs4,30,TDMA_12, b3,60,TDMA_12,        cs4,30,TDMA_12, e4,30,TDMA_12,
fs4,30,TDMA_12, e4,30,TDMA_12, d4,30,TDMA_12, cs4,30,TDMA_12, b3,30,TDMA_12,  cs3,30,TDMA_12, d3,30,TDMA_12, cs3,30,TDMA_12,

b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12,        cs4,30,TDMA_12, b3,30,TDMA_12,
a3,30,TDMA_12, a3,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12,
b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12,        cs4,30,TDMA_12, b3,30,TDMA_12,
fs4,60,TDMA_12,        e4,30,TDMA_12, cs4,30,TDMA_12, b3,60,TDMA_12,        b3,60,TDMA_12,

b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12,        cs4,30,TDMA_12, b3,30,TDMA_12,
a3,30,TDMA_12, a3,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, a3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12,
b3,30,TDMA_12, b3,30,TDMA_12, b3,30,TDMA_12, cs4,30,TDMA_12, d4,60,TDMA_12,        cs4,30,TDMA_12, b3,30,TDMA_12,
fs4,60,TDMA_12,        e4,30,TDMA_12, cs4,30,TDMA_12, b3,60,TDMA_12,        b3,60,TDMA_12,
END_MELODY

DEF_MELODY(Danza_de_Astureses)
c4,60,TDMA_12, d4,60,TDMA_12,
e4,60,TDMA_12, d4,24,TDMA_12,
e4,24,TDMA_12, f4,24,TDMA_12,
e4,24,TDMA_12, d4,24,TDMA_12,
c4,24,TDMA_12, b3,60,TDMA_12,
g3,60,TDMA_12, c4,60,TDMA_12,
d4,60,TDMA_12, e4,60,TDMA_12,
d4,24,TDMA_12, e4,24,TDMA_12,
fs4,24,TDMA_12, d4,24,TDMA_12,
e4,24,TDMA_12, f4,24,TDMA_12,
g4,120,TDMA_12,
END_MELODY


DEF_MELODY(MELODY_HELLO)
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
  e3,0,TDMA_12,
   0xFFFF,       0xFFFF,        0,
END_MELODY

DEF_MELODY(bugle)
c4, 80,TDMA_12,
BZ_REST, 5,TDMA_12,
e4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
g3, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 80,TDMA_12,
BZ_REST, 45,TDMA_12,
c4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
e4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
g3, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 120,TDMA_12,
BZ_REST, 45,TDMA_12,
c4, 80,TDMA_12,
BZ_REST, 5,TDMA_12,
e4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
g3, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 80,TDMA_12,
BZ_REST, 45,TDMA_12,
c4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 60,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 20,TDMA_12,
BZ_REST, 5,TDMA_12,
e4, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
g3, 40,TDMA_12,
BZ_REST, 5,TDMA_12,
c4, 120,TDMA_12,
BZ_REST, 40,TDMA_12,
END_MELODY