nRF51822库函数速查

合集下载

NRF51822 Eval Kit 用户手册说明书

NRF51822 Eval Kit 用户手册说明书
1. Out of box audit
Waveshare
1.1 PC development environment deployments
WindowsXP or Windows 7 nRFgo Studio v1.14 or higher versions Keil MDK-ARM Lite v4.54 or higher versions J-Link Software v4.52b or higher versions
Multi-protocol 2.4GHz radio 32-bit ARM Cortex M0 processor 128-bit AES co-processor 256kB flash / 32kB RAM Programmable Peripheral
Interconnect – PPI Full set of digital interfaces including:
2. Program descriptions ..............................................................................................4 2.1 SDK ..............................................................................................................4 2.2 Example application download explanations ..............................................4 2.3 How to download and conpile blinky_example ...........................................4 2.4 How to download and compile ble_app_hrs ...............................................7 2.5 Functional descriptions of example programs ............................................8

nRF51822 模块 规格说明书

nRF51822 模块 规格说明书

OHTCOMTechnology Ltd.nRF51822模块规格说明书Datasheet of nRF51822 Modules2015.6.1目录1 简介 Introduction (3)2 nRF51822 M0 BLE模块介绍 specification for M0 Module . 4天线的连接 (7)程序的烧录 (8)表一 nRF51822 M0工作参数 (8)3 nRF51822 M1 BLE模块介绍 specification for M1 Module . 9程序的烧录 (11)表二 nRF51822 M1工作参数 (11)4 History (13)5 联系方式CONTACT US (14)NOTES:If you are customers from overseas, please contact sales@ for quotation and specifications of English version.1 简介IntroductionnRF51822 Mx BLE低功耗蓝牙模块目前包括nRF51822 M0、nRF51822 M1两款。

这两款BLE模块都是以nRF51822为主控芯片,封装不同的模块。

nRF51822 M0模块包含了LIS3DH3轴传感器,与百度手环使用相同的基础硬件,可以用来开发运动手环等穿戴设备。

nRF51822 M1模块单有一片nRF51822芯片,可以选择16kB RAM或者32kB RAM的不同版本,可以用来开发iBeacon、室内定位、穿戴设备,计算机控制等,应用更灵活,满足不同需求。

nRF51822 M0nRF51822 M12 nRF51822 M0 BLE模块介绍specification for M0 ModulenRF51822 M0采用BGA的nRF51822芯片封装并且集成了高低速晶振、LIS3DH三轴传感器,模块尺寸仅为10.5mm*8.5mm*1.5mm,为业界最小封装。

nRF51822上手指南

nRF51822上手指南

OHTCOMTechnology Ltd.nRF51822 Application KitnRF51822User Guide v0.9Copyright © 2013 Ohtcom Technology. All rights reserved.1 介绍nRF51822 Bluetooth® low energy/2.4 GHz Application Kit (AK) 提供了一整套的测试和应用nRF51822的解决方案。

nRF51822是nRF51 系列中的一员,它是一个超低功耗(ultra-low power),单片系统 (SoC) 的2.4 GHz 无线通信解决方案.1.1 最小系统要求• nRFgo Studio v1.14 或更高版本• Windows XP or Windows 71.2 外部资源• Keil MDK-ARM Lite v4.54或更高版本https:///demo/eval/arm.htm• J-Link Software v4.52b或更高版本/jlink-software.html1.3 Writing conventions这篇用户指南遵从了一些排版规则,这样能够使文章更加连贯,更加易于阅读。

以下是使用到的协作约定::• 命令使用Lucida Console.• 芯片管脚使用Consolas.• 文件名和用户接口使用bold.• 内部关联采用斜体并使用semi-bold.1.4 Application kit 发布说明Date Kit version Description2013年8月10日0.1Init.2013年8月19日0.2 加入蓝牙测试部分2013年8月25日0.3整合USB Dongle介绍.2013年8月26日0.31 确认使用USB Dongle下载可以解决Jlink不兼容的问题。

2013年8月28日0.4 完成度50%,增加200%的内容。

nRF51822外部中断学习总结

nRF51822外部中断学习总结

最近要用nRF51822进行项目的多任务调度,其中不可避免的要用到要用到nRF51822的相关中断首先,nRF51822是基于Cortex-M0架构的MCU,根据nRF51822的软件开发包中的core-m0.h文件夹,可以找到51822的相关中断编号定义(Interrupt Number Definition)[objc]view plain copy1.<span style="font-size:18px;">/* ------------------------- Interrupt Number Definition ------------------------ */2.3.typedef enum {4./* ------------------- Cortex-M0 Processor Exceptions Numbers ------------------- */5. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Powerup and warm reset */6. NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */7. HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault*/8. SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */9. DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor*/10. PendSV_IRQn = -2, /*!< 14 Pendable request for system service */11. SysTick_IRQn = -1, /*!< 15 System Tick Timer*/12./* ---------------------- nRF51 Specific Interrupt Numbers ---------------------- */13. POWER_CLOCK_IRQn = 0, /*!< 0 POWER_CLOCK*/14. RADIO_IRQn = 1, /*!< 1 RADIO*/15. UART0_IRQn = 2, /*!< 2 UART0*/16. SPI0_TWI0_IRQn = 3, /*!< 3 SPI0_TWI0*/17. SPI1_TWI1_IRQn = 4, /*!< 4 SPI1_TWI1*/18. GPIOTE_IRQn = 6, /*!< 6 GPIOTE*/19. ADC_IRQn = 7, /*!< 7 ADC*/20. TIMER0_IRQn = 8, /*!< 8 TIMER0*/21. TIMER1_IRQn = 9, /*!< 9 TIMER1*/22. TIMER2_IRQn = 10, /*!< 10 TIMER2*/23. RTC0_IRQn = 11, /*!< 11 RTC0*/24. TEMP_IRQn = 12, /*!< 12 TEMP*/25. RNG_IRQn = 13, /*!< 13 RNG*/26. ECB_IRQn = 14, /*!< 14 ECB*/27. CCM_AAR_IRQn = 15, /*!< 15 CCM_AAR*/28. WDT_IRQn = 16, /*!< 16 WDT*/29. RTC1_IRQn = 17, /*!< 17 RTC1*/30. QDEC_IRQn = 18, /*!< 18 QDEC*/31. LPCOMP_COMP_IRQn = 19, /*!< 19 LPCOMP_COMP*/32. SWI0_IRQn = 20, /*!< 20 SWI0*/33. SWI1_IRQn = 21, /*!< 21 SWI1*/34. SWI2_IRQn = 22, /*!< 22 SWI2*/35. SWI3_IRQn = 23, /*!< 23 SWI3*/36. SWI4_IRQn = 24, /*!< 24 SWI4*/37. SWI5_IRQn = 25 /*!< 25 SWI5*/38.} IRQn_Type;39.</span>在进行中断处理时,一般都要按照这个步骤:1、对要用到的中断初始化;2、对用到的中断进行使能;3、对中断进行优先级设置1、中断初始化nRF51822的外部I/O(暂时理解的程度以及用过的中断只有I/O中断,其他中断没有实践过)中断是基于任务和事件模式的。

NORDIC蓝牙芯片NRF51822说明-文档资料

NORDIC蓝牙芯片NRF51822说明-文档资料
13
四、蓝牙协议和应用代码相互分开
1:NRF51822蓝牙协议和应用代码的存储空 间相互分开,互不干扰,客户只需关注
应用代码
应用代码开发,不需花大量的时间去了解蓝 176K
牙协议是如何运行的,只需配置API参数就
可运行起来。
2:TI和CSR都是只提供蓝牙源代码,客户 蓝牙协议
只能在此代码上进行修改、编译程序,把 80K 应用代码和协议混合放在同一空间里,给修
灵敏度
-94dBm -85dBm -82dBm
51822
ARM M0 256/128K ROM 16k RAM
4dBM 0dBM -4dBM -8dBM -12dBM -16dBM -20dBm
LDO 16/4dB 10.5/0dB
RX 13
DC/DC 10.5/4dB 8.1/0dB
RX 9.5
250Kbps 1Mbps 2Mbps
■ CSR:自有16位MCU,需外挂Flash/EEPROM, 无法对产品进行加密,同时增加了相应的成本和 PCB板面积。
9
二、新增功能
■电源管理:除system ON/OFF外,各功能 模块有自己的电源管理,电源管理简单,只 有ON/OFF,有利于降低功耗。
■具有DC/DC 功能: 2.1~3.6V,DC/DC功 能可以让功耗更低。
2
nRF51822功耗/灵敏度
3
nRF51822原装开发系统
原装开发系统包括2部分 1:nRFGo Starter Kit Development Kit (简称nRF6700) 包括2个开发母板,开发调试环境,支持Keil C
2:nRF51822 Development Kit (简称nRF51822-DK) 1个nRF51822 USB dongle接收端 1个nRF51822 PCB模块 1个nRF51822 SMA模块 2个J-Link开发板(烧录、仿真) 5片nRF51822样片

nrf51822数据手册_引脚图_参数

nrf51822数据手册_引脚图_参数
P.O. Box 2336 7004 Trondheim Norway
RoHS and REACH statement
Nordic Semiconductor's products meet the requirements of Directive 2002/95/EC of the European
My Page account on our home page.
Main office: Otto Nielsens veg 12
7052 Trondheim Norway
Phone: +47 72 89 89 00 Fax: +47 72 89 89 89
Mailing address: Nordic Semiconductor

Version 3.3
Description
Added documentation for the nRF51822 CTAA version of the chip.
Added content: • Section 9.5 “CTAA WLCSP package” on page 71 • Section 11.9 “CTAA WLCSP package” on page 118
statement can be found on our website
.
Page 2
nRF51822 Product Specification v3.3
Datasheet Status
Status Objective Product Specification (OPS) Preliminary Product Specification (PPS)
• ARM® Cortex™-M0 32 bit processor • 275 μA/MHz running from flash memory • 150 μA/MHz running from RAM • Serial Wire Debug (SWD)

NRF51422和NRF51822产品介绍(极低功耗蓝牙4.0)解读

NRF51422和NRF51822产品介绍(极低功耗蓝牙4.0)解读
1:TI
2:CSR
3:美国博通
一、 MCU
■51822:32位ARM-M0, 256K(Flash)+16K(RAM),用ARM的客户群体非 常多,开发资源也非常丰富。 ■ TI:8位8051内核,决定了在性能上不能很好满足 蓝牙协议的运行,且功耗较高。 ■ CSR:自有16位MCU,需外挂Flash/EEPROM, 无法对产品进行加密,同时增加了相应的成本和 PCB板面积。
nRF51422-ARM Cortex M0
nRF51422:基于ANT和非标(如LE1)标准之间
nRF51422原装开发系统
原装开发系统包括2部分 1:nRFGo Starter Kit Development Kit (简称nRF6700) 包括2个开发母板,开发调试环境,支持Keil C
2:nRF51422 Development Kit (简称nRF51422-DK) 1个 ANT USB dongle接收端 1个nRF51422 PCB模块 1个nRF51422 SMA模块 1个J-Link开发板(烧录、仿真) 5片nRF51422样片
四、蓝牙协议和应用代码相互分开
1:NRF51822蓝牙协议和应用代码的存储空 应用代码 间相互分开,互不干扰,客户只需关注 应用代码开发,不需花大量的时间去了解蓝 176K 牙协议是如何运行的,只需配置API参数就 可运行起来。 蓝牙协议 2:TI和CSR都是只提供蓝牙源代码,客户 只能在此代码上进行修改、编译程序,把 80K 应用代码和协议混合放在同一空间里,给修 改和查找问题带来很大的困难,当产品出现 问题的时候很难判断是应用代码还是蓝牙协议的问题。
nRF51822-DK
nRF51822和nRF24LE1对比

BLE-NRF51822教程3-sdk程序框架剖析

BLE-NRF51822教程3-sdk程序框架剖析

BLE-NRF51822教程3-sdk程序框架剖析【IT168 技术】本讲为框架介绍,不会牵涉到太多代码细节。

51822的官方SDK其实是没有框架依耐性的。

什么叫框架,比如TI的BLE SDK中就有一个操作系统抽象层(OSAL)他是一个轮训的调度。

你需要按照他的方式去创建任务等等。

而51822的SDK本质上只是提供了各种调用接口,比如开启初始化协议栈,初始化一些硬件功能模块,开始广播,发起链接等等。

这些接口怎么用完全取决于自己。

不过一般固件开发都是一些类似的流程各种资源的初始化,51822也不例外。

所以sdk中的作为从机的例子main函数都是类似如下的步骤:以官方的串口BLE 为例:int main(void){leds_init(); //非必须,只是该例子中用到了timers_init(); //非必须,只是该例子中用到了buttons_init(); //非必须,只是该例子中用到了uart_init(); //非必须,只是该例子中用到了串口ble_stack_init(); //必须gap_params_init(); //必须services_init(); //跟自己创建的服务相关,不同的服务细节不同但大体建立//过程基本一致,通常在直接使用官方的例子修改一些参数即可advertising_init(); //广播数据初始化,必须conn_params_init(); //是情况而定,如果连接后不需要连接参数的协商,该初始化也//可不要sec_params_init(); //安全参数初始化,如果没用到配对绑定相关这个也可以不初始化advertising_start(); //开启广播,必须// Enter main loopfor (;;){power_manage(); //进入睡眠}}可以看到其实核心必要的只有这5个函数而已。

你可以将其他代码全都去掉,只要留下这5个函数设备一样可以运行,手机也能搜到设备并与设备通信。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

nRF51822库函数速查nrf_soc.h//初始化互斥锁uint32_t sd_mutex_new(nrf_mutex_t*p_mutex);//尝试获取互斥锁.uint32_t sd_mutex_acquire(nrf_mutex_t*p_mutex);//释放互斥锁.uint32_t sd_mutex_release(nrf_mutex_t*p_mutex);//使能外部中断.uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn);//禁止外部中断.uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn);//Get Pending Interrupt.uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn,uint32_t*p_pending_irq);//Set Pending Interrupt.uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn);//Clear Pending Interrupt.uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn);//设置中断优先级.uint32_t sd_nvic_SetPriority(IRQn_Type IRQn,nrf_app_irq_priority_t priority);//取得中断优先级.uint32_t sd_nvic_GetPriority(IRQn_Type IRQn,nrf_app_irq_priority_t*p_priority); //系统复位.uint32_t sd_nvic_SystemReset(void);//进入临界区.uint32_t sd_nvic_critical_region_enter(uint8_t*p_is_nested_critical_region);//退出临界区.uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region);//查询应用的随机数池容量.uint32_t sd_rand_application_pool_capacity_get(uint8_t*p_pool_capacity);//取得应用中有效地随机数字节数.uint32_t sd_rand_application_bytes_available_get(uint8_t*p_bytes_available);//从池中获取随机数字节.uint32_t sd_rand_application_vector_get(uint8_t*p_buff,uint8_t length);//取得复位原因寄存器的值.uint32_t sd_power_reset_reason_get(uint32_t*p_reset_reason);//清除复位原因寄存器的若干bit.uint32_t sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk);//设置CPU睡眠时的电源模式.uint32_t sd_power_mode_set(nrf_power_mode_t power_mode);//关闭系统.uint32_t sd_power_system_off(void);//开关电源失效比较器uint32_t sd_power_pof_enable(uint8_t pof_enable);//设置电源故障阈值.uint32_t sd_power_pof_threshold_set(nrf_power_failure_threshold_t threshold);//设置NRF_POWER->RAMON寄存器.uint32_t sd_power_ramon_set(uint32_t ramon);//清除NRF_POWER->RAMON寄存器.uint32_t sd_power_ramon_clr(uint32_t ramon);//Get contents of NRF_POWER->RAMON register,indicates power status of ram blocks. uint32_t sd_power_ramon_get(uint32_t*p_ramon);//Set bits in the NRF_POWER->GPREGRET register.uint32_t sd_power_gpregret_set(uint32_t gpregret_msk);//Clear bits in the NRF_POWER->GPREGRET register.uint32_t sd_power_gpregret_clr(uint32_t gpregret_msk);//Get contents of the NRF_POWER->GPREGRET register.uint32_t sd_power_gpregret_get(uint32_t*p_gpregret);//设置DCDC模式.uint32_t sd_power_dcdc_mode_set(nrf_power_dcdc_mode_t dcdc_mode);//请求使用高频晶体振荡器.uint32_t sd_clock_hfclk_request(void);//释放高频晶体振荡器.uint32_t sd_clock_hfclk_release(void);//检查高频晶体振荡器是否在运行.SVCALL(SD_CLOCK_HFCLK_IS_RUNNING,uint32_t,sd_clock_hfclk_is_running(uint32_t*p_is_running));//等待程序事件.uint32_t sd_app_evt_wait(void);//Get PPI channel enable register contents.uint32_t sd_ppi_channel_enable_get(uint32_t*p_channel_enable);//Set PPI channel enable register.uint32_t sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk);//Clear PPI channel enable register.uint32_t sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk);//Assign endpoints to a PPI channel.uint32_t sd_ppi_channel_assign(uint8_t channel_num,const volatile void*evt_endpoint, const volatile void*task_endpoint);//Task to enable a channel group.uint32_t sd_ppi_group_task_enable(uint8_t group_num);//Task to disable a channel group.uint32_t sd_ppi_group_task_disable(uint8_t group_num);//Assign PPI channels to a channel group.uint32_t sd_ppi_group_assign(uint8_t group_num,uint32_t channel_msk);//Gets the PPI channels of a channel group.uint32_t sd_ppi_group_get(uint8_t group_num,uint32_t*p_channel_msk);//配置无线通知信号.uint32_t sd_radio_notification_cfg_set(nrf_radio_notification_type_t type,nrf_radio_notification_distance_t distance);//AES-ECB加密.uint32_t sd_ecb_block_encrypt(nrf_ecb_hal_data_t*p_ecb_data);//Gets any pending events generated by the SoC API.uint32_t,sd_evt_get(uint32_t*p_evt_id);//取得芯片温度uint32_t sd_temp_get(int32_t*p_temp);//写数据到Flashsd_flash_write(uint32_t*const p_dst,uint32_t const*const p_src,uint32_t size); //擦除Flash页uint32_t sd_flash_page_erase(uint32_t page_number);//Flash Protection setuint32_t sd_flash_protect(uint32_t protenset0,uint32_t protenset1);ble.h//从队列中取得等待处理的事件uint32_t,sd_ble_evt_get(uint8_t*p_dest,uint16_t*p_len);//取得BLE协议栈中有效地传输缓冲区总数uint32_t sd_ble_tx_buffer_count_get(uint8_t*p_count);//添加一个厂商特定UUID.uint32_t sd_ble_uuid_vs_add(ble_uuid128_t const*const p_vs_uuid,uint8_t*const p_uuid_type);//解码原始小端UUID字节(16bit或128bit)到24bit的ble_uuid_t结构uint32_t sd_ble_uuid_decode(uint8_t uuid_le_len,uint8_t const*const p_uuid_le, ble_uuid_t*const p_uuid);//编码24bit的ble_uuid_t结构到原始小端UUID字节(16bit或128bit)uint32_t sd_ble_uuid_encode(ble_uuid_t const*const p_uuid,uint8_t*constp_uuid_le_len,uint8_t*const p_uuid_le));//取得版本信息uint32_t sd_ble_version_get(ble_version_t*p_version);//提供用户内存块uint32_t sd_ble_user_mem_reply(uint16_t conn_handle,ble_user_mem_block_t*p_block); ble_gap.h//设置本地蓝牙MAC地址uint32_t sd_ble_gap_address_set(ble_gap_addr_t const*const p_addr);//取得本地蓝牙MAC地址uint32_t sd_ble_gap_address_get(ble_gap_addr_t*const p_addr);//设置,清除,更新广播扫描响应数据uint32_t sd_ble_gap_adv_data_set(uint8_t const*const p_data,uint8_t dlen,uint8_t const*const p_sr_data,uint8_t srdlen);//开始广播(Start advertising(GAP Discoverable,Connectable modes,Broadcast Procedure) uint32_t sd_ble_gap_adv_start(ble_gap_adv_params_t const*const p_adv_params);//停止广播(Start advertising(GAP Discoverable,Connectable modes,Broadcast Procedure) uint32_t sd_ble_gap_adv_stop(void);//更新连接参数uint32_t sd_ble_gap_conn_param_update(uint16_t conn_handle,ble_gap_conn_params_t const*const p_conn_params);//断开连接(GAP Link Termination).uint32_t,sd_ble_gap_disconnect(uint16_t conn_handle,uint8_t hci_status_code);//设置无线发射功率dBm(accepted values are-40,-30,-20,-16,-12,-8,-4,0,and4dBm). SVCALL(SD_BLE_GAP_TX_POWER_SET,uint32_t,sd_ble_gap_tx_power_set(int8_t tx_power)) ;//Set GAP Appearance value.uint32_t sd_ble_gap_appearance_set(uint16_t appearance);//Get GAP Appearance value.uint32_t,sd_ble_gap_appearance_get(uint16_t*const p_appearance);//设置GAP外设优先连接参数uint32_t sd_ble_gap_ppcp_set(ble_gap_conn_params_t const*const p_conn_params);//取得GAP外设优先连接参数uint32_t sd_ble_gap_ppcp_get(ble_gap_conn_params_t*const p_conn_params);//设置GAP设备名uint32_t sd_ble_gap_device_name_set(ble_gap_conn_sec_mode_t const*const p_write_perm, uint8_t const*const p_dev_name,uint16_t len);//取得GAP设备名uint32_t,sd_ble_gap_device_name_get(uint8_t*const p_dev_name,uint16_t*constp_len);//启动GAP认证流程uint32_t,sd_ble_gap_authenticate(uint16_t conn_handle,ble_gap_sec_params_t const* const p_sec_params);//Reply with GAP security parameters.uint32_t sd_ble_gap_sec_params_reply(uint16_t conn_handle,uint8_t sec_status,ble_gap_sec_params_t const*const p_sec_params);//Reply with an authentication keySVCALL(SD_BLE_GAP_AUTH_KEY_REPLY,uint32_t,sd_ble_gap_auth_key_reply(uint16_tconn_handle,uint8_t key_type,uint8_t const*const key);//Reply with GAP security information.uint32_t sd_ble_gap_sec_info_reply(uint16_t conn_handle,ble_gap_enc_info_t const* const p_enc_info,ble_gap_sign_info_t const*const p_sign_info);//Get the current connection security.uint32_t,sd_ble_gap_conn_sec_get(uint16_t conn_handle,ble_gap_conn_sec_t*const p_conn_sec);//开始接受RSSI值的变化通知uint32_t sd_ble_gap_rssi_start(uint16_t conn_handle);//停止接收RSSI值变化通知SVCALL(SD_BLE_GAP_RSSI_STOP,uint32_t,sd_ble_gap_rssi_stop(uint16_t conn_handle); ble_gattc.h//启动或继续GATT主要服务的发现过程uint32_t sd_ble_gattc_primary_services_discover(uint16_t conn_handle,uint16_tstart_handle,ble_uuid_t const*const p_srvc_uuid);//启动或继续GATT关系发现过程uint32_t sd_ble_gattc_relationships_discover(uint16_t conn_handle,ble_gattc_handle_range_t const*const p_handle_range);//启动或继续GATT特性发现过程uint32_t sd_ble_gattc_characteristics_discover(uint16_t conn_handle,ble_gattc_handle_range_t const*const p_handle_range);//启动或继续GATT特性描述发现过程uint32_t sd_ble_gattc_descriptors_discover(uint16_t conn_handle,ble_gattc_handle_range_t const*const p_handle_range);//启动或继续通过GATT特性的UUID的读操作uint32_t sd_ble_gattc_char_value_by_uuid_read(uint16_t conn_handle,ble_uuid_t const *const p_uuid,ble_gattc_handle_range_t const*const p_handle_range);//启动或继续GATT读取长特性或描述的过程uint32_t sd_ble_gattc_read(uint16_t conn_handle,uint16_t handle,uint16_t offset); //启动GATT读取多个特性值的过程uint32_t sd_ble_gattc_char_values_read(uint16_t conn_handle,uint16_t const*const p_handles,uint16_t handle_count);//执行一个无报告的写操作uint32_t sd_ble_gattc_write(uint16_t conn_handle,ble_gattc_write_params_t const* const p_write_params);//发送配置到GATT服务器uint32_t sd_ble_gattc_hv_confirm(uint16_t conn_handle,uint16_t handle);ble_gatts.h//添加一个服务声明到本地服务的ATT表uint32_t sd_ble_gatts_service_add(uint8_t type,ble_uuid_t const*const p_uuid,uint16_t*const p_handle);//添加一个包含声明到本地服务的ATT表uint32_t sd_ble_gatts_include_add(uint16_t service_handle,uint16_t inc_srvc_handle, uint16_t*const p_include_handle);//添加特性声明,特性值声明,可选的特性描述声明到ATT表uint32_t sd_ble_gatts_characteristic_add(uint16_t service_handle,ble_gatts_char_md_t const*const p_char_md,ble_gatts_attr_t const*const p_attr_char_value,ble_gatts_char_handles_t*const p_handles);//添加描述到ATT表uint32_t sd_ble_gatts_descriptor_add(uint16_t char_handle,ble_gatts_attr_t const* const p_attr,uint16_t*const p_handle);//设置值到特性uint32_t sd_ble_gatts_value_set(uint16_t handle,uint16_t offset,uint16_t*const p_len, uint8_t const*const p_value);//取得属性值uint32_t sd_ble_gatts_value_get(uint16_t handle,uint16_t offset,uint16_t*const p_len, uint8_t*const p_data);//Notify或Indicate特性值.uint32_t,sd_ble_gatts_hvx(uint16_t conn_handle,ble_gatts_hvx_params_t const*constp_hvx_params);//Indicate属性值改变uint32_t sd_ble_gatts_service_changed(uint16_t conn_handle,uint16_t start_handle, uint16_t end_handle);//报告读写授权请求uint32_t sd_ble_gatts_rw_authorize_reply(uint16_t conn_handle,ble_gatts_rw_authorize_reply_params_t const*const p_rw_authorize_reply_params);//Update persistent system attribute informationuint32_t sd_ble_gatts_sys_attr_set(uint16_t conn_handle,uint8_t const*constp_sys_attr_data,uint16_t len);//Retrieve persistent system attribute information from the stack.uint32_t sd_ble_gatts_sys_attr_get(uint16_t conn_handle,uint8_t*constp_sys_attr_data,uint16_t*const p_len);ble_l2cap.h//注册一个L2CAP的CIDuint32_t sd_ble_l2cap_cid_register(uint16_t cid);//注销CIDuint32_t sd_ble_l2cap_cid_unregister(uint16_t cid);//发送L2CAP包uint32_t sd_ble_l2cap_tx(uint16_t conn_handle,ble_l2cap_header_t const*const p_header,uint8_t const*const p_data);nrf_sdm.h//使能SoftDeviceuint32_t sd_softdevice_enable(nrf_clock_lfclksrc_t clock_source,softdevice_assertion_handler_t assertion_handler);//禁用SoftDeviceuint32_t sd_softdevice_disable(void);//检查SoftDevice是否已使能uint32_t sd_softdevice_is_enabled(uint8_t*p_softdevice_enabled);//开始转发中断到应用程序uint32_t sd_softdevice_forward_to_application(void);。

相关文档
最新文档