[bsp][ifx] add bt support (#8028)

This commit is contained in:
guo 2023-09-18 12:06:51 +08:00 committed by GitHub
parent b0deb61bc4
commit 23794d2cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 823 additions and 10 deletions

View File

@ -114,7 +114,7 @@ if GetDepend('BSP_USING_RTC'):
src += ['mtb-hal-cat1/source/cyhal_rtc.c']
src += ['mtb-pdl-cat1/drivers/source/cy_rtc.c']
if GetDepend('BSP_USING_ON_CHIP_FLASH'):
if GetDepend('BSP_USING_ON_CHIP_FLASH') or GetDepend('BSP_USING_CYW43012_BT') :
src += ['mtb-hal-cat1/source/cyhal_flash.c']
src += ['mtb-pdl-cat1/drivers/source/cy_flash.c']

View File

@ -423,6 +423,10 @@ menu "Board extended module Drivers"
bool "Enable cyw43012 wifi"
select PKG_USING_WLAN_CYW43012
default n
config BSP_USING_CYW43012_BT
bool "Enable cyw43012 Bluetooth"
select PKG_USING_BT_CYW43012
default n
endmenu
endmenu

View File

@ -46,6 +46,48 @@ if GetDepend(['BSP_USING_CYW43012_WIFI']):
"CY_RTOS_AWARE",
"CY_SUPPORTS_DEVICE_VALIDATION",
]
if GetDepend(['BSP_USING_CYW43012_BT']):
CPPDEFINES += [
"COMPONENT_43012",
"COMPONENT_APP_CY8CKIT_062S2_43012",
"COMPONENT_AW_AM497",
"COMPONENT_CAT1",
"COMPONENT_CAT1A",
"COMPONENT_CM0P_SLEEP",
"COMPONENT_CM4",
"COMPONENT_CM4_0",
"COMPONENT_Debug",
"COMPONENT_FREERTOS",
"COMPONENT_GCC_ARM",
"COMPONENT_HCI_UART",
"COMPONENT_MW_ABSTRACTION_RTOS",
"COMPONENT_MW_BTSTACK",
"COMPONENT_MW_BTSTACK_INTEGRATION",
"COMPONENT_MW_CLIB_SUPPORT",
"COMPONENT_MW_CMSIS",
"COMPONENT_MW_CORE_LIB",
"COMPONENT_MW_CORE_MAKE",
"COMPONENT_MW_FREERTOS",
"COMPONENT_MW_KV_STORE",
"COMPONENT_MW_MTB_HAL_CAT1",
"COMPONENT_MW_MTB_PDL_CAT1",
"COMPONENT_MW_RECIPE_MAKE_CAT1A",
"COMPONENT_MW_RETARGET_IO",
"COMPONENT_MW_SERIAL_FLASH",
"COMPONENT_PSOC6_02",
"COMPONENT_WICED_BLE",
"COMPONENT_WIFI_INTERFACE_SDIO",
"CORE_NAME_CM4_0=1",
"CY8C624ALQI_S2D42",
"CY_APPNAME_mtb_example_btstack_freertos_hello_sensor",
"CY_RETARGET_IO_CONVERT_LF_TO_CRLF",
"CY_RTOS_AWARE",
"CY_SUPPORTS_DEVICE_VALIDATION",
"CY_TARGET_BOARD=APP_CY8CKIT_062S2_43012",
"CY_USING_HAL",
"TARGET_APP_CY8CKIT_062S2_43012",
"USE_INTERNAL_FLASH"
]
group = DefineGroup('Drivers', src, depend=[''], CPPPATH=path, CPPDEFINES=CPPDEFINES)
Return('group')

View File

@ -16,7 +16,13 @@ elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src += Glob(cwd + '/TARGET_RTT-062S2/config/GeneratedSource/*.c')
CPPPATH = [ cwd + '/TARGET_RTT-062S2',
cwd + '/TARGET_RTT-062S2/config/GeneratedSource']
cwd + '/TARGET_RTT-062S2/config/GeneratedSource',
cwd + '/TARGET_RTT-062S2/config',
cwd + '/TARGET_RTT-062S2/bluetooth'
]
if GetDepend(['BSP_USING_CYW43012_BT']):
src += Glob(cwd + '/TARGET_RTT-062S2/bluetooth/*.c')
if rtconfig.PLATFORM in ['gcc']:
src += [cwd + '/TARGET_RTT-062S2/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S']
elif rtconfig.PLATFORM in ['armclang']:

View File

@ -0,0 +1,254 @@
/***************************************************************************//**
* File Name: cycfg_bt_settings.c
*
* Description:
* Runtime Bluetooth stack configuration parameters.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
********************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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 "cycfg_bt_settings.h"
#include "cycfg_gap.h"
#include "wiced_bt_dev.h"
#include "wiced_bt_gatt.h"
#include "wiced_bt_cfg.h"
#if !defined (WICED_BTSTACK_VERSION_MAJOR)
#define WICED_BTSTACK_VERSION_MAJOR (2)
#endif
/*****************************************************************************
* wiced_bt core stack configuration
****************************************************************************/
#if (WICED_BTSTACK_VERSION_MAJOR >= 3)
/* LE scan settings */
const wiced_bt_cfg_ble_scan_settings_t cy_bt_cfg_scan_settings =
{
.scan_mode = CY_BT_SCAN_MODE, /* LE scan mode (BTM_BLE_SCAN_MODE_PASSIVE, BTM_BLE_SCAN_MODE_ACTIVE, or BTM_BLE_SCAN_MODE_NONE) */
/* Advertisement scan configuration */
.high_duty_scan_interval = CY_BT_HIGH_DUTY_SCAN_INTERVAL, /* High duty scan interval (in slots (1 slot = 0.625 ms)) */
.high_duty_scan_window = CY_BT_HIGH_DUTY_SCAN_WINDOW, /* High duty scan window (in slots (1 slot = 0.625 ms)) */
.high_duty_scan_duration = CY_BT_HIGH_DUTY_SCAN_DURATION, /* High duty scan duration in seconds (0 for infinite) */
.low_duty_scan_interval = CY_BT_LOW_DUTY_SCAN_INTERVAL, /* Low duty scan interval (in slots (1 slot = 0.625 ms)) */
.low_duty_scan_window = CY_BT_LOW_DUTY_SCAN_WINDOW, /* Low duty scan window (in slots (1 slot = 0.625 ms)) */
.low_duty_scan_duration = CY_BT_LOW_DUTY_SCAN_DURATION, /* Low duty scan duration in seconds (0 for infinite) */
/* Connection scan configuration */
.high_duty_conn_scan_interval = CY_BT_HIGH_DUTY_CONN_SCAN_INTERVAL, /* High duty cycle connection scan interval (in slots (1 slot = 0.625 ms)) */
.high_duty_conn_scan_window = CY_BT_HIGH_DUTY_CONN_SCAN_WINDOW, /* High duty cycle connection scan window (in slots (1 slot = 0.625 ms)) */
.high_duty_conn_duration = CY_BT_HIGH_DUTY_CONN_SCAN_DURATION, /* High duty cycle connection duration in seconds (0 for infinite) */
.low_duty_conn_scan_interval = CY_BT_LOW_DUTY_CONN_SCAN_INTERVAL, /* Low duty cycle connection scan interval (in slots (1 slot = 0.625 ms)) */
.low_duty_conn_scan_window = CY_BT_LOW_DUTY_CONN_SCAN_WINDOW, /* Low duty cycle connection scan window (in slots (1 slot = 0.625 ms)) */
.low_duty_conn_duration = CY_BT_LOW_DUTY_CONN_SCAN_DURATION, /* Low duty cycle connection duration in seconds (0 for infinite) */
/* Connection configuration */
.conn_min_interval = CY_BT_CONN_MIN_INTERVAL, /* Minimum connection interval (in slots (1 slot = 1.25 ms)) */
.conn_max_interval = CY_BT_CONN_MAX_INTERVAL, /* Maximum connection interval (in slots (1 slot = 1.25 ms)) */
.conn_latency = CY_BT_CONN_LATENCY, /* Connection latency */
.conn_supervision_timeout = CY_BT_CONN_SUPERVISION_TIMEOUT, /* Connection link supervision timeout (in 10 ms) */
};
/* LE advertisement settings */
const wiced_bt_cfg_ble_advert_settings_t cy_bt_cfg_adv_settings =
{
.channel_map = CY_BT_CHANNEL_MAP, /* Advertising channel map (mask of BTM_BLE_ADVERT_CHNL_37, BTM_BLE_ADVERT_CHNL_38, BTM_BLE_ADVERT_CHNL_39) */
.high_duty_min_interval = CY_BT_HIGH_DUTY_ADV_MIN_INTERVAL, /* High duty undirected connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_max_interval = CY_BT_HIGH_DUTY_ADV_MAX_INTERVAL, /* High duty undirected connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_duration = CY_BT_HIGH_DUTY_ADV_DURATION, /* High duty undirected connectable advertising duration in seconds (0 for infinite) */
.low_duty_min_interval = CY_BT_LOW_DUTY_ADV_MIN_INTERVAL, /* Low duty undirected connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_max_interval = CY_BT_LOW_DUTY_ADV_MAX_INTERVAL, /* Low duty undirected connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_duration = CY_BT_LOW_DUTY_ADV_DURATION, /* Low duty undirected connectable advertising duration in seconds (0 for infinite) */
.high_duty_directed_min_interval = CY_BT_HIGH_DUTY_DIRECTED_ADV_MIN_INTERVAL, /* High duty directed connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_directed_max_interval = CY_BT_HIGH_DUTY_DIRECTED_ADV_MAX_INTERVAL, /* High duty directed connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_min_interval = CY_BT_LOW_DUTY_DIRECTED_ADV_MIN_INTERVAL, /* Low duty directed connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_max_interval = CY_BT_LOW_DUTY_DIRECTED_ADV_MAX_INTERVAL, /* Low duty directed connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_duration = CY_BT_LOW_DUTY_DIRECTED_ADV_DURATION, /* Low duty directed connectable advertising duration in seconds (0 for infinite) */
.high_duty_nonconn_min_interval = CY_BT_HIGH_DUTY_NONCONN_ADV_MIN_INTERVAL, /* High duty non-connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_nonconn_max_interval = CY_BT_HIGH_DUTY_NONCONN_ADV_MAX_INTERVAL, /* High duty non-connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_nonconn_duration = CY_BT_HIGH_DUTY_NONCONN_ADV_DURATION, /* High duty non-connectable advertising duration in seconds (0 for infinite) */
.low_duty_nonconn_min_interval = CY_BT_LOW_DUTY_NONCONN_ADV_MIN_INTERVAL, /* Low duty non-connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_nonconn_max_interval = CY_BT_LOW_DUTY_NONCONN_ADV_MAX_INTERVAL, /* Low duty non-connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_nonconn_duration = CY_BT_LOW_DUTY_NONCONN_ADV_DURATION /* Low duty non-connectable advertising duration in seconds (0 for infinite) */
};
/* LE configuration settings */
const wiced_bt_cfg_ble_t cy_bt_cfg_ble =
{
.ble_max_simultaneous_links = (CY_BT_CLIENT_MAX_LINKS + CY_BT_SERVER_MAX_LINKS), /* Max number for simultaneous connections for a layer, profile, protocol */
.ble_max_rx_pdu_size = CY_BT_RX_PDU_SIZE, /* Maximum size allowed for any received L2CAP PDU
* Minimum value - 65 (to support SM)
* Maximum GATT MTU over legacy bearers shall be set to <= this value
* Maximum MPS for EATT channels shall be set to <= this value */
.appearance = CY_BT_APPEARANCE, /* GATT appearance (see gatt_appearance_e) */
.rpa_refresh_timeout = CY_BT_RPA_TIMEOUT, /* Interval of random address refreshing - secs */
.host_addr_resolution_db_size = 5, /* LE Address Resolution DB settings - effective only for pre 4.2 controller */
.p_ble_scan_cfg = &cy_bt_cfg_scan_settings, /* LE scan settings */
.p_ble_advert_cfg = &cy_bt_cfg_adv_settings, /* LE advertisement settings */
.default_ble_power_level = CY_BT_TX_POWER, /* Default LE power level, Refer lm_TxPwrTable table for the power range */
};
/* GATT settings */
const wiced_bt_cfg_gatt_t cy_bt_cfg_gatt =
{
.max_db_service_modules = 0, /* Maximum number of service modules in the DB */
.max_eatt_bearers = 0, /* Maximum number of allowed gatt bearers */
};
/* Application-managed L2CAP protocol configuration */
const wiced_bt_cfg_l2cap_application_t cy_bt_cfg_l2cap =
{
.max_app_l2cap_psms = CY_BT_L2CAP_MAX_LE_PSM, /* Maximum number of application-managed PSMs */
.max_app_l2cap_channels = CY_BT_L2CAP_MAX_LE_CHANNELS, /* Maximum number of application-managed channels */
.max_app_l2cap_le_fixed_channels = CY_BT_L2CAP_MAX_LE_FIXED_CHANNELS, /* Maximum number of application-managed fixed channels supported */
.max_app_l2cap_br_edr_ertm_chnls = CY_BT_L2CAP_MAX_BR_ERTM_CHANNELS, /* Maximum application ERTM channels, BR/EDR only */
.max_app_l2cap_br_edr_ertm_tx_win = CY_BT_L2CAP_MAX_BR_ERTM_TX_WIN, /* Maximum application ERTM TX Window, BR/EDR only */
};
/* Bluetooth stack configuration */
const wiced_bt_cfg_settings_t wiced_bt_cfg_settings =
{
.device_name = (uint8_t*)app_gap_device_name, /* Local device name (NULL terminated) */
.security_required = CY_BT_SECURITY_LEVEL, /* BTM_SEC_BEST_EFFORT is recommended choice for most applications,
* to connect to the widest range of devices. Allows stack to choose
* the highest level of security possible between the two devices */
.p_ble_cfg = &cy_bt_cfg_ble, /* LE related configuration */
.p_gatt_cfg = &cy_bt_cfg_gatt, /* GATT settings */
.p_l2cap_app_cfg = &cy_bt_cfg_l2cap, /* Application-managed L2CAP protocol configuration */
};
#else
/* Bluetooth stack configuration */
const wiced_bt_cfg_settings_t wiced_bt_cfg_settings =
{
.device_name = (uint8_t*)app_gap_device_name, /* Local device name (NULL terminated) */
.device_class = {0x00, 0x00, 0x00}, /* Local device class */
.security_requirement_mask = BTM_SEC_NONE, /* Security requirements mask (BTM_SEC_NONE, or combination of BTM_SEC_IN_AUTHENTICATE, BTM_SEC_OUT_AUTHENTICATE, BTM_SEC_ENCRYPT (see #wiced_bt_sec_level_e)) */
.max_simultaneous_links = (CY_BT_CLIENT_MAX_LINKS + CY_BT_SERVER_MAX_LINKS), /* Maximum number simultaneous links to different devices */
/* LE scan settings */
.ble_scan_cfg =
{
.scan_mode = CY_BT_SCAN_MODE, /* LE scan mode (BTM_BLE_SCAN_MODE_PASSIVE, BTM_BLE_SCAN_MODE_ACTIVE, or BTM_BLE_SCAN_MODE_NONE) */
/* Advertisement scan configuration */
.high_duty_scan_interval = CY_BT_HIGH_DUTY_SCAN_INTERVAL, /* High duty scan interval (in slots (1 slot = 0.625 ms)) */
.high_duty_scan_window = CY_BT_HIGH_DUTY_SCAN_WINDOW, /* High duty scan window (in slots (1 slot = 0.625 ms)) */
.high_duty_scan_duration = CY_BT_HIGH_DUTY_SCAN_DURATION, /* High duty scan duration in seconds (0 for infinite) */
.low_duty_scan_interval = CY_BT_LOW_DUTY_SCAN_INTERVAL, /* Low duty scan interval (in slots (1 slot = 0.625 ms)) */
.low_duty_scan_window = CY_BT_LOW_DUTY_SCAN_WINDOW, /* Low duty scan window (in slots (1 slot = 0.625 ms)) */
.low_duty_scan_duration = CY_BT_LOW_DUTY_SCAN_DURATION, /* Low duty scan duration in seconds (0 for infinite) */
/* Connection scan configuration */
.high_duty_conn_scan_interval = CY_BT_HIGH_DUTY_CONN_SCAN_INTERVAL, /* High duty cycle connection scan interval (in slots (1 slot = 0.625 ms)) */
.high_duty_conn_scan_window = CY_BT_HIGH_DUTY_CONN_SCAN_WINDOW, /* High duty cycle connection scan window (in slots (1 slot = 0.625 ms)) */
.high_duty_conn_duration = CY_BT_HIGH_DUTY_CONN_SCAN_DURATION, /* High duty cycle connection duration in seconds (0 for infinite) */
.low_duty_conn_scan_interval = CY_BT_LOW_DUTY_CONN_SCAN_INTERVAL, /* Low duty cycle connection scan interval (in slots (1 slot = 0.625 ms)) */
.low_duty_conn_scan_window = CY_BT_LOW_DUTY_CONN_SCAN_WINDOW, /* Low duty cycle connection scan window (in slots (1 slot = 0.625 ms)) */
.low_duty_conn_duration = CY_BT_LOW_DUTY_CONN_SCAN_DURATION, /* Low duty cycle connection duration in seconds (0 for infinite) */
/* Connection configuration */
.conn_min_interval = CY_BT_CONN_MIN_INTERVAL, /* Minimum connection interval (in slots (1 slot = 1.25 ms)) */
.conn_max_interval = CY_BT_CONN_MAX_INTERVAL, /* Maximum connection interval (in slots (1 slot = 1.25 ms)) */
.conn_latency = CY_BT_CONN_LATENCY, /* Connection latency */
.conn_supervision_timeout = CY_BT_CONN_SUPERVISION_TIMEOUT, /* Connection link supervision timeout (in 10 ms) */
},
/* LE advertisement settings */
.ble_advert_cfg =
{
.channel_map = CY_BT_CHANNEL_MAP, /* Advertising channel map (mask of BTM_BLE_ADVERT_CHNL_37, BTM_BLE_ADVERT_CHNL_38, BTM_BLE_ADVERT_CHNL_39) */
.high_duty_min_interval = CY_BT_HIGH_DUTY_ADV_MIN_INTERVAL, /* High duty undirected connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_max_interval = CY_BT_HIGH_DUTY_ADV_MAX_INTERVAL, /* High duty undirected connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_duration = CY_BT_HIGH_DUTY_ADV_DURATION, /* High duty undirected connectable advertising duration in seconds (0 for infinite) */
.low_duty_min_interval = CY_BT_LOW_DUTY_ADV_MIN_INTERVAL, /* Low duty undirected connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_max_interval = CY_BT_LOW_DUTY_ADV_MAX_INTERVAL, /* Low duty undirected connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_duration = CY_BT_LOW_DUTY_ADV_DURATION, /* Low duty undirected connectable advertising duration in seconds (0 for infinite) */
.high_duty_directed_min_interval = CY_BT_HIGH_DUTY_DIRECTED_ADV_MIN_INTERVAL, /* High duty directed connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_directed_max_interval = CY_BT_HIGH_DUTY_DIRECTED_ADV_MAX_INTERVAL, /* High duty directed connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_min_interval = CY_BT_LOW_DUTY_DIRECTED_ADV_MIN_INTERVAL, /* Low duty directed connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_max_interval = CY_BT_LOW_DUTY_DIRECTED_ADV_MAX_INTERVAL, /* Low duty directed connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_directed_duration = CY_BT_LOW_DUTY_DIRECTED_ADV_DURATION, /* Low duty directed connectable advertising duration in seconds (0 for infinite) */
.high_duty_nonconn_min_interval = CY_BT_HIGH_DUTY_NONCONN_ADV_MIN_INTERVAL, /* High duty non-connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_nonconn_max_interval = CY_BT_HIGH_DUTY_NONCONN_ADV_MAX_INTERVAL, /* High duty non-connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.high_duty_nonconn_duration = CY_BT_HIGH_DUTY_NONCONN_ADV_DURATION, /* High duty non-connectable advertising duration in seconds (0 for infinite) */
.low_duty_nonconn_min_interval = CY_BT_LOW_DUTY_NONCONN_ADV_MIN_INTERVAL, /* Low duty non-connectable minimum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_nonconn_max_interval = CY_BT_LOW_DUTY_NONCONN_ADV_MAX_INTERVAL, /* Low duty non-connectable maximum advertising interval (in slots (1 slot = 0.625 ms)) */
.low_duty_nonconn_duration = CY_BT_LOW_DUTY_NONCONN_ADV_DURATION /* Low duty non-connectable advertising duration in seconds (0 for infinite) */
},
/* GATT configuration */
.gatt_cfg =
{
.appearance = CY_BT_APPEARANCE, /* GATT appearance (see gatt_appearance_e) */
.client_max_links = CY_BT_CLIENT_MAX_LINKS, /* Client config: maximum number of servers that local client can connect to */
.server_max_links = CY_BT_SERVER_MAX_LINKS, /* Server config: maximum number of remote clients connections allowed by the local */
.max_attr_len = CY_BT_MAX_ATTR_LEN, /* Maximum attribute length; gki_cfg must have a corresponding buffer pool that can hold this length */
.max_mtu_size = CY_BT_MTU_SIZE /* Maximum MTU size for GATT connections, should be between 23 and (max_attr_len + 5) */
},
/* RFCOMM configuration */
.rfcomm_cfg =
{
.max_links = 0, /* Maximum number of simultaneous connected remote devices */
.max_ports = 0 /* Maximum number of simultaneous RFCOMM ports */
},
/* Application-managed L2CAP protocol configuration */
.l2cap_application =
{
.max_links = 0, /* Maximum number of application-managed l2cap links (BR/EDR and LE) */
/* BR/EDR l2cap configuration */
.max_psm = 0, /* Maximum number of application-managed BR/EDR PSMs */
.max_channels = 0, /* Maximum number of application-managed BR/EDR channels */
/* LE L2cap connection-oriented channels configuration */
.max_le_psm = CY_BT_L2CAP_MAX_LE_PSM, /* Maximum number of application-managed LE PSMs */
.max_le_channels = CY_BT_L2CAP_MAX_LE_CHANNELS, /* Maximum number of application-managed LE channels */
/* LE L2cap fixed channel configuration */
.max_le_l2cap_fixed_channels = 0, /* Maximum number of application-managed fixed channels supported (in addition to mandatory channels 4, 5 and 6) */
.max_rx_mtu = CY_BT_L2CAP_MTU_SIZE /* Maximum RX MTU allowed */
},
.addr_resolution_db_size = 5, /* LE Address Resolution DB settings - effective only for pre 4.2 controller */
.rpa_refresh_timeout = CY_BT_RPA_TIMEOUT, /* Interval of random address refreshing - secs */
.stack_scratch_size = WICED_BT_CFG_DEFAULT_STACK_SCRATCH_SIZE, /* Memory area reserved for the stack transient memory requirements */
.ble_white_list_size = CY_BT_FILTER_ACCEPT_LIST_SIZE, /* Maximum number of filter accept list devices allowed. Cannot be more than 128 */
.default_ble_power_level = CY_BT_TX_POWER /* Default LE power level */
};
#endif

View File

@ -0,0 +1,38 @@
/***************************************************************************//**
* File Name: cycfg_bt_settings.h
*
* Description:
* Bluetooth Configurator configuration.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
********************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*******************************************************************************/
#if !defined(CYCFG_BT_SETTINGS_H)
#define CYCFG_BT_SETTINGS_H
#include "wiced_bt_cfg.h"
#include "wiced_bt_ble.h"
#include "wiced_bt_constants.h"
extern const wiced_bt_cfg_settings_t wiced_bt_cfg_settings;
#endif /* CYCFG_BT_SETTINGS_H */
/* [] END OF FILE */

View File

@ -0,0 +1,55 @@
/***************************************************************************//**
* File Name: cycfg_gap.c
*
* Description:
* BLE device's GAP configuration.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
********************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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 "cycfg_gap.h"
/* Device address */
wiced_bt_device_address_t cy_bt_device_address = {0x00, 0xA0, 0x50, 0x00, 0x00, 0x00};
const uint8_t cy_bt_adv_packet_elem_0[1] = { 0x06 };
const uint8_t cy_bt_adv_packet_elem_1[5] = { 0x48, 0x65, 0x6C, 0x6C, 0x6F };
const uint8_t cy_bt_adv_packet_elem_2[16] = { 0x38, 0x28, 0x2E, 0x5F, 0xA5, 0x1E, 0xC7, 0xA4, 0xC2, 0x46, 0x47, 0x74, 0xB6, 0xC7, 0x81, 0x2F };
wiced_bt_ble_advert_elem_t cy_bt_adv_packet_data[] =
{
/* Flags */
{
.advert_type = BTM_BLE_ADVERT_TYPE_FLAG,
.len = 1,
.p_data = (uint8_t*)cy_bt_adv_packet_elem_0,
},
/* Complete local name */
{
.advert_type = BTM_BLE_ADVERT_TYPE_NAME_COMPLETE,
.len = 5,
.p_data = (uint8_t*)cy_bt_adv_packet_elem_1,
},
/* Complete list of 128-bit UUIDs available */
{
.advert_type = BTM_BLE_ADVERT_TYPE_128SRV_COMPLETE,
.len = 16,
.p_data = (uint8_t*)cy_bt_adv_packet_elem_2,
},
};

View File

@ -0,0 +1,138 @@
/***************************************************************************//**
* File Name: cycfg_gap.h
*
* Description:
* Definitions for GAP configuration.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
********************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*******************************************************************************/
#if !defined(CYCFG_GAP_H)
#define CYCFG_GAP_H
#include "stdint.h"
#include "wiced_bt_ble.h"
#include "cycfg_gatt_db.h"
/* Silicon generated 'Company assigned' part of device address */
#define CY_BT_SILICON_DEVICE_ADDRESS_EN 0
/* Appearance */
#define CY_BT_APPEARANCE 0
/* TX Power Level */
#define CY_BT_TX_POWER 0
/* Interval of random address refreshing */
#define CY_BT_RPA_TIMEOUT 900
/* Maximum attribute length */
#define CY_BT_MAX_ATTR_LEN 512
/* Maximum attribute MTU size */
#define CY_BT_MTU_SIZE 23
/* RX PDU size */
#define CY_BT_RX_PDU_SIZE 512
/* Maximum connections */
#define CY_BT_SERVER_MAX_LINKS 1
#define CY_BT_CLIENT_MAX_LINKS 0
/* LE Filter accept list size */
#define CY_BT_FILTER_ACCEPT_LIST_SIZE 0
/* This define is obsolete and kept for backward compatibility only. */
#define CY_BT_WHITE_LIST_SIZE CY_BT_FILTER_ACCEPT_LIST_SIZE
/* L2CAP configuration */
#define CY_BT_L2CAP_MAX_LE_PSM 1
#define CY_BT_L2CAP_MAX_LE_CHANNELS 1
#define CY_BT_L2CAP_MAX_LE_FIXED_CHANNELS 0
#define CY_BT_L2CAP_MAX_BR_ERTM_CHANNELS 0
#define CY_BT_L2CAP_MAX_BR_ERTM_TX_WIN 0
#define CY_BT_L2CAP_MTU_SIZE 512
/* Security level */
#define CY_BT_SECURITY_LEVEL BTM_SEC_BEST_EFFORT
/* Scan configuration */
#define CY_BT_SCAN_MODE BTM_BLE_SCAN_MODE_PASSIVE
#define CY_BT_HIGH_DUTY_SCAN_INTERVAL WICED_BT_CFG_DEFAULT_HIGH_DUTY_SCAN_INTERVAL
#define CY_BT_HIGH_DUTY_SCAN_WINDOW WICED_BT_CFG_DEFAULT_HIGH_DUTY_SCAN_WINDOW
#define CY_BT_HIGH_DUTY_SCAN_DURATION 5
#define CY_BT_LOW_DUTY_SCAN_INTERVAL WICED_BT_CFG_DEFAULT_LOW_DUTY_SCAN_INTERVAL
#define CY_BT_LOW_DUTY_SCAN_WINDOW WICED_BT_CFG_DEFAULT_LOW_DUTY_SCAN_WINDOW
#define CY_BT_LOW_DUTY_SCAN_DURATION 60
#define CY_BT_HIGH_DUTY_CONN_SCAN_INTERVAL WICED_BT_CFG_DEFAULT_HIGH_DUTY_CONN_SCAN_INTERVAL
#define CY_BT_HIGH_DUTY_CONN_SCAN_WINDOW WICED_BT_CFG_DEFAULT_HIGH_DUTY_CONN_SCAN_WINDOW
#define CY_BT_HIGH_DUTY_CONN_SCAN_DURATION 30
#define CY_BT_LOW_DUTY_CONN_SCAN_INTERVAL WICED_BT_CFG_DEFAULT_LOW_DUTY_CONN_SCAN_INTERVAL
#define CY_BT_LOW_DUTY_CONN_SCAN_WINDOW WICED_BT_CFG_DEFAULT_LOW_DUTY_CONN_SCAN_WINDOW
#define CY_BT_LOW_DUTY_CONN_SCAN_DURATION 30
/* Connection configuration */
#define CY_BT_CONN_MIN_INTERVAL WICED_BT_CFG_DEFAULT_CONN_MIN_INTERVAL
#define CY_BT_CONN_MAX_INTERVAL WICED_BT_CFG_DEFAULT_CONN_MAX_INTERVAL
#define CY_BT_CONN_LATENCY WICED_BT_CFG_DEFAULT_CONN_LATENCY
#define CY_BT_CONN_SUPERVISION_TIMEOUT WICED_BT_CFG_DEFAULT_CONN_SUPERVISION_TIMEOUT
/* Advertisement settings */
#define CY_BT_CHANNEL_MAP (BTM_BLE_ADVERT_CHNL_37 | BTM_BLE_ADVERT_CHNL_38 | BTM_BLE_ADVERT_CHNL_39)
#define CY_BT_HIGH_DUTY_ADV_MIN_INTERVAL 48
#define CY_BT_HIGH_DUTY_ADV_MAX_INTERVAL 48
#define CY_BT_HIGH_DUTY_ADV_DURATION 0
#define CY_BT_LOW_DUTY_ADV_MIN_INTERVAL 2048
#define CY_BT_LOW_DUTY_ADV_MAX_INTERVAL 2048
#define CY_BT_LOW_DUTY_ADV_DURATION 0
#define CY_BT_HIGH_DUTY_DIRECTED_ADV_MIN_INTERVAL 400
#define CY_BT_HIGH_DUTY_DIRECTED_ADV_MAX_INTERVAL 800
#define CY_BT_LOW_DUTY_DIRECTED_ADV_MIN_INTERVAL 48
#define CY_BT_LOW_DUTY_DIRECTED_ADV_MAX_INTERVAL 48
#define CY_BT_LOW_DUTY_DIRECTED_ADV_DURATION 30
#define CY_BT_HIGH_DUTY_NONCONN_ADV_MIN_INTERVAL 160
#define CY_BT_HIGH_DUTY_NONCONN_ADV_MAX_INTERVAL 160
#define CY_BT_HIGH_DUTY_NONCONN_ADV_DURATION 30
#define CY_BT_LOW_DUTY_NONCONN_ADV_MIN_INTERVAL 2048
#define CY_BT_LOW_DUTY_NONCONN_ADV_MAX_INTERVAL 2048
#define CY_BT_LOW_DUTY_NONCONN_ADV_DURATION 30
/* Advertisement and scan response packets defines */
#define CY_BT_ADV_PACKET_ELEM_COUNT 3
/* CY_BT_ADV_PACKET_DATA_SIZE is obsolete. Use CY_BT_ADV_PACKET_ELEM_COUNT instead */
#define CY_BT_ADV_PACKET_DATA_SIZE CY_BT_ADV_PACKET_ELEM_COUNT
/* cy_bt_device_name is obsolete. Use app_gap_device_name instead. */
#define cy_bt_device_name app_gap_device_name
/* External definitions */
extern wiced_bt_device_address_t cy_bt_device_address;
extern wiced_bt_ble_advert_elem_t cy_bt_adv_packet_data[];
#endif /* CYCFG_GAP_H */

View File

@ -0,0 +1,176 @@
/******************************************************************************
* File Name: cycfg_gatt_db.c
*
* Description:
* BLE device's GATT database and device configuration.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
*******************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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 "cycfg_gatt_db.h"
#include "wiced_bt_uuid.h"
#include "wiced_bt_gatt.h"
/******************************************************************************
* GATT server definitions
******************************************************************************/
const uint8_t gatt_database[] =
{
/* Primary Service: Generic Access */
PRIMARY_SERVICE_UUID16 (
HDLS_GAP,
__UUID_SERVICE_GENERIC_ACCESS),
/* Characteristic: Device Name */
CHARACTERISTIC_UUID16 (
HDLC_GAP_DEVICE_NAME,
HDLC_GAP_DEVICE_NAME_VALUE,
__UUID_CHARACTERISTIC_DEVICE_NAME,
GATTDB_CHAR_PROP_READ,
GATTDB_PERM_READABLE),
/* Characteristic: Appearance */
CHARACTERISTIC_UUID16 (
HDLC_GAP_APPEARANCE,
HDLC_GAP_APPEARANCE_VALUE,
__UUID_CHARACTERISTIC_APPEARANCE,
GATTDB_CHAR_PROP_READ,
GATTDB_PERM_READABLE),
/* Primary Service: Generic Attribute */
PRIMARY_SERVICE_UUID16 (
HDLS_GATT,
__UUID_SERVICE_GENERIC_ATTRIBUTE),
/* Characteristic: Service Changed */
CHARACTERISTIC_UUID16 (
HDLC_GATT_SERVICE_CHANGED,
HDLC_GATT_SERVICE_CHANGED_VALUE,
__UUID_CHARACTERISTIC_SERVICE_CHANGED,
GATTDB_CHAR_PROP_INDICATE,
GATTDB_PERM_NONE),
/* Descriptor: Client Characteristic Configuration */
CHAR_DESCRIPTOR_UUID16_WRITABLE (
HDLD_GATT_SERVICE_CHANGED_CLIENT_CHAR_CONFIG,
__UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,
GATTDB_PERM_READABLE | GATTDB_PERM_WRITE_REQ),
/* Primary Service: Hello Sensor */
PRIMARY_SERVICE_UUID128 (
HDLS_HELLO_SENSOR,
__UUID_SERVICE_HELLO_SENSOR),
/* Characteristic: Notify */
CHARACTERISTIC_UUID128 (
HDLC_HELLO_SENSOR_NOTIFY,
HDLC_HELLO_SENSOR_NOTIFY_VALUE,
__UUID_CHARACTERISTIC_HELLO_SENSOR_NOTIFY,
GATTDB_CHAR_PROP_READ | GATTDB_CHAR_PROP_NOTIFY | GATTDB_CHAR_PROP_INDICATE,
GATTDB_PERM_READABLE | GATTDB_PERM_AUTH_READABLE),
/* Descriptor: Client Characteristic Configuration */
CHAR_DESCRIPTOR_UUID16_WRITABLE (
HDLD_HELLO_SENSOR_NOTIFY_CLIENT_CHAR_CONFIG,
__UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION,
GATTDB_PERM_READABLE | GATTDB_PERM_WRITE_REQ | GATTDB_PERM_AUTH_WRITABLE),
/* Characteristic: Blink */
CHARACTERISTIC_UUID128_WRITABLE (
HDLC_HELLO_SENSOR_BLINK,
HDLC_HELLO_SENSOR_BLINK_VALUE,
__UUID_CHARACTERISTIC_HELLO_SENSOR_BLINK,
GATTDB_CHAR_PROP_READ | GATTDB_CHAR_PROP_WRITE | GATTDB_CHAR_PROP_WRITE_NO_RESPONSE,
GATTDB_PERM_READABLE | GATTDB_PERM_WRITE_REQ | GATTDB_PERM_WRITE_CMD),
};
/* Length of the GATT database */
const uint16_t gatt_database_len = sizeof(gatt_database);
/******************************************************************************
* GATT Initial Value Arrays
******************************************************************************/
uint8_t app_gap_device_name[] = {'H', 'e', 'l', 'l', 'o', '\0',};
uint8_t app_gap_appearance[] = {0x00, 0x00,};
uint8_t app_gatt_service_changed[] = {0x00, 0x00, 0x00, 0x00,};
uint8_t app_gatt_service_changed_client_char_config[] = {0x00, 0x00,};
uint8_t app_hello_sensor_notify[] = {'H', 'e', 'l', 'l', 'o', ' ', '0',};
uint8_t app_hello_sensor_notify_client_char_config[] = {0x00, 0x00,};
uint8_t app_hello_sensor_blink[] = {0x00,};
/******************************************************************************
* GATT Lookup Table
******************************************************************************/
gatt_db_lookup_table_t app_gatt_db_ext_attr_tbl[] =
{
{
HDLC_GAP_DEVICE_NAME_VALUE, /* attribute handle */
5, /* maxlen */
5, /* curlen */
app_gap_device_name, /* attribute data */
},
{
HDLC_GAP_APPEARANCE_VALUE, /* attribute handle */
2, /* maxlen */
2, /* curlen */
app_gap_appearance, /* attribute data */
},
{
HDLC_GATT_SERVICE_CHANGED_VALUE, /* attribute handle */
4, /* maxlen */
4, /* curlen */
app_gatt_service_changed, /* attribute data */
},
{
HDLD_GATT_SERVICE_CHANGED_CLIENT_CHAR_CONFIG, /* attribute handle */
2, /* maxlen */
2, /* curlen */
app_gatt_service_changed_client_char_config, /* attribute data */
},
{
HDLC_HELLO_SENSOR_NOTIFY_VALUE, /* attribute handle */
7, /* maxlen */
7, /* curlen */
app_hello_sensor_notify, /* attribute data */
},
{
HDLD_HELLO_SENSOR_NOTIFY_CLIENT_CHAR_CONFIG, /* attribute handle */
2, /* maxlen */
2, /* curlen */
app_hello_sensor_notify_client_char_config, /* attribute data */
},
{
HDLC_HELLO_SENSOR_BLINK_VALUE, /* attribute handle */
1, /* maxlen */
1, /* curlen */
app_hello_sensor_blink, /* attribute data */
},
};
/* Number of Lookup Table entries */
const uint16_t app_gatt_db_ext_attr_tbl_size =
(sizeof(app_gatt_db_ext_attr_tbl) / sizeof(gatt_db_lookup_table_t));
/* Number of GATT initial value arrays entries */
const uint16_t app_gap_device_name_len = 5;
const uint16_t app_gap_appearance_len = (sizeof(app_gap_appearance));
const uint16_t app_gatt_service_changed_len = (sizeof(app_gatt_service_changed));
const uint16_t app_gatt_service_changed_client_char_config_len =
(sizeof(app_gatt_service_changed_client_char_config));
const uint16_t app_hello_sensor_notify_len = (sizeof(app_hello_sensor_notify));
const uint16_t app_hello_sensor_notify_client_char_config_len =
(sizeof(app_hello_sensor_notify_client_char_config));
const uint16_t app_hello_sensor_blink_len = (sizeof(app_hello_sensor_blink));

View File

@ -0,0 +1,101 @@
/***************************************************************************//**
* File Name: cycfg_gatt_db.h
*
* Description:
* Definitions for constants used in the device's GATT database and function
* prototypes.
* This file should not be modified. It was automatically generated by
* Bluetooth Configurator 2.60.0.1460
*
********************************************************************************
* Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*******************************************************************************/
#if !defined(CYCFG_GATT_DB_H)
#define CYCFG_GATT_DB_H
#include "stdint.h"
#define __UUID_SERVICE_GENERIC_ACCESS 0x1800
#define __UUID_CHARACTERISTIC_DEVICE_NAME 0x2A00
#define __UUID_CHARACTERISTIC_APPEARANCE 0x2A01
#define __UUID_SERVICE_GENERIC_ATTRIBUTE 0x1801
#define __UUID_CHARACTERISTIC_SERVICE_CHANGED 0x2A05
#define __UUID_DESCRIPTOR_CLIENT_CHARACTERISTIC_CONFIGURATION 0x2902
#define __UUID_SERVICE_HELLO_SENSOR 0x38, 0x28, 0x2E, 0x5F, 0xA5, 0x1E, 0xC7, 0xA4, 0xC2, 0x46, 0x47, 0x74, 0xB6, 0xC7, 0x81, 0x2F
#define __UUID_CHARACTERISTIC_HELLO_SENSOR_NOTIFY 0xBD, 0xED, 0x5E, 0xC7, 0x28, 0x3A, 0x86, 0xAD, 0xAF, 0x44, 0x45, 0x9F, 0x3D, 0x62, 0xEA, 0x29
#define __UUID_CHARACTERISTIC_HELLO_SENSOR_BLINK 0x8E, 0xB1, 0x5D, 0xFA, 0x97, 0x33, 0x5A, 0xA1, 0x61, 0x41, 0xA7, 0x13, 0x50, 0x36, 0xAD, 0xD2
/* Service Generic Access */
#define HDLS_GAP 0x0001
/* Characteristic Device Name */
#define HDLC_GAP_DEVICE_NAME 0x0002
#define HDLC_GAP_DEVICE_NAME_VALUE 0x0003
/* Characteristic Appearance */
#define HDLC_GAP_APPEARANCE 0x0004
#define HDLC_GAP_APPEARANCE_VALUE 0x0005
/* Service Generic Attribute */
#define HDLS_GATT 0x0006
/* Characteristic Service Changed */
#define HDLC_GATT_SERVICE_CHANGED 0x0007
#define HDLC_GATT_SERVICE_CHANGED_VALUE 0x0008
/* Descriptor Client Characteristic Configuration */
#define HDLD_GATT_SERVICE_CHANGED_CLIENT_CHAR_CONFIG 0x0009
/* Service Hello Sensor */
#define HDLS_HELLO_SENSOR 0x000A
/* Characteristic Notify */
#define HDLC_HELLO_SENSOR_NOTIFY 0x000B
#define HDLC_HELLO_SENSOR_NOTIFY_VALUE 0x000C
/* Descriptor Client Characteristic Configuration */
#define HDLD_HELLO_SENSOR_NOTIFY_CLIENT_CHAR_CONFIG 0x000D
/* Characteristic Blink */
#define HDLC_HELLO_SENSOR_BLINK 0x000E
#define HDLC_HELLO_SENSOR_BLINK_VALUE 0x000F
/* External Lookup Table Entry */
typedef struct
{
uint16_t handle;
uint16_t max_len;
uint16_t cur_len;
uint8_t *p_data;
} gatt_db_lookup_table_t;
/* External definitions */
extern const uint8_t gatt_database[];
extern const uint16_t gatt_database_len;
extern gatt_db_lookup_table_t app_gatt_db_ext_attr_tbl[];
extern const uint16_t app_gatt_db_ext_attr_tbl_size;
extern uint8_t app_gap_device_name[];
extern const uint16_t app_gap_device_name_len;
extern uint8_t app_gap_appearance[];
extern const uint16_t app_gap_appearance_len;
extern uint8_t app_gatt_service_changed[];
extern const uint16_t app_gatt_service_changed_len;
extern uint8_t app_gatt_service_changed_client_char_config[];
extern const uint16_t app_gatt_service_changed_client_char_config_len;
extern uint8_t app_hello_sensor_notify[];
extern const uint16_t app_hello_sensor_notify_len;
extern uint8_t app_hello_sensor_notify_client_char_config[];
extern const uint16_t app_hello_sensor_notify_client_char_config_len;
extern uint8_t app_hello_sensor_blink[];
extern const uint16_t app_hello_sensor_blink_len;
#endif /* CYCFG_GATT_DB_H */

View File

@ -58,15 +58,14 @@ extern "C" {
#define CYBSP_J2_9 CYBSP_A4
#define CYBSP_A5 (P10_5)
#define CYBSP_J2_11 CYBSP_A5
#define CYBSP_QSPI_FRAM_SSEL (P11_0)
#define CYBSP_QSPI_SS (P11_2)
#define CYBSP_QSPI_FLASH_SSEL CYBSP_QSPI_SS
#define CYBSP_QSPI_D3 (P11_3)
#define CYBSP_QSPI_D2 (P11_4)
#define CYBSP_QSPI_D1 (P11_5)
#define CYBSP_QSPI_D0 (P11_6)
#define CYBSP_QSPI_SCK (P11_7)
#define CYBSP_BT_UART_RX (P11_0)
#define CYBSP_BT_UART_TX (P11_1)
#define CYBSP_BT_UART_RTS (P11_2)
#define CYBSP_BT_UART_CTS (P11_3)
#define CYBSP_BT_DEVICE_WAKE (P11_6)
#define CYBSP_BT_POWER (P11_7)
#define CYBSP_WIFI_HOST_WAKE (P12_6)
#define CYBSP_BT_HOST_WAKE (P12_7)
#define CYBSP_WIFI_SDIO_D0 (P2_0)
#define CYBSP_WIFI_SDIO_D1 (P2_1)
#define CYBSP_WIFI_SDIO_D2 (P2_2)