diff options
Diffstat (limited to 'wl1271/platforms/os/common/inc')
-rw-r--r-- | wl1271/platforms/os/common/inc/IPCKernelApi.h | 45 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/RxBuf.h | 131 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/WlanDrvCommon.h | 119 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/cli_cu_common.h | 117 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/convert.h | 156 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/osApi.h | 703 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/osDebug.h | 141 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/osRgstry.h | 78 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/spi_api.h | 74 | ||||
-rw-r--r-- | wl1271/platforms/os/common/inc/tracebuf_api.h | 79 |
10 files changed, 0 insertions, 1643 deletions
diff --git a/wl1271/platforms/os/common/inc/IPCKernelApi.h b/wl1271/platforms/os/common/inc/IPCKernelApi.h deleted file mode 100644 index ad772c4c..00000000 --- a/wl1271/platforms/os/common/inc/IPCKernelApi.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * IPCKernelApi.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _IPCKERNELAPI_H_ -#define _IPCKERNELAPI_H_ -#include "tidef.h" - -TI_UINT32 IPCKernelInit (TI_HANDLE hAdapter,TI_HANDLE hIPCEv); - -TI_UINT32 IPCKernelDeInit (TI_HANDLE hAdapter); - - TI_INT32 IPC_EventSend (TI_HANDLE hAdapter, TI_UINT8 *pEvData, TI_UINT32 EvDataSize); - - -#endif diff --git a/wl1271/platforms/os/common/inc/RxBuf.h b/wl1271/platforms/os/common/inc/RxBuf.h deleted file mode 100644 index 062d333b..00000000 --- a/wl1271/platforms/os/common/inc/RxBuf.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * RxBuf.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/***************************************************************************/ -/* */ -/* MODULE: buf.h */ -/* PURPOSE: manages the allocation/free and field access of the BUF */ -/* */ -/***************************************************************************/ -#ifndef _BUF_H_ -#define _BUF_H_ - -#include "tidef.h" -#include "queue.h" -#include "public_descriptors.h" - - - -#define WSPI_PAD_BYTES 16 /* Add padding before data buffer for WSPI overhead */ -#define PAYLOAD_ALIGN_PAD_BYTES 4 /* Add an extra word for alignment the MAC payload in case of QoS MSDU */ - - - -/** - * \brief Buffer for Tx/Rx packets - */ -typedef void BUF, *PBUF; - -/* Packet types */ - - -/** - * \def RX_BUF_DATA - * \brief Macro which gets a pointer to BUF packet header and returns the pointer to the start address of the WLAN packet's data - */ -#define RX_BUF_DATA(pBuf) ((void*)((TI_UINT8 *)pBuf + sizeof(RxIfDescriptor_t))) -/** - * \def RX_BUF_LEN - * \brief Macro which gets a pointer to BUF packet header and returns the buffer length (without Rx Descriptor) of the WLAN packet - */ -#define RX_BUF_LEN(pBuf) ( (((RxIfDescriptor_t *)(pBuf))->length << 2) - \ - ((RxIfDescriptor_t *)(pBuf))->extraBytes - \ - sizeof(RxIfDescriptor_t) ) - -/** - * \def RX_ETH_PKT_DATA - * \brief Macro which gets a pointer to BUF packet header and returns the pointer to the start address of the ETH packet's data - */ -#define RX_ETH_PKT_DATA(pBuf) *((void **)(((TI_UINT32)pBuf + sizeof(RxIfDescriptor_t) + 2) & ~3)) -/** - * \def RX_ETH_PKT_LEN - * \brief Macro which gets a pointer to BUF packet header and returns the buffer length (without Rx Descriptor) of the ETH packet - */ -#define RX_ETH_PKT_LEN(pBuf) *((TI_UINT32 *)(((TI_UINT32)pBuf + sizeof(RxIfDescriptor_t) + 6) & ~3)) - - -/** \brief BUF Allocation - * - * \param hOs - OS module object handle - * \param len - Length of allocated WBUF - * \param ePacketClassTag - The RX packet type (used only in EMP) - * \return On success: Pointer to WBUF ; Otherwise: NULL - * - * \par Description - * This function allocates BUF element for Tx/Rx packet - * - * \sa - */ -BUF* RxBufAlloc (TI_HANDLE hOs, TI_UINT32 len, PacketClassTag_e ePacketClassTag); - - -/** \brief BUF Free - * - * \param hOs - OS module object handle - * \param pWbuf - Pointer to WBUF which was previously created by user - * \return void - * - * \par Description - * This function frees the memory allocated for BUF element - * - * \sa - */ -void RxBufFree (TI_HANDLE hOs, void* pBuf); - - -/** \brief BUF Free - * - * \param hOs - OS module object handle - * \param pWbuf - Pointer to WBUF which was previously created by user - * \return void - * - * \par Description - * This function increment the start address of data held in BUF element in len. - * - * \sa - */ -void RxBufReserve (TI_HANDLE hOs, void* pBuf, TI_UINT32 len); - -#endif - diff --git a/wl1271/platforms/os/common/inc/WlanDrvCommon.h b/wl1271/platforms/os/common/inc/WlanDrvCommon.h deleted file mode 100644 index 1fbd5830..00000000 --- a/wl1271/platforms/os/common/inc/WlanDrvCommon.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * WlanDrvCommon.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - - -/** \file WlanDrvCommon.h - * \brief Defines WlanDrvIf objects common to all OS types. - * - * \see WlanDrvIf.h - */ - -#ifndef __WLAN_DRV_COMMON_H__ -#define __WLAN_DRV_COMMON_H__ - - -#include "tidef.h" -#include "TWDriver.h" - -#define DRV_ADDRESS_SIZE (sizeof(TI_INT32)) -#define MAX_CHUNKS_IN_FILE (1000) -#define OS_SPECIFIC_RAM_ALLOC_LIMIT (0xFFFFFFFF) /* assume OS never reach that limit */ - -/* Driver steady states - for driver external users */ -typedef enum -{ - DRV_STATE_IDLE, - DRV_STATE_RUNNING, - DRV_STATE_STOPING, - DRV_STATE_STOPPED, - DRV_STATE_FAILED -} EDriverSteadyState; - - -/* The driver Start/Stop actions */ -typedef enum -{ - ACTION_TYPE_NONE, - ACTION_TYPE_START, - ACTION_TYPE_STOP -} EActionType; - -/* Initialization file info */ -typedef struct -{ - void *pImage; - unsigned long uSize; -} TInitImageInfo; - -/* WlanDrvIf object common part (included by TWlanDrvIfObj from each OS abstraction layer) */ -typedef struct -{ - /* Other modules handles */ - void *hDrvMain; - void *hCmdHndlr; - void *hContext; - void *hTxDataQ; - void *hTxMgmtQ; - void *hTxCtrl; - void *hTWD; - void *hEvHandler; - void *hReport; - void *hCmdDispatch; - - /* Initialization files info */ - TInitImageInfo tIniFile; - TInitImageInfo tNvsImage; - TInitImageInfo tFwImage; - - EDriverSteadyState eDriverState; /* The driver state as presented to the OS */ - TI_UINT32 uLinkSpeed; - -} TWlanDrvIfCommon; - - -/* The loader files interface */ -typedef struct -{ - TI_UINT32 uNvsFileLength; - TI_UINT32 uFwFileLength; - TI_UINT32 uIniFileLength; - char data[1]; - /* eeprom image follows */ - /* firmware image follows */ - /* init file follows */ -} TLoaderFilesData; - - - -#endif /* __WLAN_DRV_COMMON_H__ */ diff --git a/wl1271/platforms/os/common/inc/cli_cu_common.h b/wl1271/platforms/os/common/inc/cli_cu_common.h deleted file mode 100644 index ae755b70..00000000 --- a/wl1271/platforms/os/common/inc/cli_cu_common.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * cli_cu_common.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef common_h -#define common_h - -#include "tidef.h" - -#ifdef _WINDOWS -#define DRV_NAME "\\\\.\\tiwlnpci" -#endif - -#ifndef TIWLAN_DRV_NAME -#define TIWLAN_DRV_NAME DRV_NAME -#endif - -#define IN /* input parameter */ -#define OUT /* output parameter */ -#define INOUT /* input & output parameter */ - -#ifndef TI_TRUE -#define TI_TRUE 1 -#endif - -#ifndef TI_FALSE -#define TI_FALSE 0 -#endif - -#ifndef TI_PENDING -#define TI_PENDING 2 -#endif - - -#ifndef NULL -# define NULL 0L -#endif - -#ifndef TI_VOIDCAST -#define TI_VOIDCAST(p) ((void)p) -#endif - -#ifdef __LINUX__ -#ifndef print -# define print(fmt, arg...) fprintf(stdout, fmt, ##arg) -#endif - -#ifndef print_err -# define print_err(fmt, arg...) fprintf(stderr, fmt, ##arg) -#endif - -#ifndef print_deb -# ifdef DEBUG_MESSAGES -# define print_deb(fmt, arg...) fprintf(stdout, fmt, ##arg) -# else -# define print_deb(fmt, arg...) -# endif /* DEBUG_MESSAGES */ -#endif /* print_deb */ - -#endif /* __LINUX__ */ - -#ifndef SIZE_ARR -# define SIZE_ARR(a) (sizeof(a)/sizeof(a[0]) ) -#endif - -#ifndef min -# define min(a, b) (((a)<(b)) ? (a) : (b)) -#endif - -#ifndef max -# define max(a, b) (((a)>(b)) ? (a) : (b)) -#endif - -typedef struct -{ - TI_UINT32 value; - char *name; -} named_value_t; - -#define print_available_values(arr) \ - { int i; for(i=0; i<SIZE_ARR(arr); i++) \ - print("%d - %s%s", arr[i].value, arr[i].name, (i>=SIZE_ARR(arr)-1) ? "\n" : ", " ); \ - } - -void print_memory_dump(char *addr, int size ); - -#endif /* common_h */ - diff --git a/wl1271/platforms/os/common/inc/convert.h b/wl1271/platforms/os/common/inc/convert.h deleted file mode 100644 index 28801331..00000000 --- a/wl1271/platforms/os/common/inc/convert.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * convert.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if !defined _CONVERT_H -#define _CONVERT_H - -#include "TWDriver.h" -#include "STADExternalIf.h" -#include "InternalCmdCodes.h" -#include "cu_common.h" -#include "TWDriverScan.h" - -/***********************/ -/* General definitions */ -/***********************/ - -#define TIWLN_802_11_SUPPORTED_RATES SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM -#define TIWLN_802_11_SUPPORTED_RATES_SET SITE_MGR_DESIRED_SUPPORTED_RATE_SET_PARAM -#define TIWLN_802_11_CURRENT_RATES_GET SITE_MGR_CURRENT_TX_RATE_PARAM -#define TIWLN_802_11_CHANNEL_GET SITE_MGR_CURRENT_CHANNEL_PARAM /* wext in linux */ -#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11D REGULATORY_DOMAIN_ENABLE_DISABLE_802_11D -#define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11H REGULATORY_DOMAIN_ENABLE_DISABLE_802_11H -#define TIWLN_REG_DOMAIN_GET_802_11D REGULATORY_DOMAIN_ENABLED_PARAM -#define TIWLN_REG_DOMAIN_GET_802_11H REGULATORY_DOMAIN_MANAGEMENT_CAPABILITY_ENABLED_PARAM -#define TIWLN_REG_DOMAIN_GET_COUNTRY_2_4 REGULATORY_DOMAIN_COUNTRY_2_4_PARAM -#define TIWLN_REG_DOMAIN_SET_COUNTRY_2_4 REGULATORY_DOMAIN_COUNTRY_2_4_PARAM -#define TIWLN_REG_DOMAIN_GET_COUNTRY_5 REGULATORY_DOMAIN_COUNTRY_5_PARAM -#define TIWLN_REG_DOMAIN_SET_COUNTRY_5 REGULATORY_DOMAIN_COUNTRY_5_PARAM -#define TIWLN_REG_DOMAIN_SET_DFS_RANGE REGULATORY_DOMAIN_DFS_CHANNELS_RANGE -#define TIWLN_REG_DOMAIN_GET_DFS_RANGE REGULATORY_DOMAIN_DFS_CHANNELS_RANGE -#define TIWLN_802_11_POWER_MODE_GET POWER_MGR_POWER_MODE -#define TIWLN_802_11_POWER_MODE_SET POWER_MGR_POWER_MODE -#define TIWLN_802_11_RSSI TWD_RSSI_LEVEL_PARAM -#define TIWLN_802_11_TX_POWER_DBM_GET REGULATORY_DOMAIN_CURRENT_TX_POWER_IN_DBM_PARAM -#define TIWLN_802_11_POWER_MGR_PROFILE POWER_MGR_POWER_MODE - -#define TIWLN_SHORT_SLOT_GET SITE_MGR_DESIRED_SLOT_TIME_PARAM -#define TIWLN_SHORT_SLOT_SET SITE_MGR_DESIRED_SLOT_TIME_PARAM -#define TIWLN_IBSS_PROTECTION_GET CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM /* not implemented in CUDK */ -#define TIWLN_IBSS_PROTECTION_SET CTRL_DATA_CURRENT_IBSS_PROTECTION_PARAM /* not implemented in CUDK */ -#define TIWLN_802_11_MIXED_MODE_SET RSN_MIXED_MODE -#define TIWLN_802_11_MIXED_MODE_GET RSN_MIXED_MODE - -#define TIWLN_802_11_GET_AP_QOS_PARAMS QOS_MNGR_AP_QOS_PARAMETERS -#define TIWLN_802_11_GET_AP_QOS_CAPABILITIES SITE_MGR_GET_AP_QOS_CAPABILITIES -#define TIWLN_802_11_ADD_TSPEC QOS_MNGR_ADD_TSPEC_REQUEST -#define TIWLN_802_11_GET_TSPEC_PARAMS QOS_MNGR_OS_TSPEC_PARAMS -#define TIWLN_802_11_DELETE_TSPEC QOS_MNGR_DEL_TSPEC_REQUEST -#define TIWLN_802_11_GET_CURRENT_AC_STATUS QOS_MNGR_AC_STATUS -#define TIWLN_802_11_SET_MEDIUM_USAGE_THRESHOLD TX_CTRL_SET_MEDIUM_USAGE_THRESHOLD -#define TIWLN_802_11_GET_MEDIUM_USAGE_THRESHOLD TX_CTRL_GET_MEDIUM_USAGE_THRESHOLD -#define TIWLN_802_11_GET_DESIRED_PS_MODE QOS_MNGR_GET_DESIRED_PS_MODE -#define TIWLN_802_11_SET_RX_TIMEOUT QOS_SET_RX_TIME_OUT -#define TIWLN_802_11_POWER_LEVEL_DEFAULT_GET POWER_MGR_POWER_LEVEL_DEFAULT -#define TIWLN_802_11_POWER_LEVEL_DEFAULT_SET POWER_MGR_POWER_LEVEL_DEFAULT -#define TIWLN_802_11_POWER_LEVEL_PS_SET POWER_MGR_POWER_LEVEL_PS -#define TIWLN_802_11_POWER_LEVEL_PS_GET POWER_MGR_POWER_LEVEL_PS -#define TIWLN_GET_POWER_CONSUMPTION_STATISTICS POWER_MGR_GET_POWER_CONSUMPTION_STATISTICS -#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_SET SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM -#define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_GET SITE_MGR_BEACON_FILTER_DESIRED_STATE_PARAM -#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_GET POWER_MGR_POWER_LEVEL_DOZE_MODE -#define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_SET POWER_MGR_POWER_LEVEL_DOZE_MODE -#define TIWLN_802_11_SHORT_PREAMBLE_GET SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM -#define TIWLN_802_11_SHORT_PREAMBLE_SET SITE_MGR_DESIRED_PREAMBLE_TYPE_PARAM -#define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS -#define TIWLN_ADD_RX_DATA_FILTER RX_DATA_ADD_RX_DATA_FILTER -#define TIWLN_REMOVE_RX_DATA_FILTER RX_DATA_REMOVE_RX_DATA_FILTER -#define TIWLN_GET_RX_DATA_FILTERS_STATISTICS RX_DATA_GET_RX_DATA_FILTERS_STATISTICS -#define TIWLN_GET_RX_DATA_RATE SITE_MGR_CURRENT_RX_RATE_PARAM -#define TIWLN_REPORT_MODULE_SET REPORT_MODULE_TABLE_PARAM -#define TIWLN_REPORT_MODULE_GET REPORT_MODULE_TABLE_PARAM -#define TIWLN_REPORT_SEVERITY_SET REPORT_SEVERITY_TABLE_PARAM -#define TIWLN_REPORT_SEVERITY_GET REPORT_SEVERITY_TABLE_PARAM -#define TIWLN_DISPLAY_STATS DEBUG_ACTIVATE_FUNCTION -#define TIWLN_RATE_MNG_SET SITE_MGRT_SET_RATE_MANAGMENT -#define TIWLN_RATE_MNG_GET SITE_MGRT_GET_RATE_MANAGMENT -#define TIWLN_802_11_GET_SELECTED_BSSID_INFO SITE_MGR_GET_SELECTED_BSSID_INFO -#define TIWLN_802_11_TX_STATISTICS TX_CTRL_COUNTERS_PARAM -#define TIWLN_802_11_SET_TRAFFIC_INTENSITY_THRESHOLDS CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD -#define TIWLN_802_11_GET_TRAFFIC_INTENSITY_THRESHOLDS CTRL_DATA_TRAFFIC_INTENSITY_THRESHOLD -#define TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS CTRL_DATA_TOGGLE_TRAFFIC_INTENSITY_EVENTS -#define TIWLN_802_11_GET_PRIMARY_BSSID_INFO SITE_MGR_PRIMARY_SITE_PARAM /* not implemented in CUDK */ -#define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS RX_DATA_ENABLE_DISABLE_RX_DATA_FILTERS -#define TIWLN_ADD_RX_DATA_FILTER RX_DATA_ADD_RX_DATA_FILTER -#define TIWLN_REMOVE_RX_DATA_FILTER RX_DATA_REMOVE_RX_DATA_FILTER -#define TIWLN_GET_RX_DATA_FILTERS_STATISTICS RX_DATA_GET_RX_DATA_FILTERS_STATISTICS /* not implemented in CUDK */ -#define TIWLN_802_11_START_APP_SCAN_SET SCAN_CNCN_START_APP_SCAN -#define TIWLN_802_11_STOP_APP_SCAN_SET SCAN_CNCN_STOP_APP_SCAN -#define TIWLN_802_11_SCAN_POLICY_PARAM_SET SCAN_MNGR_SET_CONFIGURATION -#define TIWLN_802_11_SCAN_BSS_LIST_GET SCAN_MNGR_BSS_LIST_GET -#define TIWLN_802_11_SET_QOS_PARAMS QOS_MNGR_SET_OS_PARAMS -#define TIWLN_802_11_CONFIG_TX_CLASS CTRL_DATA_CLSFR_CONFIG -#define TIWLN_802_11_REMOVE_CLSFR_ENTRY CTRL_DATA_CLSFR_REMOVE_ENTRY -#define TIWLN_DCO_ITRIM_PARAMS TWD_DCO_ITRIM_PARAMS - - -/********************/ -/* Type definitions */ -/********************/ - -typedef TRates rates_t; -typedef EDraftNumber draftNumber_t; -typedef TCountry country_t; -typedef TDfsChannelRange DFS_ChannelRange_t; -typedef ESlotTime slotTime_e; -typedef TRxDataFilterRequest TIWLAN_DATA_FILTER_REQUEST; -typedef TCuCommon_RxDataFilteringStatistics TIWLAN_DATA_FILTER_STATISTICS; -typedef TScanParams scan_Params_t; -typedef TScanNormalChannelEntry scan_normalChannelEntry_t; -typedef EScanEtCondition scan_ETCondition_e; -typedef TScanSpsChannelEntry scan_SPSChannelEntry_t; -typedef EScanType scan_Type_e; -typedef ERadioBand radioBand_e; -typedef ERateMask rateMask_e; -typedef TSsid ssid_t; -typedef TScanPolicy scan_Policy_t; -typedef TScanBandPolicy scan_bandPolicy_t; -typedef TScanProbReqParams scan_probReqParams_t; -typedef TScanBasicMethodParams scan_basicMethodParams_t; -typedef TScanTidTriggeredMethodParams scan_TidTriggeredMethodParams_t; -typedef TScanSPSMethodParams scan_SPSMethodParams_t; -typedef TScanMethod scan_Method_t; -typedef TClsfrTableEntry clsfr_tableEntry_t; -typedef TIpPort IP_Port_t; - -#endif /* _CONVERT_H */ diff --git a/wl1271/platforms/os/common/inc/osApi.h b/wl1271/platforms/os/common/inc/osApi.h deleted file mode 100644 index 4787a75f..00000000 --- a/wl1271/platforms/os/common/inc/osApi.h +++ /dev/null @@ -1,703 +0,0 @@ -/* - * osApi.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/*--------------------------------------------------------------------------*/ -/* Module: OSAPI.H*/ -/**/ -/* Purpose: This module defines unified interface to the OS specific*/ -/* sources and services.*/ -/**/ -/*--------------------------------------------------------------------------*/ - -#ifndef __OS_API_H__ -#define __OS_API_H__ - -/** \file osApi.h - * \brief Operating System APIs \n - * This module defines unified interface to the OS specific sources and services - */ - -#include "tidef.h" -#include "TI_IPC_Api.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/** \struct TI_CONNECTION_STATUS - * \struct *PTI_CONNECTION_STATUS - * \brief Ti Connection Status - * - * \par Description - * - * \sa - */ -typedef struct -{ - TI_UINT32 Event; - TI_UINT8* Data; -} TI_CONNECTION_STATUS, *PTI_CONNECTION_STATUS; - -typedef struct -{ - TI_UINT8 uFormat; - TI_UINT8 uLevel; - TI_UINT8 uParamsNum; - TI_UINT8 uReserved; - TI_UINT16 uFileId; - TI_UINT16 uLineNum; -} TTraceMsg; - -#define OS_PAGE_SIZE 4096 -#define MAX_MESSAGE_SIZE 500 -#define MICROSECOND_IN_SECONDS 1000000 - -#define UINT16_MAX_VAL 0xffff -#define UINT8_MAX_VAL 0xff - -#define TRACE_FORMAT_8_BITS_PARAMS 2 -#define TRACE_FORMAT_16_BITS_PARAMS 4 -#define TRACE_FORMAT_32_BITS_PARAMS 6 - -#define TRACE_MSG_MAX_PARAMS 32 -#define TRACE_MSG_MIN_LENGTH (sizeof(TTraceMsg)) -#define TRACE_MSG_MAX_LENGTH ((TRACE_MSG_MAX_PARAMS * 4) + sizeof(TTraceMsg)) - -#define INSERT_BYTE(pBuf, dataByte) (*((TI_UINT8 *)pBuf) = (TI_UINT8 )dataByte ); pBuf++; -#define INSERT_2_BYTES(pBuf, dataBytes) (*((TI_UINT16 *)pBuf) = (TI_UINT16)dataBytes); pBuf+=2; -#define INSERT_4_BYTES(pBuf, dataBytes) (*((TI_UINT32 *)pBuf) = (TI_UINT32)dataBytes); pBuf+=4; - - -/**************************************************************************************** - START OF OS API (Common to all GWSI LIB, Driver and TI Driver) -*****************************************************************************************/ - - -/**************************************************************************************** - OS HW API NEEDED BY DRIVER -*****************************************************************************************/ - -/** \brief OS Disable IRQ - * - * \param OsContext - Handle to the OS object - * \return void - * - * \par Description - * This function disables the Interrupts - * - * \sa - */ -void os_disableIrq (TI_HANDLE OsContext); - -/** \brief OS Enable IRQ - * - * \param OsContext - Handle to the OS object - * \return void - * - * \par Description - * This function enables the Interrupts - * - * \sa - */ -void os_enableIrq (TI_HANDLE OsContext); - -/** \brief OS IRQ Serviced - * - * \param OsContext - Handle to the OS object - * \return void - * - * \par Description - * This function is used in Level IRQ only. At this point the interrupt line is not asserted anymore - * and we can inform the OS to enable IRQ again. - * - * \sa - */ -void os_InterruptServiced (TI_HANDLE OsContext); - -/**************************************************************************************** - * OS Report API * - ****************************************************************************************/ - -/** \brief OS Set Debug Mode - * - * \param enable - Indicates if debug mode should be enabled or disabled ( TI_TRUE | TI_FALSE ) - * \return void - * - * \par Description - * This function sets the Debug Mode flag to True or False - according to user's request - * - * \sa - */ -void os_setDebugMode (TI_BOOL enable); - -/** \brief OS Printf - * - * \param format - String to print (with formatted parametrs in string if needed) and parameters values - * if formatted parameters are used in string - * \return void - * - * \par Description - * This function prints formatted output using OS available printf method - * - * \sa - */ -void os_printf (const char *format ,...); - -/**************************************************************************************** - * OS Memory API * - ****************************************************************************************/ - -/** \brief OS Memory Allocation - * - * \param OsContext - Handle to the OS object - * \param Size - Size (in bytes) to be allocated - * \return Pointer to the allocated memory on success ; NULL on failure (there isn't enough memory available) - * - * \par Description - * This function allocates resident (nonpaged) system-space memory with calling specific OS allocation function. \n - * It is assumed that this function will never be called in an interrupt context since the OS allocation function - * has the potential to put the caller to sleep while waiting for memory to become available. - * - * \sa - */ -void *os_memoryAlloc (TI_HANDLE OsContext,TI_UINT32 Size); - -/** \brief OS Memory CAllocation - * - * \param OsContext - Handle to the OS object - * \param Number - Number of element to be allocated - * \param Size - Size (in bytes) of one element - * \return Pointer to the allocated memory on success ; NULL on failure (there isn't enough memory available) - * - * \par Description - * This function allocates an array in memory with elements initialized to 0. - * Allocates resident (nonpaged) system-space memory for an array with elements initialized to 0, - * with specific OS allocation function. - * It is assumed that this function will never be called in an interrupt context since the OS allocation function - * has the potential to put the caller to sleep while waiting for memory to become available. - * - * \sa - */ -void *os_memoryCAlloc (TI_HANDLE OsContext, TI_UINT32 Number, TI_UINT32 Size); - -/** \brief OS Memory Set - * - * \param OsContext - Handle to the OS object - * \param pMemPtr - Pointer to the base address of a memory block - * \param Value - Value to set to memory block - * \param Length - Length (in bytes) of memory block - * \return void - * - * \par Description - * This function fills a block of memory with a given value - * - * \sa - */ -void os_memorySet (TI_HANDLE OsContext, void *pMemPtr, TI_INT32 Value, TI_UINT32 Length); - -/** \brief OS Memory Zero - * - * \param OsContext - Handle to the OS object - * \param pMemPtr - Pointer to the base address of a memory block - * \param Length - Length (in bytes) of memory block - * \return void - * - * \par Description - * This function fills a block of memory with zeros - * - * \sa - */ -void os_memoryZero (TI_HANDLE OsContext, void *pMemPtr, TI_UINT32 Length); - -/** \brief OS Memory Copy - * - * \param OsContext - Handle to the OS object - * \param pDestination - Pointer to destination buffer - * \param pSource - Pointer to Source buffer - * \param Size - Size (in bytes) to copy - * \return void - * - * \par Description - * This function copies a specified number of bytes from one caller-supplied location (source buffer) to another (destination buffer) - * - * \sa - */ -void os_memoryCopy (TI_HANDLE OsContext, void *pDestination, void *pSource, TI_UINT32 Size); - -/** \brief OS Memory Free - * - * \param OsContext - Handle to the OS object - * \param pMemPtr - Pointer to the base address of a memory block - * \param Size - Size (in bytes) to free - * \return void - * - * \par Description - * This function releases a block of memory which was previously allocated by user - * - * \sa - */ -void os_memoryFree (TI_HANDLE OsContext, void *pMemPtr, TI_UINT32 Size); - -/** \brief OS Memory Compare - * - * \param OsContext - Handle to the OS object - * \param Buf1 - Pointer to the first buffer in comperation - * \param Buf2 - Pointer to the second buffer in comperation - * \param Count - Count (in bytes) to compare - * \return A value which indicates the relationship between the two compared buffers: - * value < 0: Buf1 less than Buf2 - * value == 0: Buf1 identical to Buf2 - * value > 0: Buf1 greater than Buf2 - * - * \par Description - * This function compares between two given buffers - * - * \sa - */ -TI_INT32 os_memoryCompare (TI_HANDLE OsContext, TI_UINT8* Buf1, TI_UINT8* Buf2, TI_INT32 Count); - -/** \brief OS Memory Allocation for HW DMA - * - * \param pOsContext - Handle to the OS object - * \param Size - Size (in bytes) to allocate - * \return Pointer to the allocated memory on success ; NULL on failure (there isn't enough memory available) - * - * \par Description - * This function allocates resident (nonpaged) system-space memory for HW DMA operations - * - * \sa - */ -void *os_memoryAlloc4HwDma (TI_HANDLE pOsContext, TI_UINT32 Size); - -/** \brief OS Memory for HW DMA Free - * - * \param pOsContext - Handle to the OS object - * \param pMem_ptr - Pointer to the base virtual address of allocated memory block - * This is the address that was returned to user when he allocated the memory for HW DMA usage - * \param Size - Size (in bytes) of the memory block to be released. This parameter must be identical to the Length - * which was given by the user when he allocated the memory block for HW DMA usage - * \return Pointer to the allocated memory on success ; NULL on failure (there isn't enough memory available) - * - * \par Description - * This function releases a block of memory previously allocated by user for HW DMA operations - * - * \sa - */ -void os_memory4HwDmaFree (TI_HANDLE pOsContext, void *pMem_ptr, TI_UINT32 Size); - -/** \brief OS Memory Copy from User - * - * \param OsContext - Handle to the OS object - * \param pDstPtr - Pointer to destination buffer - * \param pSrcPtr - Pointer to Source buffer - * \param Size - Size (in bytes) to copy - * \return TI_OK on success ; TI_NOK otherwise - * - * \par Description - * This function copies a specified number of bytes from one caller-supplied location (Source) to another (Destination) - * - * \sa - */ -int os_memoryCopyFromUser (TI_HANDLE OsContext, void *pDstPtr, void *pSrcPtr, TI_UINT32 Size); - -/** \brief OS Memory Copy To User - * - * \param OsContext - Handle to the OS object - * \param pDstPtr - Pointer to destination buffer - * \param pSrcPtr - Pointer to Source buffer - * \param Size - Size (in bytes) to copy - * \return TI_OK on success ; TI_NOK otherwise - * - * \par Description - * This function copies a specified number of bytes from one caller-supplied location (Source) to another (Destination) - * - * \sa - */ -int os_memoryCopyToUser (TI_HANDLE OsContext, void *pDstPtr, void *pSrcPtr, TI_UINT32 Size); - -/**************************************************************************************** - * OS TIMER API * - ****************************************************************************************/ -/** \brief Timer Callback Function - * - * \param Context - Handle to the OS object - * \return void - * - * \par Description - * This callback is passed by user to OS timer when created, and is called directly from OS timer context when expired. - * E.g. the user user the timer in order to operate this function after a defined time expires - * - */ -typedef void (*fTimerFunction)(TI_HANDLE Context); - -/** \brief OS Timer Create - * - * \param OsContext - Handle to the OS object - * \param pRoutine - Pointer to user's Timer Callback function - * \param hFuncHandle - Handle to user's Timer Callback function parameters - * \return Handle to timer object on success ; NULL on failure - * - * \par Description - * This function creates and initializes an OS timer object associated with a user's Timer Callback function \n - * \note 1) The user's callback is called directly from OS timer context when expired. - * \note 2) In some OSs, it may be needed to use an intermediate callback in the - * \note osapi layer (use os_timerHandlr for that). - * - * \sa - */ -TI_HANDLE os_timerCreate (TI_HANDLE OsContext, fTimerFunction pRoutine, TI_HANDLE hFuncHandle); - -/** \brief OS Timer Destroy - * - * \param OsContext - Handle to the OS object - * \param TimerHandle - Handle to timer object which user got when created the timer - * \return void - * - * \par Description - * This function destroys the OS timer object which was previously created by user - * - * \sa - */ -void os_timerDestroy (TI_HANDLE OsContext, TI_HANDLE TimerHandle); - -/** \brief OS Timer Start - * - * \param OsContext - Handle to the OS object - * \param TimerHandle - Handle to timer object which user got when created the timer - * \param DelayMs - The time in MS untill the timer is awaken - * \return void - * - * \par Description - * This function Start the OS timer object which was previously created by user - * - * \sa - */ -void os_timerStart (TI_HANDLE OsContext, TI_HANDLE TimerHandle, TI_UINT32 DelayMs); - -/** \brief OS Timer Stop - * - * \param OsContext - Handle to the OS object - * \param TimerHandle - Handle to timer object which user got when created the timer - * \return void - * - * \par Description - * This function Stops the OS timer object which was previously created by user - * - * \sa - */ -void os_timerStop (TI_HANDLE OsContext, TI_HANDLE TimerHandle); - -/** \brief OS Periodic Interrupt Timer Start - * - * \param OsContext - Handle to the OS object - * \return void - * - * \par Description - * This function starts the periodic interrupt mechanism. This function is used when PRIODIC_INTERRUPT mode is used. - * This Mode is enabled when interrupts that are usually received from the FW are masked, - * and there is need to check- in a given time periods - if handling of any FW interrupt is needed. - * - * \sa - */ -#ifdef PRIODIC_INTERRUPT -void os_periodicIntrTimerStart (TI_HANDLE OsContext); -#endif - -/** \brief OS Time Stamp Ms - * - * \param OsContext - Handle to the OS object - * \return The number of milliseconds that have elapsed since the system was booted - * - * \par Description - * This function returns the number of milliseconds that have elapsed since the system was booted. - */ -TI_UINT32 os_timeStampMs (TI_HANDLE OsContext); - -/** \brief OS Time Stamp Us - * - * \param OsContext - Handle to the OS object - * \return The number of microseconds that have elapsed since the system was booted - * - * \par Description - * This function returns the number of microseconds that have elapsed since the system was booted. \n - * Note that sometimes this function will be called with NULL(!!!) as argument! - */ -TI_UINT32 os_timeStampUs (TI_HANDLE OsContext); - -/** \brief OS Stall uSec - * - * \param OsContext - Handle to the OS object - * \param uSec - The time to delay in microseconds - * \return void - * - * \par Description - * This function makes delay in microseconds - * - * \sa - */ -void os_StalluSec (TI_HANDLE OsContext, TI_UINT32 uSec); - - -/**************************************************************************************** - * Protection services API * - ****************************************************************************************/ - -/** \brief OS Protect Create - * - * \param OsContext - Handle to the OS object - * \return Handle of the created mutex/spin lock object on Success ; NULL on Failure (not enough memory available or problems to initializing the mutex) - * - * \par Description - * This function allocates a mutex/spin lock object. - * The mutex/spinlock object which is created by this function is used for mutual-exclusion and protection of resources which are shared between - * multi-Tasks/Threads - * - * \sa - */ -TI_HANDLE os_protectCreate (TI_HANDLE OsContext); - -/** \brief OS Protect Destroy - * - * \param OsContext - Handle to the OS object - * \param ProtectContext - Handle to the mutex/spin lock object - * \return void - * - * \par Description - * This function destroys s a mutex/spin lock object which was previously created by user: - * it frees the mutex/spin lock and then frees the object's memory - * - * \sa - */ -void os_protectDestroy (TI_HANDLE OsContext, TI_HANDLE ProtectContext); - -/** \brief OS Protect Lock - * - * \param OsContext - Handle to the OS object - * \param ProtectContext - Handle to the mutex/spin lock object - * \return void - * - * \par Description - * This function locks the mutex/spin lock object. E.g. the caller acquires a mutex/spin lock and gains exclusive - * access to the shared resources, that the mutex/spin lock protects of. - * - * \sa - */ -void os_protectLock (TI_HANDLE OsContext, TI_HANDLE ProtectContext); - -/** \brief OS Protect Unlock - * - * \param OsContext - Handle to the OS object - * \param ProtectContext - Handle to the mutex/spin lock object - * \return void - * - * \par Description - * This function unlocks the mutex/spin lock object. - * - * \sa - */ -void os_protectUnlock (TI_HANDLE OsContext, TI_HANDLE ProtectContext); - -/* Wakelock functionality */ -int os_wake_lock (TI_HANDLE OsContext); -int os_wake_unlock (TI_HANDLE OsContext); -int os_wake_lock_timeout (TI_HANDLE OsContext); -int os_wake_lock_timeout_enable (TI_HANDLE OsContext); - -#define os_profile(hos,fn,par) - - -/**************************************************************************************** - START OF GWSI DRIVER API -*****************************************************************************************/ - -/** \brief OS Signaling Object Create - * - * \param OsContext - Handle to the OS object - * \return Pointer to Signal Object on Success ; NULL on Failure - * - * \par Description - * This function creates a new Signaling Object or opens an already exists Signaling Object. - * The Signaling Object created by this function is used for mutual-exclusion and protection - * of resources which are shared between multi-Tasks/Threads by using a signaling mechanism - * - * \sa - */ -void *os_SignalObjectCreate (TI_HANDLE OsContext); - -/** \brief OS Signaling Object Wait - * - * \param OsContext - Handle to the OS object - * \param ptr - Pointer to Signaling Object previously created by user - * \return TI_OK (0) on Success ; TI_NOK (1) on Failure - * - * \par Description - * This function perform waiting on Signaling Object. The coller waits until signaled or until timeout - * - * \sa - */ -int os_SignalObjectWait (TI_HANDLE OsContext, void *ptr); - -/** \brief OS Signaling Object Set - * - * \param OsContext - Handle to the OS object - * \param ptr - Pointer to Signaling Object previously created by user - * \return TI_OK (0) on Success ; TI_NOK (1) on Failure - * - * \par Description - * This function sets a Signaling Object to signaled state (e.g the siganeling object is released) - * - * \sa - */ -int os_SignalObjectSet (TI_HANDLE OsContext, void *ptr); - -/** \brief OS Signaling Object Free - * - * \param OsContext - Handle to the OS object - * \param ptr - Pointer to Signaling Object previously created by user - * \return TI_OK (0) on Success ; TI_NOK (1) on Failure - * - * \par Description - * This function frees (closes) a Signaling Object Handle - * - * \sa - */ -int os_SignalObjectFree (TI_HANDLE OsContext, void *ptr); - -/** \brief OS Schedule Request - * - * \param OsContext - Handle to the OS object - * \return TI_OK (0) on Success ; TI_NOK (1) on Failure - * - * \par Description - * This function performs scheduling (context switch) according to user request - * - * \sa - */ -int os_RequestSchedule (TI_HANDLE OsContext); - - -/**************************************************************************************** - START OF TI DRIVER API -*****************************************************************************************/ - -/** \brief OS Read Memory Register UINT32 - * - * \param OsContext - Handle to the OS object - * \param Register - Pointer to register address - * \param Data - Pointer to output read data - * \return void - * - * \par Description - * This function reads register in 32 bit length - * - * \sa - */ -void os_hwReadMemRegisterUINT32 (TI_HANDLE OsContext, TI_UINT32* Register, TI_UINT32* Data); - -/** \brief OS Write Memory Register UINT32 - * - * \param OsContext - Handle to the OS object - * \param Register - Pointer to register address - * \param Data - Data to write to register - * \return void - * - * \par Description - * This function reads register in 32 bit length - * - * \sa - */ -void os_hwWriteMemRegisterUINT32 (TI_HANDLE OsContext, TI_UINT32* Register, TI_UINT32 Data); - -/** \brief OS Receive Packet - * - * \param OsContext - Handle to the OS object - * \param pPacket - Pointer to received packet data - * \param Length - Length of received packet - * \return TI_TRUE on Success ; TI_FALSE on Failure - * - * \par Description - * This function transfers a packet from WLAN driver to OS - * - * \sa - */ -TI_BOOL os_receivePacket(TI_HANDLE OsContext, void *pRxDesc ,void *pPacket, TI_UINT16 Length); - -/** \brief OS Indicate Event - * - * \param OsContext - Handle to the OS object - * \param pData - Pointer to event data - * \return TI_OK (0) on Success ; - * - * \par Description - * This function indicate the OS about different connection driver's events, - * The function performs the rewuired operations for the event - in the OS side - * - * \sa - */ -TI_INT32 os_IndicateEvent (TI_HANDLE OsContext, IPC_EV_DATA *pData); - -/** \brief OS Send Trace Message to Logger - * - * \param OsContext - The OS handle - * \param uLevel - Severity level of the trace message - * \param uFileId - Source file ID of the trace message - * \param uLineNum - Line number of the trace message - * \param uParamsNum - Number of parameters in the trace message - * \param ... - The trace message parameters - * \return void - * - * \par Description - * This function sends trace message to logger - * - * \sa - */ -void os_Trace (TI_HANDLE OsContext, TI_UINT32 uLevel, TI_UINT32 uFileId, TI_UINT32 uLineNum, TI_UINT32 uParamsNum, ...); - -/** - * \fn os_SetDrvThreadPriority - * \brief Called upon init to set WLAN driver thread priority. - * - * \param OsContext - The OS handle - * \param uWlanDrvThreadPriority - The WLAN driver thread priority - * \return - */ -void os_SetDrvThreadPriority (TI_HANDLE OsContext, TI_UINT32 uWlanDrvThreadPriority); - - -#ifdef __cplusplus -} -#endif - -#endif /* __OS_API_H__ */ diff --git a/wl1271/platforms/os/common/inc/osDebug.h b/wl1271/platforms/os/common/inc/osDebug.h deleted file mode 100644 index 19275d77..00000000 --- a/wl1271/platforms/os/common/inc/osDebug.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * osDebug.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#ifndef __OSDEBUG_H_ -#define __OSDEBUG_H_ - -#ifdef TI_DBG -#ifndef _WINDOWS -#include "windows_types.h" -#endif /*_WINDOWS*/ - - -#define IF_TIDEBUG(f) if (!((TiDebugFlag & (f))^(f))) -extern unsigned long TiDebugFlag; - -#define PRINT(F, A) IF_TIDEBUG( F ) { os_printf(A); } -#define PRINTF(F, A) IF_TIDEBUG( F ) { os_printf A; } - -#define DBG_INIT 0x0001 -#define DBG_REGISTRY 0x0002 -#define DBG_NDIS_CALLS 0x0004 -#define DBG_NDIS_OIDS 0x0008 -#define DBG_PCI_RES 0x0010 -#define DBG_INTERRUPT 0x0020 -#define DBG_IOCTL 0x0040 -#define DBG_RECV 0x0080 -#define DBG_SEND 0x0100 - -#define DBG_SEV_INFO 0x0001 -#define DBG_SEV_LOUD 0x0002 -#define DBG_SEV_VERY_LOUD 0x0004 -#define DBG_SEV_WARNING 0x0008 -#define DBG_SEV_ERROR 0x0010 -#define DBG_SEV_FATAL_ERROR 0x0020 - - -#define DBG_INIT_INFO ((DBG_INIT << 16) | DBG_SEV_INFO) -#define DBG_INIT_LOUD ((DBG_INIT << 16) | DBG_SEV_LOUD) -#define DBG_INIT_VERY_LOUD ((DBG_INIT << 16) | DBG_SEV_VERY_LOUD) -#define DBG_INIT_WARNING ((DBG_INIT << 16) | DBG_SEV_WARNING) -#define DBG_INIT_ERROR ((DBG_INIT << 16) | DBG_SEV_ERROR) -#define DBG_INIT_FATAL_ERROR ((DBG_INIT << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_REGISTRY_INFO ((DBG_REGISTRY << 16) | DBG_SEV_INFO) -#define DBG_REGISTRY_LOUD ((DBG_REGISTRY << 16) | DBG_SEV_LOUD) -#define DBG_REGISTRY_VERY_LOUD ((DBG_REGISTRY << 16) | DBG_SEV_VERY_LOUD) -#define DBG_REGISTRY_WARNING ((DBG_REGISTRY << 16) | DBG_SEV_WARNING) -#define DBG_REGISTRY_ERROR ((DBG_REGISTRY << 16) | DBG_SEV_ERROR) -#define DBG_REGISTRY_FATAL_ERROR ((DBG_REGISTRY << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_NDIS_CALLS_INFO ((DBG_NDIS_CALLS << 16) | DBG_SEV_INFO) -#define DBG_NDIS_CALLS_LOUD ((DBG_NDIS_CALLS << 16) | DBG_SEV_LOUD) -#define DBG_NDIS_CALLS_VERY_LOUD ((DBG_NDIS_CALLS << 16) | DBG_SEV_VERY_LOUD) -#define DBG_NDIS_CALLS_WARNING ((DBG_NDIS_CALLS << 16) | DBG_SEV_WARNING) -#define DBG_NDIS_CALLS_ERROR ((DBG_NDIS_CALLS << 16) | DBG_SEV_ERROR) -#define DBG_NDIS_CALLS_FATAL_ERROR ((DBG_NDIS_CALLS << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_NDIS_OIDS_INFO ((DBG_NDIS_OIDS << 16) | DBG_SEV_INFO) -#define DBG_NDIS_OIDS_LOUD ((DBG_NDIS_OIDS << 16) | DBG_SEV_LOUD) -#define DBG_NDIS_OIDS_VERY_LOUD ((DBG_NDIS_OIDS << 16) | DBG_SEV_VERY_LOUD) -#define DBG_NDIS_OIDS_WARNING ((DBG_NDIS_OIDS << 16) | DBG_SEV_WARNING) -#define DBG_NDIS_OIDS_ERROR ((DBG_NDIS_OIDS << 16) | DBG_SEV_ERROR) -#define DBG_NDIS_OIDS_FATAL_ERROR ((DBG_NDIS_OIDS << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_PCI_RES_INFO ((DBG_PCI_RES << 16) | DBG_SEV_INFO) -#define DBG_PCI_RES_LOUD ((DBG_PCI_RES << 16) | DBG_SEV_LOUD) -#define DBG_PCI_RES_VERY_LOUD ((DBG_PCI_RES << 16) | DBG_SEV_VERY_LOUD) -#define DBG_PCI_RES_WARNING ((DBG_PCI_RES << 16) | DBG_SEV_WARNING) -#define DBG_PCI_RES_ERROR ((DBG_PCI_RES << 16) | DBG_SEV_ERROR) -#define DBG_PCI_RES_FATAL_ERROR ((DBG_PCI_RES << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_INTERRUPT_INFO ((DBG_INTERRUPT << 16) | DBG_SEV_INFO) -#define DBG_INTERRUPT_LOUD ((DBG_INTERRUPT << 16) | DBG_SEV_LOUD) -#define DBG_INTERRUPT_VERY_LOUD ((DBG_INTERRUPT << 16) | DBG_SEV_VERY_LOUD) -#define DBG_INTERRUPT_WARNING ((DBG_INTERRUPT << 16) | DBG_SEV_WARNING) -#define DBG_INTERRUPT_ERROR ((DBG_INTERRUPT << 16) | DBG_SEV_ERROR) -#define DBG_INTERRUPT_FATAL_ERROR ((DBG_INTERRUPT << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_IOCTL_INFO ((DBG_IOCTL << 16) | DBG_SEV_INFO) -#define DBG_IOCTL_LOUD ((DBG_IOCTL << 16) | DBG_SEV_LOUD) -#define DBG_IOCTL_VERY_LOUD ((DBG_IOCTL << 16) | DBG_SEV_VERY_LOUD) -#define DBG_IOCTL_WARNING ((DBG_IOCTL << 16) | DBG_SEV_WARNING) -#define DBG_IOCTL_ERROR ((DBG_IOCTL << 16) | DBG_SEV_ERROR) -#define DBG_IOCTL_FATAL_ERROR ((DBG_IOCTL << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_RECV_INFO ((DBG_RECV << 16) | DBG_SEV_INFO) -#define DBG_RECV_LOUD ((DBG_RECV << 16) | DBG_SEV_LOUD) -#define DBG_RECV_VERY_LOUD ((DBG_RECV << 16) | DBG_SEV_VERY_LOUD) -#define DBG_RECV_WARNING ((DBG_RECV << 16) | DBG_SEV_WARNING) -#define DBG_RECV_ERROR ((DBG_RECV << 16) | DBG_SEV_ERROR) -#define DBG_RECV_FATAL_ERROR ((DBG_RECV << 16) | DBG_SEV_FATAL_ERROR) - -#define DBG_SEND_INFO ((DBG_SEND << 16) | DBG_SEV_INFO) -#define DBG_SEND_LOUD ((DBG_SEND << 16) | DBG_SEV_LOUD) -#define DBG_SEND_VERY_LOUD ((DBG_SEND << 16) | DBG_SEV_VERY_LOUD) -#define DBG_SEND_WARNING ((DBG_SEND << 16) | DBG_SEV_WARNING) -#define DBG_SEND_ERROR ((DBG_SEND << 16) | DBG_SEV_ERROR) -#define DBG_SEND_FATAL_ERROR ((DBG_SEND << 16) | DBG_SEV_FATAL_ERROR) - - -#else - -#define PRINT(F, A) -#define PRINTF(F, A) - -#endif - - -#endif /* __OSDEBUG_H_*/ - diff --git a/wl1271/platforms/os/common/inc/osRgstry.h b/wl1271/platforms/os/common/inc/osRgstry.h deleted file mode 100644 index 67382b48..00000000 --- a/wl1271/platforms/os/common/inc/osRgstry.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * osRgstry.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#ifndef __OSRGSTRY_H_ -#define __OSRGSTRY_H_ - -typedef struct { - - TI_UINT8* ParameterName; - NDIS_STRING NdisParameterName; - - NDIS_PARAMETER_TYPE ParameterType; - - TI_BOOL RangeCheck; - - TI_UINT32 DefaultValue; - TI_UINT32 MinValue; - TI_UINT32 MaxValue; - - TI_UINT32 FieldOffset; - TI_UINT32 FieldSize; - -} REGISTRY_DATA, *PREGISTRY_DATA; - - -void -regFillInitTable( - TWlanDrvIfObjPtr pAdapter, - void* pInitTable - ); - -#ifdef _WINDOWS -void regReadParameters (TWlanDrvIfObjPtr pAdapter); -#endif - -#ifdef TI_DBG - -void -regReadLastDbgState( - TWlanDrvIfObjPtr pAdapter - ); - - -#endif - -#endif /* __OSRGSTRY_H_*/ - diff --git a/wl1271/platforms/os/common/inc/spi_api.h b/wl1271/platforms/os/common/inc/spi_api.h deleted file mode 100644 index 48512d11..00000000 --- a/wl1271/platforms/os/common/inc/spi_api.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * spi_api.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/* - * inc/spi_api.h - * - * Header for SPI API test interface - * - */ - -#ifndef SPI_API_H -#define SPI_API_H - - -typedef void (*request_callback_t) (void *data, int status); - - -typedef enum -{ - SPI_OK = 0, - SPI_TXN_COMPLETE = 0, - SPI_TXN_PENDING = 1, - SPI_ERR_UNKNOWN = -1, - SPI_ERR_BUS_BUSY = -2, - SPI_ERR_QUEUE_FULL = -3, - SPI_ERR_ALLOC_MEM = -4, - SPI_ERR_ASYNC_TIMEOUT = -5, - SPI_ERR_WRONG_LENGTH = -6, - -} SPI_Status_e; - - -void* SPI_Open (void* hOS); -int SPI_Close (void* hSPI); -int SPI_Write (void* hSPI, TI_UINT8 *data, TI_UINT32 length, request_callback_t fCb, void *pCb, int more); -int SPI_Read (void* hSPI, TI_UINT8 *data, TI_UINT32 length, request_callback_t fCb, void *pCb, int more); -int SPI_WriteRead (void* hSPI, TI_UINT8 *data, TI_UINT32 length, TI_UINT8 *rdata, TI_UINT32 rlength, request_callback_t fCb, void* pCb, int more); -int SPI_WriteSync (void* hSPI, TI_UINT8 *data, TI_UINT32 length, int more); -int SPI_ReadSync (void* hSPI, TI_UINT8 *data, TI_UINT32 length); - - -#endif /* SPI_API_H */ - diff --git a/wl1271/platforms/os/common/inc/tracebuf_api.h b/wl1271/platforms/os/common/inc/tracebuf_api.h deleted file mode 100644 index e19d8261..00000000 --- a/wl1271/platforms/os/common/inc/tracebuf_api.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * tracebuf_api.h - * - * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name Texas Instruments nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Benchmark tracing utility - */ - -#ifndef TB_TRACE_API_H - -#define TB_TRACE_API_H - -#ifdef TI_TRACE_BUF - -#define TB_NUM_ENTRIES 256 -#define MAX_TB_MSG 128 - -#define TB_OPTION_NONE 0x00000000 -#define TB_OPTION_AUTOPRINT 0x00000001 -#define TB_OPTION_PRINTONCE 0x00000002 -#define TB_OPTION_STOP 0x80000000 - -/* Initialization */ -int tb_init(unsigned long options); -int tb_sprintf(const char *format ,...); -int tb_trace(int loc, unsigned long p1, unsigned long p2); -void tb_destroy(void); -void tb_scan(void); -void tb_dump(void); -void tb_printf(void); -void tb_set_option(unsigned long option); -void tb_reset_option(unsigned long option); - -#define tb_min(x,y) (((x)<(y)) ? (x) : (y)) - -#else /* #ifdef TI_TRACE_BUF */ - -#define tb_init(options) -#define tb_sprintf(format ,...) -#define tb_trace(loc, p1, p2) -#define tb_destroy() -#define tb_scan() -#define tb_dump() -#define tb_printf() -#define tb_set_option(option) -#define tb_reset_option(option) - -#endif /* #ifdef TI_TRACE_BUF */ - -#endif |