Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0f90da1fd | |||
| da65b6ab49 | |||
| d114bac8f0 | |||
| f6ea58ce38 | |||
| 905cdfee4d | |||
| 0f7c3e9803 | |||
| 5246b2f867 | |||
| a69b875884 | |||
| 414c88aea2 | |||
| c8c8d6fe73 | |||
| 88d3e6c7c3 | |||
| d439f4d2ba |
+89
-3
@@ -7,9 +7,6 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
// DEVICE INFO
|
||||
#define DEVICE_NAME "xyz"
|
||||
|
||||
// LOG
|
||||
#define NRF_LOG_ENABLED 1
|
||||
#define NRF_LOG_DEFAULT_LEVEL 3
|
||||
@@ -83,6 +80,95 @@ extern "C"
|
||||
#define POWER_CONFIG_IRQ_PRIORITY 6
|
||||
#define CLOCK_CONFIG_IRQ_PRIORITY 6
|
||||
|
||||
// SoftDevice BLE event handler
|
||||
#define NRF_SDH_BLE_ENABLED 1
|
||||
// The number of vendor-specific UUIDs.
|
||||
#define NRF_SDH_BLE_VS_UUID_COUNT 0
|
||||
// Attribute Table size in bytes. The size must be a multiple of 4.
|
||||
#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1408
|
||||
// BLE Observers - Observers and priority levels
|
||||
#define NRF_SDH_BLE_OBSERVER_PRIO_LEVELS 4
|
||||
// Include the Service Changed characteristic in the Attribute Table.
|
||||
#define NRF_SDH_BLE_SERVICE_CHANGED 1
|
||||
|
||||
// This setting configures how Stack events are dispatched to the application.
|
||||
#define NRF_SDH_DISPATCH_MODEL 2 /* SoftDevice events are to be fetched manually. */
|
||||
|
||||
// BLE Observers priorities - Invididual priorities
|
||||
#define BLE_ADV_BLE_OBSERVER_PRIO 1
|
||||
#define BLE_CONN_PARAMS_BLE_OBSERVER_PRIO 1
|
||||
#define BLE_CONN_STATE_BLE_OBSERVER_PRIO 0
|
||||
|
||||
// Enable Advertising module
|
||||
#define BLE_ADVERTISING_ENABLED 1
|
||||
|
||||
// BLE device name
|
||||
#define DEF_ELITE_EDC_15RE 0x00020107
|
||||
#define DEF_ELITE_EDC_15R2 0x00020108
|
||||
#define DEF_ELITE_EIS_10 0x00040100
|
||||
#define DEF_ELITE_EIS_11 0x00040101
|
||||
#define DEF_ELITE_EIS_MINI_10 0x00040102
|
||||
#define DEF_ELITE_MODEL DEF_ELITE_EIS_11
|
||||
|
||||
#if (DEF_ELITE_MODEL == DEF_ELITE_EDC_15RE)
|
||||
#define ELITE_DEVICE_NAME "EDC"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 2
|
||||
#define MAJOR_VERSION_NUMBER 1
|
||||
#define MINOR_VERSION_NUMBER 7
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EDC_15R2)
|
||||
#define ELITE_DEVICE_NAME "EDC"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 2
|
||||
#define MAJOR_VERSION_NUMBER 1
|
||||
#define MINOR_VERSION_NUMBER 8
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EIS_10)
|
||||
#define ELITE_DEVICE_NAME "EIS"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 4
|
||||
#define MAJOR_VERSION_NUMBER 1
|
||||
#define MINOR_VERSION_NUMBER 0
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EIS_11)
|
||||
#define ELITE_DEVICE_NAME "EIS"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 4
|
||||
#define MAJOR_VERSION_NUMBER 1
|
||||
#define MINOR_VERSION_NUMBER 1
|
||||
#elif (DEF_ELITE_MODEL == DEF_ELITE_EIS_MINI_10)
|
||||
#define ELITE_DEVICE_NAME "EIS"
|
||||
#define MAJOR_PRODUCT_NUMBER 0
|
||||
#define MINOR_PRODUCT_NUMBER 4
|
||||
#define MAJOR_VERSION_NUMBER 1
|
||||
#define MINOR_VERSION_NUMBER 2
|
||||
#endif
|
||||
|
||||
#define ELITE_COMPANY_CODE "Elite"
|
||||
#define ELITE_HW_VER \
|
||||
{ \
|
||||
MAJOR_PRODUCT_NUMBER, MINOR_PRODUCT_NUMBER, MAJOR_VERSION_NUMBER, MINOR_VERSION_NUMBER \
|
||||
}
|
||||
|
||||
// Maximum number of peripheral links.
|
||||
#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1
|
||||
// Maximum number of central links.
|
||||
#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 0
|
||||
// Total link count.
|
||||
#define NRF_SDH_BLE_TOTAL_LINK_COUNT 1
|
||||
|
||||
// Enable GATT module.
|
||||
#define NRF_BLE_GATT_ENABLED 1
|
||||
// Priority with which BLE events are dispatched to the GATT module.
|
||||
#define NRF_BLE_GATT_BLE_OBSERVER_PRIO 1
|
||||
// Requested BLE GAP data length to be negotiated.
|
||||
#define NRF_SDH_BLE_GAP_DATA_LENGTH 27
|
||||
// GAP event length. The time set aside for this connection on every connection interval in 1.25 ms units.
|
||||
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 6
|
||||
// Static maximum MTU size.
|
||||
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
|
||||
|
||||
// Enable ble device info module
|
||||
#define BLE_DIS_ENABLED 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -45,15 +45,15 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">
|
||||
<ClCompile>
|
||||
<CLanguageStandard>GNU99</CLanguageStandard>
|
||||
<AdditionalIncludeDirectories>.;../bmd380_sdk/components/softdevice/s140/headers;../bmd380_sdk/components/softdevice/s140/headers/nrf52;../bmd380_sdk/external/segger_rtt;../bmd380_sdk/components/libraries/log;../bmd380_sdk/components/libraries/log/src;../bmd380_sdk/components/libraries/memobj;../bmd380_sdk/components/libraries/ringbuf;../bmd380_sdk/components/libraries/atomic;../bmd380_sdk/components/libraries/balloc;../bmd380_sdk/external/freertos/portable/CMSIS/nrf52;../bmd380_sdk/external/freertos/portable/GCC/nrf52;../bmd380_sdk/integration/nrfx;../bmd380_sdk/integration/nrfx/legacy;../bmd380_sdk/components/libraries/experimental_section_vars;../bmd380_sdk/components/libraries/strerror;../bmd380_sdk/external/freertos/source/include;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.;../bmd380_sdk/components/softdevice/s140/headers;../bmd380_sdk/components/softdevice/s140/headers/nrf52;../bmd380_sdk/external/segger_rtt;../bmd380_sdk/components/libraries/log;../bmd380_sdk/components/libraries/log/src;../bmd380_sdk/components/libraries/memobj;../bmd380_sdk/components/libraries/ringbuf;../bmd380_sdk/components/libraries/atomic;../bmd380_sdk/components/libraries/balloc;../bmd380_sdk/external/freertos/portable/CMSIS/nrf52;../bmd380_sdk/external/freertos/portable/GCC/nrf52;../bmd380_sdk/integration/nrfx;../bmd380_sdk/integration/nrfx/legacy;../bmd380_sdk/components/libraries/experimental_section_vars;../bmd380_sdk/components/libraries/strerror;../bmd380_sdk/external/freertos/source/include;../bmd380_sdk/components/softdevice/common;../bmd380_sdk/components/ble/common;../bmd380_sdk/components/ble/ble_advertising;../bmd380_sdk/components/libraries/atomic_flags;../bmd380_sdk/components/ble/ble_db_discovery;../bmd380_sdk/components/ble/ble_dtm;../bmd380_sdk/components/ble/ble_link_ctx_manager;../bmd380_sdk/components/ble/ble_racp;../bmd380_sdk/components/ble/ble_radio_notification;../bmd380_sdk/components/ble/ble_services/ble_ancs_c;../bmd380_sdk/components/ble/ble_services/ble_ans_c;../bmd380_sdk/components/ble/ble_services/ble_bas;../bmd380_sdk/components/ble/ble_services/ble_bas_c;../bmd380_sdk/components/ble/ble_services/ble_bps;../bmd380_sdk/components/ble/ble_services/ble_cscs;../bmd380_sdk/components/ble/ble_services/ble_cts_c;../bmd380_sdk/components/ble/ble_services/ble_dfu;../bmd380_sdk/components/ble/ble_services/ble_dis;../bmd380_sdk/components/ble/ble_services/ble_dis_c;../bmd380_sdk/components/ble/ble_services/ble_escs;../bmd380_sdk/components/ble/ble_services/ble_gls;../bmd380_sdk/components/ble/ble_services/ble_hids;../bmd380_sdk/components/ble/ble_services/ble_hrs;../bmd380_sdk/components/ble/ble_services/ble_hrs_c;../bmd380_sdk/components/ble/ble_services/ble_hts;../bmd380_sdk/components/ble/ble_services/ble_ias;../bmd380_sdk/components/ble/ble_services/ble_ias_c;../bmd380_sdk/components/ble/ble_services/ble_ipsp;../bmd380_sdk/components/ble/ble_services/ble_lbs;../bmd380_sdk/components/ble/ble_services/ble_lbs_c;../bmd380_sdk/components/ble/ble_services/ble_lls;../bmd380_sdk/components/ble/ble_services/ble_nus;../bmd380_sdk/components/ble/ble_services/ble_nus_c;../bmd380_sdk/components/ble/ble_services/ble_rscs;../bmd380_sdk/components/ble/ble_services/ble_rscs_c;../bmd380_sdk/components/ble/ble_services/ble_tps;../bmd380_sdk/components/ble/ble_services/eddystone;../bmd380_sdk/components/ble/ble_services/experimental_ble_lns;../bmd380_sdk/components/ble/ble_services/experimental_ble_ots;../bmd380_sdk/components/ble/ble_services/experimental_gatts_c;../bmd380_sdk/components/ble/ble_services/experimental_nrf_ble_cgms;../bmd380_sdk/components/ble/ble_services/experimental_nrf_ble_ots_c;../bmd380_sdk/components/ble/ble_services/nrf_ble_bms;../bmd380_sdk/components/ble/nrf_ble_gatt;../bmd380_sdk/components/ble/nrf_ble_gq;../bmd380_sdk/components/ble/nrf_ble_qwr;../bmd380_sdk/components/ble/nrf_ble_scan;../bmd380_sdk/components/ble/peer_manager;%(ClCompile.AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG=1;USE_APP_CONFIG=1;%(ClCompile.PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalOptions />
|
||||
<CPPLanguageStandard />
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLinkerInputs>;%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>;%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>;%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<AdditionalLinkerInputs>%(Link.AdditionalLinkerInputs)</AdditionalLinkerInputs>
|
||||
<LibrarySearchDirectories>%(Link.LibrarySearchDirectories)</LibrarySearchDirectories>
|
||||
<AdditionalLibraryNames>%(Link.AdditionalLibraryNames)</AdditionalLibraryNames>
|
||||
<LinkerScript>nRF52811_XXAA_s140.lds</LinkerScript>
|
||||
<AdditionalOptions />
|
||||
</Link>
|
||||
@@ -74,7 +74,10 @@
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\ble_services\ble_dis\ble_dis.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\nrf_ble_gatt\nrf_ble_gatt.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\atomic\nrf_atomic.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\atomic_flags\nrf_atflags.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\balloc\nrf_balloc.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\experimental_section_vars\nrf_section_iter.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\log\src\nrf_log_backend_flash.c" />
|
||||
@@ -87,6 +90,21 @@
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\memobj\nrf_memobj.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\ringbuf\nrf_ringbuf.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\strerror\nrf_strerror.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ant.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ble.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_freertos.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_soc.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\external\freertos\portable\CMSIS\nrf52\port_cmsis.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\external\freertos\portable\CMSIS\nrf52\port_cmsis_systick.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\external\freertos\portable\GCC\nrf52\port.c" />
|
||||
@@ -143,6 +161,11 @@
|
||||
<ClCompile Include="..\bmd380_sdk\integration\nrfx\legacy\nrf_drv_uart.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|VisualGDB'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_adv.c" />
|
||||
<ClCompile Include="le_bas.c" />
|
||||
<ClCompile Include="le_gap.c" />
|
||||
<ClCompile Include="le_gatt.c" />
|
||||
<ClCompile Include="le_srv.c" />
|
||||
<ClCompile Include="main.c" />
|
||||
<None Include="nRF52811_XXAA_s140.lds" />
|
||||
<None Include="nRF52840_XXAA_S140_reserve.lds" />
|
||||
@@ -203,9 +226,12 @@
|
||||
<ClCompile Include="$(BSP_ROOT)\nRF5x\modules\nrfx\hal\nrf_ecb.c" />
|
||||
<ClCompile Include="$(BSP_ROOT)\nRF5x\modules\nrfx\hal\nrf_nvmc.c" />
|
||||
<ClCompile Include="$(BSP_ROOT)\nRF5x\modules\nrfx\soc\nrfx_atomic.c" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\ble_services\ble_dis\ble_dis.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\nrf_ble_gatt\nrf_ble_gatt.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\atomic\nrf_atomic.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\atomic\nrf_atomic_internal.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\atomic\nrf_atomic_sanity_check.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\atomic_flags\nrf_atflags.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\balloc\nrf_balloc.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\experimental_section_vars\nrf_section.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\experimental_section_vars\nrf_section_iter.h" />
|
||||
@@ -225,6 +251,11 @@
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\memobj\nrf_memobj.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\ringbuf\nrf_ringbuf.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\strerror\nrf_strerror.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ant.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ble.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_freertos.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_soc.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\external\freertos\portable\CMSIS\nrf52\portmacro_cmsis.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\external\freertos\portable\GCC\nrf52\portmacro.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\external\freertos\source\include\croutine.h" />
|
||||
@@ -521,5 +552,18 @@
|
||||
<None Include="bmd380_peripheral-Debug.vgdbsettings" />
|
||||
<None Include="bmd380_peripheral-Release.vgdbsettings" />
|
||||
<None Include="nrf5x.xml" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\ble_advertising\ble_advertising.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_advdata.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_conn_params.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_conn_state.c" />
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_srv_common.c" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\ble_advertising\ble_advertising.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_advdata.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_conn_params.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_conn_state.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_date_time.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_gatt_db.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_sensor_location.h" />
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_srv_common.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -202,6 +202,54 @@
|
||||
<Filter Include="Header files\integration\nrfx\legacy">
|
||||
<UniqueIdentifier>{3eb77b43-f265-4923-86c6-d9e123cdf282}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\softdevice">
|
||||
<UniqueIdentifier>{3d372dea-1fd2-4fa6-9de8-8f8e3e36d4cd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\softdevice">
|
||||
<UniqueIdentifier>{9d0c0dc5-0836-4799-8e1e-863bb92fa31b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\softdevice\common">
|
||||
<UniqueIdentifier>{e08c3a0a-44b9-484a-a2d6-753845cfc53f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\softdevice\common">
|
||||
<UniqueIdentifier>{c7ac68a2-299c-474c-885e-d429e8e5a452}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble">
|
||||
<UniqueIdentifier>{bc9e84c6-e1eb-4f92-a953-156157313736}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble\ble_advertising">
|
||||
<UniqueIdentifier>{e343d3fa-a2ab-4468-a86f-85ab5bf8691f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble\common">
|
||||
<UniqueIdentifier>{6796de8c-d113-49ae-b410-1ba146602aaa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble">
|
||||
<UniqueIdentifier>{e35e5681-0697-4cac-a093-e56c06a1b735}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble\ble_advertising">
|
||||
<UniqueIdentifier>{7f288a24-1e47-49e6-9a8a-907e9c84ca1d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble\common">
|
||||
<UniqueIdentifier>{defffc43-551c-4791-967b-7d0aee507516}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble\nrf_ble_gatt">
|
||||
<UniqueIdentifier>{345707cc-7a27-4c28-94b4-19df7d90e78d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble\nrf_ble_gatt">
|
||||
<UniqueIdentifier>{b6e27cec-5179-4ec4-8f4d-e7e9fbaabae8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble\ble_services">
|
||||
<UniqueIdentifier>{4153528a-d996-4c55-be9f-917ce26d6277}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble\ble_services">
|
||||
<UniqueIdentifier>{7abc8adc-4234-4ec2-a927-53d29690cfc0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source files\ble\ble_services\ble_dis">
|
||||
<UniqueIdentifier>{2cf242dc-b5b5-4aa3-b56f-92c1afd295a1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header files\ble\ble_services\ble_dis">
|
||||
<UniqueIdentifier>{e8688895-c809-46b5-a2ab-2bd49da33d45}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.c">
|
||||
@@ -1230,6 +1278,84 @@
|
||||
<ClCompile Include="..\bmd380_sdk\integration\nrfx\legacy\nrf_drv_uart.c">
|
||||
<Filter>Source files\integration\nrfx\legacy</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh.c">
|
||||
<Filter>Source files\softdevice\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ant.c">
|
||||
<Filter>Source files\softdevice\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ble.c">
|
||||
<Filter>Source files\softdevice\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_freertos.c">
|
||||
<Filter>Source files\softdevice\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_soc.c">
|
||||
<Filter>Source files\softdevice\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_adv.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_gap.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\ble_advertising\ble_advertising.c">
|
||||
<Filter>Source files\ble\ble_advertising</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_advdata.c">
|
||||
<Filter>Source files\ble\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_conn_params.c">
|
||||
<Filter>Source files\ble\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_conn_state.c">
|
||||
<Filter>Source files\ble\common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\common\ble_srv_common.c">
|
||||
<Filter>Source files\ble\common</Filter>
|
||||
</ClCompile>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\ble_advertising\ble_advertising.h">
|
||||
<Filter>Header files\ble\ble_advertising</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_advdata.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_conn_params.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_conn_state.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_date_time.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_gatt_db.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_sensor_location.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\common\ble_srv_common.h">
|
||||
<Filter>Header files\ble\common</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\bmd380_sdk\components\libraries\atomic_flags\nrf_atflags.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_bas.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_gatt.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\nrf_ble_gatt\nrf_ble_gatt.c">
|
||||
<Filter>Source files\ble\nrf_ble_gatt</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\bmd380_sdk\components\ble\ble_services\ble_dis\ble_dis.c">
|
||||
<Filter>Source files\ble\ble_services\ble_dis</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="le_srv.c">
|
||||
<Filter>Source files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="nRF52840_XXAA_S140_reserve.lds">
|
||||
@@ -1465,6 +1591,30 @@
|
||||
<ClInclude Include="..\bmd380_sdk\integration\nrfx\legacy\nrf_drv_wdt.h">
|
||||
<Filter>Header files\integration\nrfx\legacy</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh.h">
|
||||
<Filter>Header files\softdevice\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ant.h">
|
||||
<Filter>Header files\softdevice\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_ble.h">
|
||||
<Filter>Header files\softdevice\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_freertos.h">
|
||||
<Filter>Header files\softdevice\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\softdevice\common\nrf_sdh_soc.h">
|
||||
<Filter>Header files\softdevice\common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\libraries\atomic_flags\nrf_atflags.h">
|
||||
<Filter>Header files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\nrf_ble_gatt\nrf_ble_gatt.h">
|
||||
<Filter>Header files\ble\nrf_ble_gatt</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\bmd380_sdk\components\ble\ble_services\ble_dis\ble_dis.h">
|
||||
<Filter>Header files\ble\ble_services\ble_dis</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\bmd380_sdk\external\segger_rtt\license\license.txt">
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_log.h"
|
||||
#include "nrf_log_ctrl.h"
|
||||
#include "nrf_log_default_backends.h"
|
||||
|
||||
#include "nrf_delay.h"
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
#include "nrf_sdh_freertos.h"
|
||||
|
||||
#include "ble_advdata.h"
|
||||
#include "ble_advertising.h"
|
||||
#include "ble_srv_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
BLE_ADVERTISING_DEF(m_advertising); /**< Advertising module instance. */
|
||||
|
||||
static void le_adv_evt_handler(ble_adv_evt_t const adv_evt)
|
||||
{
|
||||
switch (adv_evt)
|
||||
{
|
||||
case BLE_ADV_EVT_IDLE:
|
||||
case BLE_ADV_EVT_DIRECTED_HIGH_DUTY:
|
||||
case BLE_ADV_EVT_DIRECTED:
|
||||
case BLE_ADV_EVT_FAST:
|
||||
case BLE_ADV_EVT_SLOW:
|
||||
case BLE_ADV_EVT_FAST_WHITELIST:
|
||||
case BLE_ADV_EVT_SLOW_WHITELIST:
|
||||
case BLE_ADV_EVT_WHITELIST_REQUEST:
|
||||
case BLE_ADV_EVT_PEER_ADDR_REQUEST:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void le_adv_error_handler(uint32_t nrf_error)
|
||||
{
|
||||
// TODO...
|
||||
__BKPT(255);
|
||||
}
|
||||
|
||||
void le_adv_init(uint8_t ble_conn_cfg_tag)
|
||||
{
|
||||
uint32_t err_code;
|
||||
ble_advertising_init_t init;
|
||||
memset(&init, 0, sizeof(init));
|
||||
|
||||
extern uint16_t bas_volt_read(void);
|
||||
struct
|
||||
{
|
||||
const uint8_t company_code[5];
|
||||
const uint8_t hw_ver[4];
|
||||
uint16_t bat_volt;
|
||||
} __PACKED data = {
|
||||
.company_code = ELITE_COMPANY_CODE,
|
||||
.hw_ver = ELITE_HW_VER,
|
||||
.bat_volt = bas_volt_read(),
|
||||
};
|
||||
|
||||
ble_advdata_manuf_data_t manuf_specific_data;
|
||||
manuf_specific_data.data.p_data = (uint8_t *)&data;
|
||||
manuf_specific_data.data.size = sizeof(data);
|
||||
manuf_specific_data.company_identifier = 0xFFFF;
|
||||
init.advdata.p_manuf_specific_data = &manuf_specific_data;
|
||||
init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
|
||||
init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
|
||||
|
||||
init.config.ble_adv_fast_enabled = true;
|
||||
init.config.ble_adv_fast_interval = MSEC_TO_UNITS(25, UNIT_0_625_MS);
|
||||
init.config.ble_adv_fast_timeout = MSEC_TO_UNITS(3000, UNIT_10_MS);
|
||||
init.config.ble_adv_slow_enabled = true;
|
||||
init.config.ble_adv_slow_interval = MSEC_TO_UNITS(250, UNIT_0_625_MS);
|
||||
init.config.ble_adv_slow_timeout = MSEC_TO_UNITS(0, UNIT_10_MS);
|
||||
|
||||
init.evt_handler = le_adv_evt_handler;
|
||||
init.error_handler = le_adv_error_handler;
|
||||
|
||||
err_code = ble_advertising_init(&m_advertising, &init);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
ble_advertising_conn_cfg_tag_set(&m_advertising, ble_conn_cfg_tag);
|
||||
|
||||
ret_code_t ret = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
|
||||
APP_ERROR_CHECK(ret);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_log.h"
|
||||
#include "nrf_log_ctrl.h"
|
||||
#include "nrf_log_default_backends.h"
|
||||
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
#include "nrf_sdh_freertos.h"
|
||||
|
||||
#include "ble_srv_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
uint16_t bas_volt_read(void) {
|
||||
return 3100;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
|
||||
#include "app_error.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
void le_gap_init(const char *device_name, uint16_t usAppearance)
|
||||
{
|
||||
ret_code_t err_code;
|
||||
|
||||
ble_gap_conn_sec_mode_t sec_mode;
|
||||
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
|
||||
if (device_name != NULL)
|
||||
{
|
||||
// Set GAP device name
|
||||
err_code = sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *)device_name, strlen(device_name));
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
|
||||
// Set GAP Appearance value
|
||||
err_code = sd_ble_gap_appearance_set(usAppearance);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
// Set GAP Peripheral Preferred Connection Parameters.
|
||||
ble_gap_conn_params_t gap_conn_params;
|
||||
memset(&gap_conn_params, 0, sizeof(gap_conn_params));
|
||||
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(8, UNIT_1_25_MS); /**< Minimum connection interval (7.5 ms) */
|
||||
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(40, UNIT_1_25_MS); /**< Maximum connection interval (40 ms). */
|
||||
gap_conn_params.slave_latency = 16; /**< Slave latency. */
|
||||
gap_conn_params.conn_sup_timeout = MSEC_TO_UNITS(5000, UNIT_10_MS); /**< Connection supervisory timeout (5000 ms). */
|
||||
|
||||
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_log.h"
|
||||
#include "nrf_log_ctrl.h"
|
||||
#include "nrf_log_default_backends.h"
|
||||
|
||||
#include "nrf_delay.h"
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
#include "nrf_sdh_freertos.h"
|
||||
|
||||
#include "ble_gatt.h"
|
||||
#include "nrf_ble_gatt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
NRF_BLE_GATT_DEF(m_gatt); /**< GATT module instance. */
|
||||
void le_gatt_init(void) {
|
||||
ret_code_t err_code = nrf_ble_gatt_init(&m_gatt, NULL);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_log.h"
|
||||
#include "nrf_log_ctrl.h"
|
||||
#include "nrf_log_default_backends.h"
|
||||
|
||||
#include "nrf_delay.h"
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
#include "nrf_sdh_freertos.h"
|
||||
|
||||
#include "ble_dis.h"
|
||||
#include "nrf_ble_gatt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MANUFACTURER_NAME "MEMCHIP" /**< Manufacturer. Will be passed to Device Information Service. */
|
||||
#define HW_REV STRINGIFY(MAJOR_PRODUCT_NUMBER) "." STRINGIFY(MINOR_PRODUCT_NUMBER) "." STRINGIFY(MAJOR_VERSION_NUMBER) "." STRINGIFY(MINOR_VERSION_NUMBER)
|
||||
#define FW_REV "0.1.0"
|
||||
#define SER_NUM "0000-00-00-00001"
|
||||
#define MODULE_NAME ELITE_DEVICE_NAME
|
||||
|
||||
static void le_dis_init(void)
|
||||
{
|
||||
ble_dis_init_t dis_init;
|
||||
memset(&dis_init, 0, sizeof(dis_init));
|
||||
|
||||
ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, MANUFACTURER_NAME);
|
||||
ble_srv_ascii_to_utf8(&dis_init.fw_rev_str, FW_REV);
|
||||
ble_srv_ascii_to_utf8(&dis_init.hw_rev_str, HW_REV);
|
||||
ble_srv_ascii_to_utf8(&dis_init.model_num_str, MODULE_NAME);
|
||||
ble_srv_ascii_to_utf8(&dis_init.serial_num_str, SER_NUM);
|
||||
dis_init.dis_char_rd_sec = SEC_OPEN;
|
||||
|
||||
ret_code_t err_code = ble_dis_init(&dis_init);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
|
||||
void le_srv_init(void)
|
||||
{
|
||||
le_dis_init();
|
||||
}
|
||||
@@ -6,9 +6,9 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "sdk_config.h"
|
||||
#include "app_config.h"
|
||||
#include "apply_old_config.h"
|
||||
#include "sdk_config.h"
|
||||
|
||||
#include "nrf_log.h"
|
||||
#include "nrf_log_ctrl.h"
|
||||
@@ -17,6 +17,10 @@ extern "C"
|
||||
#include "nrf_delay.h"
|
||||
#include "nrf_gpio.h"
|
||||
|
||||
#include "nrf_sdh.h"
|
||||
#include "nrf_sdh_ble.h"
|
||||
#include "nrf_sdh_freertos.h"
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
@@ -24,6 +28,57 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */
|
||||
#define APP_BLE_OBSERVER_PRIO 3 /**< Application's BLE observer priority. You shouldn't need to modify this value. */
|
||||
|
||||
static void le_evt_handler(ble_evt_t const *p_ble_evt, void *p_context)
|
||||
{
|
||||
switch (p_ble_evt->header.evt_id)
|
||||
{
|
||||
ret_code_t err_code;
|
||||
case BLE_GAP_EVT_PHY_UPDATE_REQUEST: {
|
||||
NRF_LOG_DEBUG("PHY update request.");
|
||||
ble_gap_phys_t const phys = {
|
||||
.rx_phys = BLE_GAP_PHY_AUTO,
|
||||
.tx_phys = BLE_GAP_PHY_AUTO,
|
||||
};
|
||||
err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void le_stack_Init(void)
|
||||
{
|
||||
ret_code_t err_code;
|
||||
uint32_t ram_start = 0;
|
||||
ble_cfg_t ble_cfg;
|
||||
memset(&ble_cfg, 0x00, sizeof(ble_cfg));
|
||||
ble_cfg.conn_cfg.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
|
||||
ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 8;
|
||||
|
||||
err_code = nrf_sdh_enable_request();
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
// Configure the BLE stack using the default settings.
|
||||
// Fetch the start address of the application RAM.
|
||||
err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &ble_cfg, ram_start);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
// Enable BLE stack.
|
||||
err_code = nrf_sdh_ble_enable(&ram_start);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
// Register a handler for BLE events.
|
||||
NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, le_evt_handler, NULL);
|
||||
}
|
||||
|
||||
void led1_task(void *pArg)
|
||||
{
|
||||
nrf_gpio_cfg_output(13);
|
||||
@@ -60,7 +115,23 @@ int main(void)
|
||||
{
|
||||
NRF_LOG_INIT(NULL, 0);
|
||||
NRF_LOG_DEFAULT_BACKENDS_INIT();
|
||||
NRF_LOG_INFO("%s Build: %s %s", DEVICE_NAME, __TIME__, __DATE__);
|
||||
NRF_LOG_INFO("%s Build: %s %s", ELITE_DEVICE_NAME, __TIME__, __DATE__);
|
||||
|
||||
le_stack_Init();
|
||||
|
||||
extern void le_gap_init(const char *device_name, uint16_t usAppearance);
|
||||
le_gap_init(ELITE_DEVICE_NAME, BLE_APPEARANCE_UNKNOWN);
|
||||
|
||||
extern void le_gatt_init(void);
|
||||
le_gatt_init();
|
||||
|
||||
extern void le_srv_init(void);
|
||||
le_srv_init();
|
||||
|
||||
extern void le_adv_init(uint8_t ble_conn_cfg_tag);
|
||||
le_adv_init(APP_BLE_CONN_CFG_TAG);
|
||||
|
||||
nrf_sdh_freertos_init(NULL, NULL);
|
||||
|
||||
xTaskCreate(led1_task, "led1_task", 160, NULL, 3, NULL);
|
||||
xTaskCreate(led2_task, "led2_task", 160, NULL, 3, NULL);
|
||||
|
||||
Reference in New Issue
Block a user