FreeCalypso > hg > fc-magnetite
view src/cs/layer1/gtt_include/ctm/ucs_functions.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 | 945cf7f506b2 |
children |
line wrap: on
line source
/* ******************************************************************************* * * COPYRIGHT (C) 2000 BY ERICSSON EUROLAB DEUTSCHLAND GmbH * 90411 NUERNBERG, GERMANY, Tel Int + 49 911 5217 100 * * The program(s) may be used and/or copied only with the * written permission from Ericsson or in accordance * with the terms and conditions stipulated in the agreement or * contract under which the program(s) have been supplied. * ******************************************************************************* * * File : baudot_functions.h * Author : EEDN/RV Matthias Doerbecker * Tested Platforms : Windows NT 4.0 * Description : header file for ucs_functions.c * * Revision history * * $Log: $ * ******************************************************************************* */ #ifndef ucs_functions_h #define ucs_functions_h "$Id: $" /* ******************************************************************************* * INCLUDE FILES ******************************************************************************* */ #include "fifo.h" /* ******************************************************************************* * DEFINITIONS ******************************************************************************* */ /****************************************************************************/ /* convertChar2UCScode() */ /* ********************* */ /* Conversion from character into UCS code */ /* (Universal Multiple-Octet Coded Character Set, Row 00 */ /* of the Multilingual plane according to ISO/IEC 10646-1). */ /* This routine only handles characters in the range 0...255 since that is */ /* all that is required for the demonstration of Baudot support. */ /* */ /* input variables: */ /* - inChar charcater that shall be converted */ /* */ /* return value: UCS code of the input character */ /* or 0xFFFF in case that inChar is not valid */ /* (e.g. inChar=='\0') */ /* */ /* Matthias Doerbecker, Ericsson Eurolab Deutschland (EED/N/RV), 2000/09/18 */ /****************************************************************************/ UWORD16 convertChar2UCScode(char inChar); /****************************************************************************/ /* convertUCScode2char() */ /* ********************* */ /* Conversion from UCS code into character */ /* This routine only handles characters in the range 0...255 since that is */ /* all that is required for the demonstration of Baudot support. */ /* */ /* input variables: */ /* - ucsCode UCS code index, */ /* must be within the range 0...255 if BITS_PER_SYMB==8, */ /* or in the range 0...63 if BITS_PER_SYMB==6, */ /* */ /* return value: character (or '\0' if ucsCode is not valid) */ /* */ /* Matthias Doerbecker, Ericsson Eurolab Deutschland (EED/N/RV), 2000/09/18 */ /****************************************************************************/ char convertUCScode2char(UWORD16 ucsCode); /****************************************************************************/ /* transformUCS2UTF() */ /* ****************** */ /* Transformation from UCS code into UTF-8. UTF-8 is a sequence consisting */ /* of 1, 2, 3, or 5 octets (bytes). See ISO/IEC 10646-1 Annex G. */ /* */ /* This routine only handles UCS codes in the range 0...0xFF since that is */ /* all that is required for the demonstration of Baudot support. */ /* */ /* input variables: */ /* - ucsCode UCS code index, */ /* */ /* output variables: */ /* - ptr_octet_fifo_state pointer to the output fifo state buffer for */ /* the UTF-8 octets. */ /* */ /* Matthias Doerbecker, Ericsson Eurolab Deutschland (EED/N/RV), 2000/06/29 */ /****************************************************************************/ void transformUCS2UTF(UWORD16 ucsCode, fifo_state_t* ptr_octet_fifo_state); /****************************************************************************/ /* transformUTF2UCS() */ /* ****************** */ /* Transformation from UTF-8 into UCS code. */ /* */ /* This routine only handles UTF-8 sequences consisting of one or two */ /* octets (corresponding to UCS codes in the range 0...0xFF) since that is */ /* all that is required for the demonstration of Baudot support. */ /* */ /* input/output variables: */ /* - ptr_octet_fifo_state pointer to the input fifo state buffer for */ /* the UTF-8 octets. */ /* */ /* output variables: */ /* - *ptr_ucsCode UCS code index */ /* */ /* return value: */ /* true, if conversion was successful */ /* false, if the input fifo buffer didn't contain enough octets for a */ /* conversion into UCS code. The output variable *ptr_ucsCode */ /* doesn't contain a valid value in this case */ /* */ /* Matthias Doerbecker, Ericsson Eurolab Deutschland (EED/N/RV), 2000/06/29 */ /****************************************************************************/ BOOL transformUTF2UCS(UWORD16 *ptr_ucsCode, fifo_state_t *ptr_octet_fifo_state); #endif