initial commit
This commit is contained in:
Vendored
+112
@@ -0,0 +1,112 @@
|
||||
/*************************************************************************************************/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief Stack configuration.
|
||||
*
|
||||
* Copyright (c) 2009-2018 Arm Ltd.
|
||||
*
|
||||
* Copyright (c) 2019 Packetcraft, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/*************************************************************************************************/
|
||||
|
||||
#include "wsf_types.h"
|
||||
#include "cfg_stack.h"
|
||||
#include "hci_api.h"
|
||||
#include "dm_api.h"
|
||||
#include "l2c_api.h"
|
||||
#include "att_api.h"
|
||||
#include "smp_api.h"
|
||||
|
||||
/**************************************************************************************************
|
||||
HCI
|
||||
**************************************************************************************************/
|
||||
|
||||
/**************************************************************************************************
|
||||
DM
|
||||
**************************************************************************************************/
|
||||
|
||||
/* Configuration structure */
|
||||
const dmCfg_t dmCfg =
|
||||
{
|
||||
0
|
||||
};
|
||||
|
||||
/* Configuration pointer */
|
||||
dmCfg_t *pDmCfg = (dmCfg_t *) &dmCfg;
|
||||
|
||||
/**************************************************************************************************
|
||||
L2C
|
||||
**************************************************************************************************/
|
||||
|
||||
/* Configuration structure */
|
||||
const l2cCfg_t l2cCfg =
|
||||
{
|
||||
30 /* Request timeout in seconds */
|
||||
};
|
||||
|
||||
/* Configuration pointer */
|
||||
l2cCfg_t *pL2cCfg = (l2cCfg_t *) &l2cCfg;
|
||||
|
||||
/**************************************************************************************************
|
||||
ATT
|
||||
**************************************************************************************************/
|
||||
|
||||
/* Configuration structure */
|
||||
const attCfg_t attCfg =
|
||||
{
|
||||
15, /* ATT server service discovery connection idle timeout in seconds */
|
||||
480,//LL_MAX_DATA_LEN_ABS_MAX - 4, /* desired ATT MTU */
|
||||
ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */
|
||||
4 /* number of queued prepare writes supported by server */
|
||||
};
|
||||
|
||||
/* Configuration pointer */
|
||||
attCfg_t *pAttCfg = (attCfg_t *) &attCfg;
|
||||
|
||||
/**************************************************************************************************
|
||||
SMP
|
||||
**************************************************************************************************/
|
||||
|
||||
/* Configuration structure */
|
||||
const smpCfg_t smpCfg =
|
||||
{
|
||||
500, /* 'Repeated attempts' timeout in msec */
|
||||
SMP_IO_NO_IN_NO_OUT, /* I/O Capability */
|
||||
7, /* Minimum encryption key length */
|
||||
16, /* Maximum encryption key length */
|
||||
1, /* Attempts to trigger 'repeated attempts' timeout */
|
||||
0, /* Device authentication requirements */
|
||||
64000, /* Maximum repeated attempts timeout in msec */
|
||||
64000, /* Time msec before attemptExp decreases */
|
||||
2 /* Repeated attempts multiplier exponent */
|
||||
};
|
||||
|
||||
/* Configuration pointer */
|
||||
smpCfg_t *pSmpCfg = (smpCfg_t *) &smpCfg;
|
||||
|
||||
/*************************************************************************************************/
|
||||
/*!
|
||||
* \brief Get Stack version number.
|
||||
*
|
||||
* \param pVersion output parameter for version number.
|
||||
*
|
||||
* \return None.
|
||||
*/
|
||||
/*************************************************************************************************/
|
||||
void StackGetVersionNumber(const char **pVersion)
|
||||
{
|
||||
*pVersion = STACK_VERSION;
|
||||
}
|
||||
Vendored
+170
@@ -0,0 +1,170 @@
|
||||
/*************************************************************************************************/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief Stack configuration.
|
||||
*
|
||||
* Copyright (c) 2009-2018 Arm Ltd.
|
||||
*
|
||||
* Copyright (c) 2019 Packetcraft, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/*************************************************************************************************/
|
||||
#ifndef CFG_STACK_H
|
||||
#define CFG_STACK_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*! \addtogroup STACK_INIT
|
||||
* \{ */
|
||||
|
||||
/**************************************************************************************************
|
||||
STACK VERSION
|
||||
**************************************************************************************************/
|
||||
|
||||
/*! \brief Stack release version label */
|
||||
#define STACK_VERSION ((const char *)"r19.02\n")
|
||||
/*! \brief Stack release version number */
|
||||
#define STACK_VER_NUM 0x1302 /* Default value. Auto-generated by builder. */
|
||||
|
||||
/**************************************************************************************************
|
||||
HCI
|
||||
**************************************************************************************************/
|
||||
|
||||
/** \name HCI Vendor Specific targets
|
||||
*
|
||||
*/
|
||||
/**@{*/
|
||||
#define HCI_VS_GENERIC 0
|
||||
#define HCI_VS_EMM 1
|
||||
|
||||
/*! \brief Vendor specific target configuration */
|
||||
#ifndef HCI_VS_TARGET
|
||||
#define HCI_VS_TARGET HCI_VS_GENERIC
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/** \name HCI Tx Data Tailroom
|
||||
* Extra byte allocation required for LL operations (i.e. MIC) in single-chip implementation
|
||||
*/
|
||||
/**@{*/
|
||||
#ifndef HCI_TX_DATA_TAILROOM
|
||||
/*! \brief Tx data tailroom. */
|
||||
#define HCI_TX_DATA_TAILROOM 0
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/**************************************************************************************************
|
||||
DM
|
||||
**************************************************************************************************/
|
||||
|
||||
/** \name DM Configuration
|
||||
* DM build-time configuration parameters
|
||||
*/
|
||||
/**@{*/
|
||||
/*! \brief Maximum number of connections */
|
||||
#ifndef DM_CONN_MAX
|
||||
#define DM_CONN_MAX 3
|
||||
#endif
|
||||
|
||||
/*! \brief Maximum number of periodic advertising synchronizations */
|
||||
#ifndef DM_SYNC_MAX
|
||||
#define DM_SYNC_MAX 1
|
||||
#endif
|
||||
|
||||
/*! \brief Number of supported advertising sets: must be set to 1 for legacy advertising */
|
||||
#ifndef DM_NUM_ADV_SETS
|
||||
#define DM_NUM_ADV_SETS 1
|
||||
#endif
|
||||
|
||||
/*! \brief Number of scanner and initiator PHYs (LE 1M, LE 2M and LE Coded): must be set to 1 for
|
||||
legacy scanner and initiator */
|
||||
#ifndef DM_NUM_PHYS
|
||||
#define DM_NUM_PHYS 1
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/**************************************************************************************************
|
||||
L2C
|
||||
**************************************************************************************************/
|
||||
|
||||
/** \name L2CAP Configuration
|
||||
* L2CAP build-time configuration parameters
|
||||
*/
|
||||
/**@{*/
|
||||
/*! \brief Maximum number of connection oriented channels */
|
||||
#ifndef L2C_COC_CHAN_MAX
|
||||
#define L2C_COC_CHAN_MAX 8
|
||||
#endif
|
||||
|
||||
/*! \brief Maximum number of connection oriented channel registered clients */
|
||||
#ifndef L2C_COC_REG_MAX
|
||||
#define L2C_COC_REG_MAX 4
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/**************************************************************************************************
|
||||
ATT
|
||||
**************************************************************************************************/
|
||||
|
||||
/** \name ATT Configuration
|
||||
* ATT build-time configuration parameters
|
||||
*/
|
||||
/**@{*/
|
||||
/*! \brief Maximum number of simultaneous ATT write commands */
|
||||
#ifndef ATT_NUM_SIMUL_WRITE_CMD
|
||||
#define ATT_NUM_SIMUL_WRITE_CMD 1
|
||||
#endif
|
||||
|
||||
/*! \brief Maximum number of simultaneous ATT notifications */
|
||||
#ifndef ATT_NUM_SIMUL_NTF
|
||||
#define ATT_NUM_SIMUL_NTF 1
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/**************************************************************************************************
|
||||
SMP
|
||||
**************************************************************************************************/
|
||||
|
||||
/** \name SMP Configuration
|
||||
* SMP build-time configuration parameters
|
||||
*/
|
||||
/**@{*/
|
||||
/*! Max number of devices in the database */
|
||||
#ifndef SMP_DB_MAX_DEVICES
|
||||
#define SMP_DB_MAX_DEVICES 3
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/*************************************************************************************************/
|
||||
/*!
|
||||
* \brief Get Stack version number.
|
||||
*
|
||||
* \param pVersion output parameter for version number.
|
||||
*
|
||||
* \return None.
|
||||
*/
|
||||
/*************************************************************************************************/
|
||||
void StackGetVersionNumber(const char **pVersion);
|
||||
|
||||
/*! \} */ /* STACK_INIT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* CFG_STACK_H */
|
||||
Reference in New Issue
Block a user