Merck / Mbed OS SmartCap_OS5

Dependencies:   nRF51822

Revision:
7:090f9eea7b3c
Parent:
4:1bfa16834dd4
Child:
9:0b017e956142
--- a/hw.cpp	Tue May 23 13:03:05 2017 +0000
+++ b/hw.cpp	Tue May 23 13:38:38 2017 +0000
@@ -13,9 +13,6 @@
 #include "nrf_delay.h"
 #include "nrf_gpio.h"
 
-// define I/O pins
-//DigitalIn cap_sw(CAP, PullNone);  // Cap off switch
-//DigitalOut vdd_enable(VDD_ENABLE,0);// Analog voltage on when hi
 
 Ticker seconds_ticker;
 volatile uint32_t seconds = 0; // seconds clock, time since power up
@@ -88,7 +85,7 @@
                               (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos);
             break;
 
-        case ADC_CHAN_SOUND:
+        case ADC_CHAN_CAP_SENSE:
             NRF_ADC->CONFIG = (ADC_CONFIG_RES_10bit << ADC_CONFIG_RES_Pos) |
                               (ADC_CONFIG_INPSEL_AnalogInputOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos) |
                               (ADC_CONFIG_REFSEL_VBG << ADC_CONFIG_REFSEL_Pos) |