FreeCalypso > hg > fc-magnetite
view src/gpf2/tst/drv/mux.h @ 673:62a5285e014a
Lorekeeping: allow tpudrv-leonardo.lib on Leonardo/Tango
Back in 2015 the Mother's idea was to produce a FreeCalypso development
board that would be a clone of TI Leonardo, including the original
quadband RFFE; one major additional stipulation was that this board
needed to be able to run original unmodified TCS211-20070608 firmware
with all blobs intact, with only minimal binary patches to main.lib
and tpudrv.lib. The necessary patched libs were produced at that time
in the tcs211-patches repository.
That plan was changed and we produced FCDEV3B instead, with Openmoko's
triband RFFE instead of Leonardo quadband, but when FC Magnetite started
in 2016, a TPUDRV_blob= provision was still made, allowing the possibility
of patching OM's tpudrv.lib for a restored Leonardo RFFE.
Now in 2020 we have FC Tango which is essentially a verbatim clone of
Leonardo core, including the original quadband RFFE. We have also
deblobbed our firmware so much that we have absolutely no real need
for a blob version of tpudrv.lib - but I thought it would be neat to put
the ancient TPUDRV_blob= mechanism (classic config) to its originally
intended use, just for the heck of it.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 29 May 2020 03:55:36 +0000 |
parents | cd37d228dae0 |
children |
line wrap: on
line source
/* +------------------------------------------------------------------------------ | File: mux.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 : Definitions for the Protocol Stack Entity mux. +----------------------------------------------------------------------------- */ #ifndef MUX_H #define MUX_H #ifndef _ENTITY_PREFIXED #define _ENTITY_PREFIXED(N) tst_##N #endif /*==== INCLUDES =============================================================*/ #ifndef SAP_DTI2 #define SAP_DTI2 #endif /*==== CONSTS ===============================================================*/ #define ENCODE_OFFSET 0 /* Bitoffset for encoding/decoding */ #define hCommYYY mux_hCommYYY /* Communication handle */ /* Timer definitions */ #define T001 0 #define T002 1 /* Timer durations */ #define T001_VALUE 1000 /* 1 second */ #define T002_VALUE 3000 /* 3 seconds */ /* * information for dti library */ #define MTST_DTI_DN_INTERFACE 0 #define MTST_DTI_DN_CHANNEL 0 #define MTST_DTI_DN_INSTANCE 0 /* make the pei_create, .. functions unique */ #define pei_create mux_pei_create #define pei_dti_dti_connect_req _ENTITY_PREFIXED(pei_dti_dti_connect_req) #define pei_dti_dti_connect_cnf _ENTITY_PREFIXED(pei_dti_dti_connect_cnf) #define pei_dti_dti_connect_ind _ENTITY_PREFIXED(pei_dti_dti_connect_ind) #define pei_dti_dti_connect_res _ENTITY_PREFIXED(pei_dti_dti_connect_res) #define pei_dti_dti_disconnect_req _ENTITY_PREFIXED(pei_dti_dti_disconnect_req) #define pei_dti_dti_disconnect_ind _ENTITY_PREFIXED(pei_dti_dti_disconnect_ind) #define pei_dti_dti_ready_ind _ENTITY_PREFIXED(pei_dti_dti_ready_ind) #define pei_dti_dti_data_req _ENTITY_PREFIXED(pei_dti_dti_data_req) #define pei_dti_dti_data_ind _ENTITY_PREFIXED(pei_dti_dti_data_ind) #define pei_dti_dti_getdata_req _ENTITY_PREFIXED(pei_dti_dti_getdata_req) #ifdef _SIMULATION_ #define pei_dti_dti_data_test_req _ENTITY_PREFIXED(pei_dti_dti_data_test_req) #define pei_dti_dti_data_test_ind _ENTITY_PREFIXED(pei_dti_dti_data_test_ind) #endif /* _SIMLUATION_ */ #define pei_sig_callback \ _ENTITY_PREFIXED(pei_sig_callback ) #define sig_dti_pei_connection_opened_ind \ _ENTITY_PREFIXED(sig_dti_pei_connection_opened_ind) #define sig_dti_pei_connection_closed_ind \ _ENTITY_PREFIXED(sig_dti_pei_connection_closed_ind) #define sig_dti_pei_tx_buffer_full_ind \ _ENTITY_PREFIXED(sig_dti_pei_tx_buffer_full_ind ) #define sig_dti_pei_tx_buffer_ready_ind \ _ENTITY_PREFIXED(sig_dti_pei_tx_buffer_ready_ind ) #define sig_dti_pei_data_received_ind \ _ENTITY_PREFIXED(sig_dti_pei_data_received_ind ) #ifdef MUX_PEI_C static const T_STR_IND tmr_name_to_ind[] = { { "T001", T001 }, { "T002", T002 }, { NULL, 0 } }; #endif #define MAX_SEND_BUF_COUNT 40 /*==== TYPES =================================================================*/ /* MUX global typedefs */ typedef struct { USHORT Handle; UBYTE dti_state; /* state variable for dti library */ USHORT EnabledSignalType; T_DRV_CB_FUNC Callback; T_HANDLE h_comm_mtst; char Connected; T_desc2 *recv_data; USHORT send_data_buf_count; } T_MUX_DATA; /*==== EXPORTS ===============================================================*/ short pei_create (T_PEI_INFO const **info); /* * wrapping functions for dtilib primitives */ EXTERN const void pei_dti_dti_connect_ind ( T_DTI2_CONNECT_IND *dti_connect_ind); EXTERN const void pei_dti_dti_connect_cnf ( T_DTI2_CONNECT_CNF *dti_connect_cnf); EXTERN const void pei_dti_dti_disconnect_ind ( T_DTI2_DISCONNECT_IND *dti_disconnect_ind); EXTERN const void pei_dti_dti_data_ind ( T_DTI2_DATA_IND *dti_data_ind); EXTERN const void pei_dti_dti_ready_ind ( T_DTI2_READY_IND *dti_ready_ind); #ifdef _SIMULATION_ EXTERN const void pei_dti_dti_data_test_ind ( T_DTI2_DATA_TEST_IND *dti_data_test_ind); #endif /* _SIMULATION_ */ /* * this function is called by DTILIB */ EXTERN void pei_sig_callback ( U8 instance, U8 interfac, U8 channel, U8 reason, T_DTI2_DATA_IND *dti_data2_ind ); /* * these functions are called by pei_sig_callback */ EXTERN const void sig_dti_pei_connection_opened_ind(); EXTERN const void sig_dti_pei_connection_closed_ind(); EXTERN const void sig_dti_pei_tx_buffer_full_ind(); EXTERN const void sig_dti_pei_tx_buffer_ready_ind(); EXTERN const void sig_dti_pei_data_received_ind ( T_DTI2_DATA_IND *dti_data_req ); #ifdef MUX_PEI_C /* Entity data base */ T_MUX_DATA mux_data; /* DTI connection handle for DTI library */ DTI_HANDLE mtst_hDTI; /* Communication handles */ #else /* MUX_PEI_C */ /* Entity data base */ extern T_MUX_DATA mux_data; /* DTI connection handle for DTI library */ EXTERN DTI_HANDLE mtst_hDTI; #endif /* MUX_PEI_C */ #endif /* !MUX_H */