nRF51822库函数速查

本文档详细介绍了nRF51822芯片上SoftDevice的API函数,包括互斥锁管理、中断控制、电源管理、随机数生成、系统复位、事件处理、蓝牙低功耗(BLE)相关操作等,为开发者提供了全面的函数速查指南。
摘要由CSDN通过智能技术生成

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);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值