nRF51822 库函数速查

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

nRF51822库函数速查

nRF51822库函数速查nrf_soc.h

//初始化互斥锁

uint32_tsd_mutex_new(nrf_mutex_t*p_mutex);

//尝试获取互斥锁.

uint32_tsd_mutex_acquire(nrf_mutex_t*p_mutex);

//释放互斥锁.

uint32_tsd_mutex_release(nrf_mutex_t*p_mutex);

//使能外部中断.

uint32_tsd_nvic_EnableIRQ(IRQn_TypeIRQn);

//禁止外部中断.

uint32_tsd_nvic_DisableIRQ(IRQn_TypeIRQn);

//GetPendingInterrupt.

uint32_tsd_nvic_GetPendingIRQ(IRQn_TypeIRQn,uint32_t*p_pending_irq);/ /SetPendingInterrupt.

uint32_tsd_nvic_SetPendingIRQ(IRQn_TypeIRQn);

//ClearPendingInterrupt.

uint32_tsd_nvic_ClearPendingIRQ(IRQn_TypeIRQn);

//设置中断优先级.

uint32_tsd_nvic_SetPriority(IRQn_TypeIRQn,nrf_app_irq_priority_tprior ity);//取得中断优先级.

uint32_tsd_nvic_GetPriority(IRQn_TypeIRQn,nrf_app_irq_priority_t*p_pr iority);//系统复位.

uint32_tsd_nvic_SystemReset(void);

//进入临界区.

uint32_tsd_nvic_critical_region_enter(uint8_t*p_is_nested_critical_re gion);//退出临界区.

uint32_tsd_nvic_critical_region_exit(uint8_tis_nested_critical_region );//查询应用的随机数池容量.

uint32_tsd_rand_application_pool_capacity_get(uint8_t*p_pool_capacity );//取得应用中有效地随机数字节数.

uint32_tsd_rand_application_bytes_available_get(uint8_t*p_bytes_avail able);//从池中获取随机数字节.

uint32_tsd_rand_application_vector_get(uint8_t*p_buff,uint8_tlength); //取得复位原因寄存器的值.

uint32_tsd_power_reset_reason_get(uint32_t*p_reset_reason);//清除复位原因寄存器的若干bit.

uint32_tsd_power_reset_reason_clr(uint32_treset_reason_clr_msk);

//设置CPU睡眠时的电源模式.

uint32_tsd_power_mode_set(nrf_power_mode_tpower_mode);

//关闭系统.

uint32_tsd_power_system_off(void);

//开关电源失效比较器

uint32_tsd_power_pof_enable(uint8_tpof_enable);

//设置电源故障阈值.

uint32_tsd_power_pof_threshold_set(nrf_power_failure_threshold_tthres hold);//设置NRF_POWER->RAMON寄存器.

uint32_tsd_power_ramon_set(uint32_tramon);

//清除NRF_POWER->RAMON寄存器.

uint32_tsd_power_ramon_clr(uint32_tramon);

//GetcontentsofNRF_POWER-

>RAMONregister,indicatespowerstatusoframblocks.uint32_tsd_power_ramon _get(uint32_t*p_ramon);

//SetbitsintheNRF_POWER->GPREGRETregister.

uint32_tsd_power_gpregret_set(uint32_tgpregret_msk);

//ClearbitsintheNRF_POWER->GPREGRETregister.

uint32_tsd_power_gpregret_clr(uint32_tgpregret_msk);

//GetcontentsoftheNRF_POWER->GPREGRETregister.

uint32_tsd_power_gpregret_get(uint32_t*p_gpregret);

//设置DCDC模式.

uint32_tsd_power_dcdc_mode_set(nrf_power_dcdc_mode_tdcdc_mode);

//请求使用高频晶体振荡器.

uint32_tsd_clock_hfclk_request(void);

//释放高频晶体振荡器.

uint32_tsd_clock_hfclk_release(void);

//检查高频晶体振荡器是否在运行.

SVCALL(SD_CLOCK_HFCLK_IS_RUNNING,uint32_t,sd_clock_hfclk_is_running(u int32_t*p_is_running));

//等待程序事件.

uint32_tsd_app_evt_wait(void);

//GetPPIchannelenableregistercontents.

uint32_tsd_ppi_channel_enable_get(uint32_t*p_channel_enable);

//SetPPIchannelenableregister.

uint32_tsd_ppi_channel_enable_set(uint32_tchannel_enable_set_msk);

//ClearPPIchannelenableregister.

相关文档
最新文档