FreeCalypso > hg > fc-magnetite
view src/gpf2/ccd/ccddata.h @ 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 | 864b8cc0cf63 |
children |
line wrap: on
line source
/* +----------------------------------------------------------------------------- | Project : | Modul : ccddata.h +----------------------------------------------------------------------------- | Copyright 2002 Texas Instruments Berlin, AG | All rights reserved. | | This file is confidential and a trade secret of Texas | Instruments Berlin, AG | The receipt of or possession of this file does not convey | any rights to reproduce or disclose its contents or to | manufacture, use, or sell anything it may describe, in | whole, or in part, without the specific written consent of | Texas Instruments Berlin, AG. +----------------------------------------------------------------------------- | Purpose : Exports of the Ccddata Lib/Dll. +----------------------------------------------------------------------------- */ #ifndef CCDDATA_H #define CCDDATA_H /*==== INCLUDES =============================================================*/ #include "pdi.h" /*==== CONSTS ===============================================================*/ #define CCDDATA_CCDENT_INVALID -1 #define CCDDATA_MCONST_ERROR -1 #define CCDDATA_PCONST_ERROR -1 #define CCDDATA_DLL_OK 0 #define CCDDATA_DLL_ALREADY -10 #define CCDDATA_DLL_LOADLIB -11 #define CCDDATA_DLL_LOADFUN -12 #define CCDDATA_DLL_REGISTER -13 /*==== TYPES =================================================================*/ #if defined __CCD_GLOBS_H typedef SHORT (*T_FUNC_POINTER)(const ULONG cref, const ULONG eref, T_CCD_Globs *globs); typedef struct { T_FUNC_POINTER enc; T_FUNC_POINTER dec; } T_FUNC_STRUCT; #endif typedef struct { int p1; int p2; } T_COMENDPOINTS; /*==== EXPORTS ===============================================================*/ /* Use CCDDATA_DLL_FUNC only for optmizations. The extern declarations * also work if the function are in a dll. */ #ifndef CCDDATA_DLL_FUNC #define CCDDATA_IMPORT_FUNC extern #else /* CCDDATA_DLL_FUNC */ #define CCDDATA_IMPORT_FUNC extern __declspec(dllimport) #endif /* CCDDATA_DLL_FUNC */ /* ccddata_load.c */ extern int ccddata_init (const char* dllname, int reload, void (*ccddata_init_notify)(void), void (*ccddata_exit_notify)(void)); extern int ccddata_exit (void); extern char* ccddata_dllname (void); /* ccd_config.c */ #if defined(CCD_C) || defined(PDI_C) UBYTE* ccddata_get_mi_length (void); #endif #ifdef CCD_C UBYTE cdc_init (T_FUNC_POINTER codec[][2]); UBYTE* ccddata_get_decmsgbuffer (void); #endif /* ccddata_pdi.c */ CCDDATA_IMPORT_FUNC int ccddata_get_pdi_dinfo (const T_PDI_DECODEINFO* (*dinfo) ); /* ccddata_mconst.c */ CCDDATA_IMPORT_FUNC int ccddata_get_num_of_entities(void); CCDDATA_IMPORT_FUNC int ccddata_get_max_message_id(void); CCDDATA_IMPORT_FUNC int ccddata_get_max_bitstream_len(void); CCDDATA_IMPORT_FUNC int ccddata_get_max_mstruct_len(void); CCDDATA_IMPORT_FUNC int ccddata_mccd_symbols(void); /* ccddata_pconst.c */ CCDDATA_IMPORT_FUNC int ccddata_get_max_sap_num(void); CCDDATA_IMPORT_FUNC int ccddata_get_max_primitive_id(void); CCDDATA_IMPORT_FUNC int ccddata_get_max_pstruct_len(void); /* ccddata_ccdmtab.c */ CCDDATA_IMPORT_FUNC const T_CCD_VarTabEntry* ccddata_get_mvar (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_SpareTabEntry* ccddata_get_spare (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_CalcTabEntry* ccddata_get_calc (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_CompTabEntry* ccddata_get_mcomp (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_ElemTabEntry* ccddata_get_melem (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_CalcIndex* ccddata_get_calcidx (USHORT idx); CCDDATA_IMPORT_FUNC USHORT ccddata_get_mmtx (USHORT entity, USHORT msgid, USHORT index); /* ccddata_ccdptab.c */ CCDDATA_IMPORT_FUNC const T_CCD_VarTabEntry* ccddata_get_pvar (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_CompTabEntry* ccddata_get_pcomp (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_ElemTabEntry* ccddata_get_pelem (USHORT idx); CCDDATA_IMPORT_FUNC USHORT ccddata_get_pmtx (USHORT sap, USHORT primid, USHORT index); /* ccddata_cdemval.c */ CCDDATA_IMPORT_FUNC const T_CCD_ValTabEntry* ccddata_get_mval (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_StrTabEntry* ccddata_get_mstr (USHORT idx); /* ccddata_cdepval.c */ CCDDATA_IMPORT_FUNC const T_CCD_ValTabEntry* ccddata_get_pval (USHORT idx); CCDDATA_IMPORT_FUNC const T_CCD_StrTabEntry* ccddata_get_pstr (USHORT idx); /* ccddata_ccdent.c */ #ifndef CCDDATA_CCDENT_C CCDDATA_IMPORT_FUNC short ccddata_get_ccdent (char* entname); CCDDATA_IMPORT_FUNC const char * ccddata_get_entname (short ccdent); #endif /* !CCDDATA_CCDENT_C*/ /* ccddata_alias.c */ CCDDATA_IMPORT_FUNC char* ccddata_get_alias (USHORT idx, int from_msg); /* ccddata_version.c */ CCDDATA_IMPORT_FUNC char* ccddata_get_version (); CCDDATA_IMPORT_FUNC int ccddata_get_table_version (); /* ccddata_eg.c */ #ifndef CCDDATA_EG_C CCDDATA_IMPORT_FUNC int ccddata_eg_nodes (void); CCDDATA_IMPORT_FUNC char** ccddata_eg_nodenames (void); CCDDATA_IMPORT_FUNC char* ccddata_eg_adjacent (int idx); CCDDATA_IMPORT_FUNC int ccddata_eg_saps (void); CCDDATA_IMPORT_FUNC char** ccddata_eg_sapnames (void); CCDDATA_IMPORT_FUNC T_COMENDPOINTS* ccddata_eg_comendpoints (int idx); #endif /* !CCDDATA_EG_C */ #endif /* !CCDDATA_H */