FreeCalypso > hg > fc-magnetite
view src/g23m-aci/aci/gaci.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 | 53929b40109c |
children |
line wrap: on
line source
/* +----------------------------------------------------------------------------- | Project : | Modul : +----------------------------------------------------------------------------- | 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 : Definitions for GPRS command handler and protocol stack adapter. +----------------------------------------------------------------------------- */ #include "dti.h" #ifdef GPRS #include "gaci_cmh.h" #endif #ifndef GACI_H #define GACI_H /*** T_CONTEXT_STATE changed to T_PDP_CONTEXT_STATE and moved to gaci_cmh.h ***/ #define NSAPI_TO_CID(A) ( (U8)((A)-4) ) #define CID_TO_NSAPI(A) ( (U16)((A)+4) ) typedef enum { AS_INVALID_STATE = 0, /* invalid value */ AS_MOBILE_OFF, /* the protocol stack is off before +CFUN=1 */ AS_DETACHED, /* GPRS detached */ AS_ATTACHED, /* GPRS attached */ AS_ATTACHING, /* attaching GPRS */ AS_DETACHING, /* detaching GPRS */ AS_SUSPENTED /* GPRS suspended */ } T_ATTACH_STATE; typedef enum { GC_TYPE_NONE = -1, /* no connection */ GC_TYPE_DATA_LINK = 0, /* Data connection over PPP */ GC_TYPE_NULL, /* Data connection with NULL Device */ GC_TYPE_SIM, /* Data connection with SIM */ GC_TYPE_WAP, /* Data connection for the WAP browser */ #if defined (FF_PKTIO) OR defined (FF_TCP_IP) || defined(FF_GPF_TCPIP) OR defined (FF_PSI) GC_TYPE_PKT, /* Data connection for PKTIO */ #endif /* FF_PKTIO OR FF_TCP_IP || FF_GPF_TCPIP OR FF_PSI */ GC_TYPE_EMAIL /* Data connection for an Email - Client */ } T_GPRS_CONNECT_TYPE; #ifdef GPRS typedef struct { T_PDP_CONTEXT_STATE state; UBYTE smreg_ti; T_DTI_ENTITY_ID entity_id; T_DTI_CONN_LINK_ID link_id; /* link_id for SNDCP */ T_DTI_CONN_LINK_ID link_id_uart; T_DTI_CONN_LINK_ID link_id_new; USHORT upper_tui; T_ACI_CMD_SRC owner; T_NAS_ip pdp_address_allocated; T_PDP_CONTEXT_PCO user_pco; /* setup with %CGPCO=... */ T_PDP_CONTEXT_PCO network_pco; T_SMREG_PDP_ACTIVATE_CNF *p_pdp_activate_cnf; } T_PDP_CONTEXT_INTERNAL_DATA; typedef struct _T_PDP_CONTEXT_INTERNAL { T_PDP_CONTEXT_TYPE type; U8 cid; /* PDP context id */ T_PDP_CONTEXT_INTERNAL_DATA internal_data; T_PDP_CONTEXT attributes; T_PS_ctrl_qos ctrl_qos; T_PS_qos qos; T_PS_ctrl_min_qos ctrl_min_qos; T_PS_min_qos min_qos; T_PS_ctrl_qos ctrl_neg_qos; /* holds the negotiated qos, set with smreg_pdp_activate_cnf is received */ T_PS_qos neg_qos; /* holds the negotiated qos, set with smreg_pdp_activate_cnf is received */ T_TFT_INTERNAL *p_tft_pf; BOOL tft_changed; /* True if the TFT is changed while a PDP context is activated */ //T_TFT_INTERNAL *p_tft_pf_active; //T_TFT_MODIFICATION_ACTION tft_modify; struct _T_PDP_CONTEXT_INTERNAL *p_next; } T_PDP_CONTEXT_INTERNAL; EXTERN T_PDP_CONTEXT_STATE get_state_over_cid ( U8 cid ); EXTERN void set_state_over_cid ( U8 cid, T_PDP_CONTEXT_STATE c_state ); EXTERN T_PDP_CONTEXT_STATE get_state_working_cid ( void ); EXTERN void set_state_working_cid ( T_PDP_CONTEXT_STATE c_state ); EXTERN T_ACI_CAL_OWN get_owner_over_cid ( U8 cid ); EXTERN T_PDP_CONTEXT_STATE get_state_over_nsapi_set( USHORT *nsapi_set, U8 *cid ); EXTERN T_PDP_CONTEXT_INTERNAL *pdp_context_create_node( U8 cid ); EXTERN int pdp_context_remove_node( U8 cid ); EXTERN T_PDP_CONTEXT_INTERNAL *pdp_context_find_node_from_cid( U8 cid ); EXTERN T_PDP_CONTEXT_INTERNAL *pdp_context_find_node_from_smreg_ti( U8 smreg_ti ); EXTERN T_PDP_CONTEXT_INTERNAL *pdp_context_find_node_from_dti_id( U8 dti_id ); EXTERN T_PDP_CONTEXT_INTERNAL *pdp_context_find_matching_node( T_SMREG_VAL_pdp_type smreg_pdp_type, T_NAS_ctrl_ip_address ctrl_ip_addr, T_NAS_ip_address *ip_addr ); EXTERN T_TFT_INTERNAL *pdp_context_add_tft_pf ( U8 cid, U8 tft_pf_id ); EXTERN BOOL pdp_context_del_tft_pf ( U8 cid, U8 tft_pf_id ); EXTERN T_TFT_INTERNAL *pdp_context_find_tft_pf( U8 cid, U8 tft_pf_id ); EXTERN U8 pdp_context_get_no_of_tft_pfs( U8 cid ); EXTERN void pdp_context_copy_tft_to_active_list( U8 cid ); //EXTERN T_TFT_MODIFICATION pdp_context_get_modification_action( U8 cid ); EXTERN void pdp_context_clear_tft_active_list( U8 cid ); //EXTERN T_TFT_MODIFICATION pdp_context_compare_tft( U8 cid ); EXTERN U8 pdp_context_check_if_nodes_exists( U8 *cid_array ); EXTERN U8 pdp_context_validate_pdp_type ( U8 *cid_array, T_PDP_TYPE pdp_type ); #endif /*GPRS */ EXTERN void gaci_init ( void ); EXTERN void gaci_reset ( void ); EXTERN void gaci_finit ( void ); #ifdef DTI EXTERN SHORT gaci_get_cid_over_link_id ( T_DTI_CONN_LINK_ID link_id ); EXTERN SHORT gaci_get_cid_over_dti_id ( UBYTE dti_id ); EXTERN T_DTI_CONN_LINK_ID gaci_get_link_id_over_peer ( T_DTI_ENTITY_ID entity_id ); #endif EXTERN void cmhSM_disconnect_cid ( SHORT cid, T_GPRS_CONNECT_TYPE type ); EXTERN BOOL uart_is_mt_te_link( void ); /* for ATZ */ EXTERN T_ACI_RETURN sGprsAT_Z ( T_ACI_CMD_SRC srcId ); EXTERN BOOL gaci_isATZcmd ( void ); EXTERN U8 pdp_context_get_free_cid( void ); EXTERN void gaci_RAT_caller ( SHORT rat_id, SHORT cid, UBYTE cmdBuf, UBYTE cme_err ); EXTERN void gaci_SAT_err(USHORT cause); #endif /* GACI_H */