nrf52832 comp for sdk 15.2.0
1.在sdk_config.h中加入宏
// <e> COMP_ENABLED - nrf_drv_comp - COMP peripheral driver
//==========================================================
#ifndef COMP_ENABLED
#define COMP_ENABLED 1
#endif
// <o> COMP_CONFIG_REF - Reference voltage
// <0=> Internal 1.2V
// <1=> Internal 1.8V
// <2=> Internal 2.4V
// <4=> VDD
// <7=> ARef
#ifndef COMP_CONFIG_REF
#define COMP_CONFIG_REF 1
#endif
// <o> COMP_CONFIG_MAIN_MODE - Main mode
// <0=> Single ended
// <1=> Differential
#ifndef COMP_CONFIG_MAIN_MODE
#define COMP_CONFIG_MAIN_MODE 0
#endif
// <o> COMP_CONFIG_SPEED_MODE - Speed mode
// <0=> Low power
// <1=> Normal
// <2=> High speed
#ifndef COMP_CONFIG_SPEED_MODE
#define COMP_CONFIG_SPEED_MODE 2
#endif
// <o> COMP_CONFIG_HYST - Hystheresis
// <0=> No
// <1=> 50mV
#ifndef COMP_CONFIG_HYST
#define COMP_CONFIG_HYST 0
#endif
// <o> COMP_CONFIG_ISOURCE - Current Source
// <0=> Off
// <1=> 2.5 uA
// <2=> 5 uA
// <3=> 10 uA
#ifndef COMP_CONFIG_ISOURCE
#define COMP_CONFIG_ISOURCE 0
#endif
// <o> COMP_CONFIG_INPUT - Analog input
// <0=> 0
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef COMP_CONFIG_INPUT
#define COMP_CONFIG_INPUT 7
#endif
// <o> COMP_CONFIG_IRQ_PRIORITY - Interrupt priority
// <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
// <0=> 0 (highest)
// <1=> 1
// <2=> 2
// <3=> 3
// <4=> 4
// <5=> 5
// <6=> 6
// <7=> 7
#ifndef COMP_CONFIG_IRQ_PRIORITY
#define COMP_CONFIG_IRQ_PRIORITY 7
#endif
2.导入nrfx_comp.c到工程
3.comp事件处理函数
#include "nrf_drv_comp.h"
void comp_event_handler(nrf_comp_event_t evt)
{
printf("\r\ncomp_event_handler\r\n");
}
4.comp初时化使用
uint32_t err_code;
nrf_drv_comp_config_t comp_config = NRF_DRV_COMP_DEFAULT_CONFIG(NRF_COMP_INPUT_7);
comp_config.isource = NRF_COMP_ISOURCE_Ien5uA;
err_code = nrf_drv_comp_init(&comp_config, comp_event_handler);
nrf_drv_comp_start(NRF_DRV_COMP_EVT_EN_CROSS_MASK ,NRF_DRV_COMP_SHORT_STOP_AFTER_DOWN_EVT);
nrf52832 comp for sdk 15.2.0相关推荐
- Asprise OCR SDK 15.3试用版破解
1. 序言 之前因同事需要,破解过Asprise OCR 4.0试用版本,对这个库比较有印象.目前最新版本为15.3,网上已经能下载到它的试用破解版本,但似乎没有看到此版本的破解文章.Asp ...
- A problem occurred starting process 'command '/home/jason/Android/Sdk/build-tools/23.0.3/aapt
参考:http://www.cnblogs.com/jonzone/p/5246531.html A problem occurred starting process 'command '/home ...
- eclipse一直卡住,出现 “android sdk content loader 0%” 卡住的错误分析及解决方法...
分析:这种问题之前没有遇到过,也不知道什么原因,直接去网上查询,打开www.stackoverflow.com,输入要查询问题的关键词,我们输入 "android sdk content l ...
- 网易云 IM SDK 4.2.0版本逆袭升级!
网易云IM SDK 4.2.0已发布,本期各端SDK主要更新如下: iOS SDK 聊天室支持 Bot 机器人 添加是否将群通知计入未读的开关 添加日志最大存在天数设置 对单个用户所在群的数量添加限制 ...
- 网易云信SDK V3.1.0版本发布啦
最近天气渐冷,小伙伴们要注意保暖:有女朋友的抱紧女朋友,没女朋友的就抱紧主机. -from 贴心的云小信 10月26日,网易云信SDK V3.1.0版发布,本次版本主要发布功能为:群组聊天室禁言,聊天 ...
- MSB8036 The Windows SDK version 10.0 was not found. Install the required version of Windows SDK o
MSB8036 The Windows SDK version 10.0 was not found. Install the required version of Windows SDK o ...
- Visual Studio 2017 15.5.0 正式发布 正式版下载
Visual Studio 2017 15.5.0 最新版 现在流行 官方版直接下载 在线选择性安装 https://www.visualstudio.com/zh-hans/downloads/ ...
- 大数据基础学习三:Ubuntu下安装VMware Tools超详细步骤及需要注意的问题(以ubuntu-18.04.3、Mware Workstation 15.1.0 Pro为例)
大数据基础学习三:Ubuntu下安装VMware Tools超详细步骤及需要注意的问题 (以ubuntu-18.04.3.Mware Workstation 15.1.0 Pro for Window ...
- 大数据基础学习二:在VMware虚拟机上安装Ubuntu完整步骤及需要注意的问题(以VMware Workstation 15.1.0 Pro和Ubuntu18.04.3优麒麟版为例)
大数据基础学习二:在VMware虚拟机上安装Ubuntu完整步骤及需要注意的问题 (以VMware Workstation 15.1.0 Pro for Windows和Ubuntu18.04.3优麒 ...
- aidl远程服务调用Android,报错:Process 'command 'F:\Android\SDK\build-tools\29.0.0\aidl.exe''
aidl远程服务调用Android demo1: Alipay 支付App服务: 1.新建: Alipay\app\src\main\aidl\com\glsite\alipay\IAlipaySer ...
最新文章
- Android异步处理三:Handler+Looper+MessageQueue深入详解
- 配置linux下oracle sqlplus/rman等历史记录回调功能
- 【错误记录】Android 应用运行报错 ( java.lang.VerifyError: Verifier rejected class androidx. | 逆向中遇到的问题 )
- SoringMVC-常用注解标签详解(摘抄)
- USTC English Club Note20211110
- js css加载器,webpack的CSS加载器的使用
- 通过yum安装Nagios
- 二叉树:听说递归能做的,栈也能做!
- C语言中extern 全局变量,二进制文件与内存,static,const对栈,内存的使用情况
- C++经典程序代码大全
- 人脸识别接口_双目模组摄像头人脸识别技术中活体检测
- SyncToy 文件同步工具的定时同步方案(不使用第三方软件)
- 三星note10安装linux,三星Note10/Note10+新款Dex已支持Win10/macOS
- SNMP配置:view配置中mask参数的详解
- WOai wojiao
- 程序员PK律师——瑞幸咖啡战局
- 51c语言延时程序怎么编写,C51中延时程序的编写
- pycharm安装及添加桌面图标
- 数据挖掘神经网络算法,人工神经网络分析方法
- 计算机的硬件和软件主成
热门文章
- 剪辑师的基本素养--了解四种特写类型
- Android开发-基本概念小整理(四)为了面试的小伙伴们所准备~~
- 安装ADOBE READER时无法将数值写入键_php_sir_新浪博客
- 广电物联网大赛正式开启
- 阿泰,水晶报表--pull模式样板
- PM notifier
- Kotlin by lazy解析及在findviewById场景中的使用
- 【Android工具】音频频率发生器,声音测试,音响测试,各种频率声音合成工具...
- phpStorm2018安装与破解(免安装打包版)
- linux设备模型五(device和device_driver)